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