Add types

This commit is contained in:
adrinr 2023-03-17 10:11:28 +01:00
parent 4e82957e52
commit fd0c88afac
4 changed files with 36 additions and 8 deletions

View File

@ -0,0 +1,27 @@
import { ScimResource, ScimMeta } from "scim-patch"
import { ScimListResponse } from "./shared"
export interface ScimGroupResponse extends ScimResource {
schemas: ["urn:ietf:params:scim:schemas:core:2.0:Group"]
id: string
externalId: string
meta: ScimMeta & {
resourceType: "Group"
}
displayName: string
}
export interface ScimCreateGroupRequest {
schemas: [
"urn:ietf:params:scim:schemas:core:2.0:Group",
"http://schemas.microsoft.com/2006/11/ResourceManagement/ADSCIM/2.0/Group"
]
externalId: string
displayName: string
meta: {
resourceType: "Group"
}
}
export interface ScimGroupListResponse
extends ScimListResponse<ScimGroupResponse> {}

View File

@ -1 +1,2 @@
export * from "./users"
export * from "./groups"

View File

@ -0,0 +1,7 @@
export interface ScimListResponse<T> {
schemas: ["urn:ietf:params:scim:api:messages:2.0:ListResponse"]
totalResults: number
Resources: T[]
startIndex: number
itemsPerPage: number
}

View File

@ -1,4 +1,5 @@
import { ScimResource, ScimMeta, ScimPatchOperation } from "scim-patch"
import { ScimListResponse } from "./shared"
type BooleanString = boolean | "True" | "true" | "False" | "false"
@ -56,13 +57,5 @@ export interface ScimUpdateRequest {
Operations: ScimPatchOperation[]
}
interface ScimListResponse<T> {
schemas: ["urn:ietf:params:scim:api:messages:2.0:ListResponse"]
totalResults: number
Resources: T[]
startIndex: number
itemsPerPage: number
}
export interface ScimUserListResponse
extends ScimListResponse<ScimUserResponse> {}