diff --git a/packages/types/src/api/web/global/scim/groups.ts b/packages/types/src/api/web/global/scim/groups.ts new file mode 100644 index 0000000000..e2f161f1a6 --- /dev/null +++ b/packages/types/src/api/web/global/scim/groups.ts @@ -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 {} diff --git a/packages/types/src/api/web/global/scim/index.ts b/packages/types/src/api/web/global/scim/index.ts index 056d6e5675..e084a0dd1e 100644 --- a/packages/types/src/api/web/global/scim/index.ts +++ b/packages/types/src/api/web/global/scim/index.ts @@ -1 +1,2 @@ export * from "./users" +export * from "./groups" diff --git a/packages/types/src/api/web/global/scim/shared.ts b/packages/types/src/api/web/global/scim/shared.ts new file mode 100644 index 0000000000..18b9519850 --- /dev/null +++ b/packages/types/src/api/web/global/scim/shared.ts @@ -0,0 +1,7 @@ +export interface ScimListResponse { + schemas: ["urn:ietf:params:scim:api:messages:2.0:ListResponse"] + totalResults: number + Resources: T[] + startIndex: number + itemsPerPage: number +} diff --git a/packages/types/src/api/web/global/scim/users.ts b/packages/types/src/api/web/global/scim/users.ts index 143419829c..edc9b8e37e 100644 --- a/packages/types/src/api/web/global/scim/users.ts +++ b/packages/types/src/api/web/global/scim/users.ts @@ -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 { - schemas: ["urn:ietf:params:scim:api:messages:2.0:ListResponse"] - totalResults: number - Resources: T[] - startIndex: number - itemsPerPage: number -} - export interface ScimUserListResponse extends ScimListResponse {}