Type emails

This commit is contained in:
adrinr 2023-04-03 16:45:55 +01:00
parent c0d7f2329a
commit ad4f70b826
1 changed files with 11 additions and 15 deletions

View File

@ -1,8 +1,16 @@
import { ScimResource, ScimMeta, ScimPatchOperation } from "scim-patch"
import { ScimResource, ScimMeta } from "scim-patch"
import { ScimListResponse } from "./shared"
type BooleanString = boolean | "True" | "true" | "False" | "false"
type Emails =
| {
value: string
type: "work"
primary: boolean
}[]
| undefined
export interface ScimUserResponse extends ScimResource {
schemas: ["urn:ietf:params:scim:schemas:core:2.0:User"]
id: string
@ -18,13 +26,7 @@ export interface ScimUserResponse extends ScimResource {
givenName: string
}
active: BooleanString
emails: [
{
value: string
type: "work"
primary: true
}
]
emails: Emails
}
export interface ScimCreateUserRequest {
@ -35,13 +37,7 @@ export interface ScimCreateUserRequest {
externalId: string
userName: string
active: BooleanString
emails: [
{
primary: true
type: "work"
value: string
}
]
emails: Emails
meta: {
resourceType: "User"
}