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"]
|
schemas: ["urn:ietf:params:scim:api:messages:2.0:ListResponse"]
|
||||||
totalResults: number
|
totalResults: number
|
||||||
Resources: ScimUserResponse[]
|
Resources: T[]
|
||||||
startIndex: number
|
startIndex: number
|
||||||
itemsPerPage: number
|
itemsPerPage: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ScimUserRequest {
|
export interface ScimUserListResponse
|
||||||
|
extends ScimListResponse<ScimUserResponse> {}
|
||||||
|
|
||||||
|
export interface ScimCreateUserRequest {
|
||||||
schemas: [
|
schemas: [
|
||||||
"urn:ietf:params:scim:schemas:core:2.0:User",
|
"urn:ietf:params:scim:schemas:core:2.0:User",
|
||||||
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
|
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import {
|
import {
|
||||||
AccountMetadata,
|
ScimUserListResponse,
|
||||||
ScimListResponse,
|
ScimCreateUserRequest,
|
||||||
ScimUserRequest,
|
ScimUserResponse,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
import TestConfiguration from "../../TestConfiguration"
|
import TestConfiguration from "../../TestConfiguration"
|
||||||
import { TestAPI } from "../base"
|
import { TestAPI } from "../base"
|
||||||
|
@ -45,14 +45,14 @@ export class ScimUsersAPI extends TestAPI {
|
||||||
"get",
|
"get",
|
||||||
requestSettings
|
requestSettings
|
||||||
)
|
)
|
||||||
return res.body as ScimListResponse
|
return res.body as ScimUserListResponse
|
||||||
}
|
}
|
||||||
|
|
||||||
post = async (
|
post = async (
|
||||||
{
|
{
|
||||||
body,
|
body,
|
||||||
}: {
|
}: {
|
||||||
body: ScimUserRequest
|
body: ScimCreateUserRequest
|
||||||
},
|
},
|
||||||
requestSettings?: Partial<RequestSettings>
|
requestSettings?: Partial<RequestSettings>
|
||||||
) => {
|
) => {
|
||||||
|
@ -63,6 +63,6 @@ export class ScimUsersAPI extends TestAPI {
|
||||||
body
|
body
|
||||||
)
|
)
|
||||||
|
|
||||||
return res.body as ScimListResponse
|
return res.body as ScimUserResponse
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue