Rename types
This commit is contained in:
parent
437672a6a3
commit
9c64f54fa9
|
@ -23,15 +23,18 @@ export interface ScimUserResponse {
|
|||
]
|
||||
}
|
||||
|
||||
export interface ScimListResponse {
|
||||
interface ScimListResponse<T> {
|
||||
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<ScimUserResponse> {}
|
||||
|
||||
export interface ScimCreateUserRequest {
|
||||
schemas: [
|
||||
"urn:ietf:params:scim:schemas:core:2.0:User",
|
||||
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
|
||||
|
|
|
@ -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<RequestSettings>
|
||||
) => {
|
||||
|
@ -63,6 +63,6 @@ export class ScimUsersAPI extends TestAPI {
|
|||
body
|
||||
)
|
||||
|
||||
return res.body as ScimListResponse
|
||||
return res.body as ScimUserResponse
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue