packages/api-client/ContactsRoleApiApi.md
All URIs are relative to http://backend/api/v1
| Method | HTTP request | Description |
|---|---|---|
| addRoleMembers | POST /org/roles/{roleId}/members | add role members |
| createRole | POST /org/roles | create new role |
| deleteRole1 | DELETE /org/roles/{roleId} | delete role |
| getRoleMembers | GET /org/roles/{roleId}/members | query role members |
| getRoles | GET /org/roles | query roles |
| initRoles | POST /org/roles/init | create init role |
| removeRoleMembers | DELETE /org/roles/{roleId}/members | remove role members |
| updateRole | PATCH /org/roles/{roleId} | update role information |
ResponseDataVoid addRoleMembers(addRoleMemberRo, )
add role members
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ContactsRoleApiApi(configuration);
let body:.ContactsRoleApiApiAddRoleMembersRequest = {
// AddRoleMemberRo
addRoleMemberRo: {
unitList: [
{
id: 120322719823,
type: 1,
},
],
},
// number
roleId: 1,
// string | space id
xSpaceId: "spcyQkKp9XJEl",
// string
roleId2: "15622",
};
apiInstance.addRoleMembers(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| addRoleMemberRo | AddRoleMemberRo | ||
| roleId | [number] | defaults to undefined | |
| xSpaceId | [string] | space id | defaults to undefined |
| roleId2 | [string] | 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]
ResponseDataVoid createRole(createRoleRo, )
create new role
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ContactsRoleApiApi(configuration);
let body:.ContactsRoleApiApiCreateRoleRequest = {
// CreateRoleRo
createRoleRo: {
roleName: "Finance",
position: 2000,
},
// string | space id
xSpaceId: "spcyQkKp9XJEl",
};
apiInstance.createRole(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| createRoleRo | CreateRoleRo | ||
| 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]
ResponseDataVoid deleteRole1()
delete role
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ContactsRoleApiApi(configuration);
let body:.ContactsRoleApiApiDeleteRole1Request = {
// number
roleId: 1,
// string | space id
xSpaceId: "spcyQkKp9XJEl",
// string
roleId2: "15622",
};
apiInstance.deleteRole1(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| roleId | [number] | defaults to undefined | |
| xSpaceId | [string] | space id | defaults to undefined |
| roleId2 | [string] | 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]
ResponseDataPageInfoRoleMemberVo getRoleMembers()
query the role's members
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ContactsRoleApiApi(configuration);
let body:.ContactsRoleApiApiGetRoleMembersRequest = {
// number
roleId: 1,
// PageVoid
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
roleId2: "15622",
// string | page parameters
pageObjectParams: "{"pageNo":1,"pageSize":20}",
};
apiInstance.getRoleMembers(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| roleId | [number] | defaults to undefined | |
| page | PageVoid | defaults to undefined | |
| xSpaceId | [string] | space id | defaults to undefined |
| roleId2 | [string] | defaults to undefined | |
| pageObjectParams | [string] | page parameters | defaults to undefined |
ResponseDataPageInfoRoleMemberVo
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]
ResponseDataListRoleInfoVo getRoles()
query the space's roles
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ContactsRoleApiApi(configuration);
let body:.ContactsRoleApiApiGetRolesRequest = {
// string | space id
xSpaceId: "spcyQkKp9XJEl",
};
apiInstance.getRoles(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| xSpaceId | [string] | space id | defaults to undefined |
ResponseDataListRoleInfoVo
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]
ResponseDataVoid initRoles()
create init role
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ContactsRoleApiApi(configuration);
let body:.ContactsRoleApiApiInitRolesRequest = {
// string | space id
xSpaceId: "spcyQkKp9XJEl",
};
apiInstance.initRoles(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| 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]
ResponseDataVoid removeRoleMembers(deleteRoleMemberRo, )
remove role members
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ContactsRoleApiApi(configuration);
let body:.ContactsRoleApiApiRemoveRoleMembersRequest = {
// DeleteRoleMemberRo
deleteRoleMemberRo: {
unitIds: [
1,
],
},
// number
roleId: 1,
// string | space id
xSpaceId: "spcyQkKp9XJEl",
// string
roleId2: "15622",
};
apiInstance.removeRoleMembers(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| deleteRoleMemberRo | DeleteRoleMemberRo | ||
| roleId | [number] | defaults to undefined | |
| xSpaceId | [string] | space id | defaults to undefined |
| roleId2 | [string] | 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]
ResponseDataVoid updateRole(updateRoleRo, )
update role information
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ContactsRoleApiApi(configuration);
let body:.ContactsRoleApiApiUpdateRoleRequest = {
// UpdateRoleRo
updateRoleRo: {
roleName: "finance",
},
// number
roleId: 1,
// string | space id
xSpaceId: "spcyQkKp9XJEl",
// string
roleId2: "15622",
};
apiInstance.updateRole(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| updateRoleRo | UpdateRoleRo | ||
| roleId | [number] | defaults to undefined | |
| xSpaceId | [string] | space id | defaults to undefined |
| roleId2 | [string] | 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]