packages/api-client/SpaceSubAdminApiApi.md
All URIs are relative to http://backend/api/v1
| Method | HTTP request | Description |
|---|---|---|
| addRole | POST /space/addRole | Create space role |
| deleteRole | DELETE /space/deleteRole/{memberId} | delete admin |
| editRole | POST /space/editRole | Edite space role |
| getRoleDetail | GET /space/getRoleDetail | query admin detail |
| listRole | GET /space/listRole | Query admins |
ResponseDataVoid addRole(addSpaceRoleRo, )
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .SpaceSubAdminApiApi(configuration);
let body:.SpaceSubAdminApiApiAddRoleRequest = {
// AddSpaceRoleRo
addSpaceRoleRo: {
memberIds: [1,2],
resourceCodes: ["MANAGE_TEAM","MANAGE_MEMBER"],
},
// string | space id
xSpaceId: "spcyQkKp9XJEl",
};
apiInstance.addRole(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| addSpaceRoleRo | AddSpaceRoleRo | ||
| xSpaceId | [string] | space id | defaults to undefined |
ResponseDataVoid
No authorization required
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseData deleteRole()
delete admin
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .SpaceSubAdminApiApi(configuration);
let body:.SpaceSubAdminApiApiDeleteRoleRequest = {
// number
memberId: 1,
// string | space id
xSpaceId: "spcyQkKp9XJEl",
};
apiInstance.deleteRole(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| memberId | [number] | defaults to undefined | |
| xSpaceId | [string] | space id | defaults to undefined |
ResponseData
No authorization required
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseData editRole(updateSpaceRoleRo, )
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .SpaceSubAdminApiApi(configuration);
let body:.SpaceSubAdminApiApiEditRoleRequest = {
// UpdateSpaceRoleRo
updateSpaceRoleRo: {
id: 1,
memberId: 1,
resourceCodes: ["MANAGE_TEAM","MANAGE_MEMBER"],
},
// string | space id
xSpaceId: "spcyQkKp9XJEl",
};
apiInstance.editRole(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| updateSpaceRoleRo | UpdateSpaceRoleRo | ||
| xSpaceId | [string] | space id | defaults to undefined |
ResponseData
No authorization required
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseDataSpaceRoleDetailVo getRoleDetail()
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .SpaceSubAdminApiApi(configuration);
let body:.SpaceSubAdminApiApiGetRoleDetailRequest = {
// number
memberId: 1,
// string | space id
xSpaceId: "spcyQkKp9XJEl",
};
apiInstance.getRoleDetail(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| memberId | [number] | defaults to undefined | |
| xSpaceId | [string] | space id | defaults to undefined |
ResponseDataSpaceRoleDetailVo
No authorization required
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseDataPageInfoSpaceRoleVo listRole()
Page query sub admin.Description of Paging: pageNo: number of paging pageSize: size of paging。 order: order in current page。 sort: sorting in current page。 simple usage example:{"pageNo":1,"pageSize":20} complex usage example:{"pageNo":1,"pageSize":20,"order":"createTime,updateTime","sort":"asc,desc"}
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .SpaceSubAdminApiApi(configuration);
let body:.SpaceSubAdminApiApiListRoleRequest = {
// Page
page: {
records: [
{},
],
total: 1,
size: 1,
current: 1,
orders: [
{
column: "column_example",
asc: true,
},
],
optimizeCountSql: true,
searchCount: true,
optimizeJoinOfCountSql: true,
countId: "countId_example",
maxLimit: 1,
pages: 1,
},
// string | space id
xSpaceId: "spcyQkKp9XJEl",
// string | paging parameters
pageObjectParams: "{"pageNo":1,"pageSize":20}",
};
apiInstance.listRole(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| page | Page | defaults to undefined | |
| xSpaceId | [string] | space id | defaults to undefined |
| pageObjectParams | [string] | paging parameters | defaults to undefined |
ResponseDataPageInfoSpaceRoleVo
No authorization required
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]