Add types
This commit is contained in:
parent
4e82957e52
commit
fd0c88afac
|
@ -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> {}
|
|
@ -1 +1,2 @@
|
|||
export * from "./users"
|
||||
export * from "./groups"
|
||||
|
|
|
@ -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
|
||||
}
|
|
@ -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> {}
|
||||
|
|
Loading…
Reference in New Issue