diff --git a/packages/types/src/api/web/global/scim/users.ts b/packages/types/src/api/web/global/scim/users.ts index f2157f3c34..29ae696a72 100644 --- a/packages/types/src/api/web/global/scim/users.ts +++ b/packages/types/src/api/web/global/scim/users.ts @@ -23,15 +23,18 @@ export interface ScimUserResponse { ] } -export interface ScimListResponse { +interface ScimListResponse { schemas: ["urn:ietf:params:scim:api:messages:2.0:ListResponse"] totalResults: number - Resources: ScimUserResponse[] + Resources: T[] startIndex: number itemsPerPage: number } -export interface ScimUserRequest { +export interface ScimUserListResponse + extends ScimListResponse {} + +export interface ScimCreateUserRequest { schemas: [ "urn:ietf:params:scim:schemas:core:2.0:User", "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User" diff --git a/packages/worker/src/tests/api/scim/users.ts b/packages/worker/src/tests/api/scim/users.ts index 4a1e995a96..adef49faf6 100644 --- a/packages/worker/src/tests/api/scim/users.ts +++ b/packages/worker/src/tests/api/scim/users.ts @@ -1,7 +1,7 @@ import { - AccountMetadata, - ScimListResponse, - ScimUserRequest, + ScimUserListResponse, + ScimCreateUserRequest, + ScimUserResponse, } from "@budibase/types" import TestConfiguration from "../../TestConfiguration" import { TestAPI } from "../base" @@ -45,14 +45,14 @@ export class ScimUsersAPI extends TestAPI { "get", requestSettings ) - return res.body as ScimListResponse + return res.body as ScimUserListResponse } post = async ( { body, }: { - body: ScimUserRequest + body: ScimCreateUserRequest }, requestSettings?: Partial ) => { @@ -63,6 +63,6 @@ export class ScimUsersAPI extends TestAPI { body ) - return res.body as ScimListResponse + return res.body as ScimUserResponse } }