diff --git a/examples/rest-api-client-demo/src/space.ts b/examples/rest-api-client-demo/src/space.ts index 24d859a241..b72412dd70 100644 --- a/examples/rest-api-client-demo/src/space.ts +++ b/examples/rest-api-client-demo/src/space.ts @@ -33,4 +33,42 @@ export class Space { console.log(error); } } + + public async updateSpaceMembers() { + const spaceMembers = { + id: SPACE_ID, + members: [ + { + entity: { + type: "USER" as const, + code: "user1", + }, + isAdmin: true, + includeSubs: false, + }, + { + entity: { + type: "USER" as const, + code: "user2", + }, + isAdmin: false, + includeSubs: false, + }, + { + entity: { + type: "GROUP" as const, + code: "group1", + }, + isAdmin: false, + includeSubs: true, + }, + ], + }; + + try { + console.log(await this.client.space.updateSpaceMembers(spaceMembers)); + } catch (error) { + console.log(error); + } + } } diff --git a/packages/rest-api-client/docs/space.md b/packages/rest-api-client/docs/space.md index 5d096e5549..6c8b6212e6 100644 --- a/packages/rest-api-client/docs/space.md +++ b/packages/rest-api-client/docs/space.md @@ -3,6 +3,7 @@ - [getSpace](#getSpace) - [deleteSpace](#deleteSpace) - [updateSpaceBody](#updateSpaceBody) +- [updateSpaceMembers](#updateSpaceMembers) ## Overview @@ -116,3 +117,27 @@ An empty object. #### Reference - https://kintone.dev/en/docs/kintone/rest-api/spaces/update-space-body/ + +### updateSpaceMembers + +Updates the members of a Space. + +#### Parameters + +| Name | Type | Required | Description | +| --------------------- | :--------------: | :---------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| id | Number or String | Yes | The space ID. | +| members | Array | Yes | A list of members of the Space.
At least one Space Administrator must be specified.
Inactive and deleted users cannot be specified. | +| members[].entity | Object | Yes | The entity information of the Space member.
Guest users cannot be specified. | +| members[].entity.type | String | Yes | The entity type of the Space member.