packages/api-client/ContactsTeamApiApi.md
All URIs are relative to http://backend/api/v1
| Method | HTTP request | Description |
|---|---|---|
| createTeam | POST /org/team/create | Create team |
| deleteTeam | DELETE /org/team/delete/{teamId} | Delete team |
| getSubTeams | GET /org/team/subTeams | Query direct sub departments |
| getTeamBranch | GET /org/team/branch | team branch |
| getTeamMembers | GET /org/team/members | Query the team's members |
| getTeamTree | GET /org/team/tree | Query team tree |
| readTeamInfo | GET /org/team/read | Query team information |
| updateTeam | POST /org/team/update | Update team info |
ResponseDataVoid createTeam(createTeamRo, )
Create team
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ContactsTeamApiApi(configuration);
let body:.ContactsTeamApiApiCreateTeamRequest = {
// CreateTeamRo
createTeamRo: {
name: "Finance Department",
superId: 0,
},
// string | space id
xSpaceId: "spcyQkKp9XJEl",
};
apiInstance.createTeam(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| createTeamRo | CreateTeamRo | ||
| 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 deleteTeam()
Delete team. If team has members, it can be deleted.
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ContactsTeamApiApi(configuration);
let body:.ContactsTeamApiApiDeleteTeamRequest = {
// string | team id
teamId: "1",
// string | space id
xSpaceId: "spcyQkKp9XJEl",
};
apiInstance.deleteTeam(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| teamId | [string] | team id | defaults to undefined |
| 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]
ResponseDataListTeamTreeVo getSubTeams()
query sub team by team id. if team id lack, default root team.
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ContactsTeamApiApi(configuration);
let body:.ContactsTeamApiApiGetSubTeamsRequest = {
// string | space id
xSpaceId: "spcyQkKp9XJEl",
// string | team id (optional)
teamId: "1",
};
apiInstance.getSubTeams(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 |
| teamId | [string] | team id | (optional) defaults to undefined |
ResponseDataListTeamTreeVo
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]
ResponseDataListTeamTreeVo getTeamBranch()
team branch. result is tree
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ContactsTeamApiApi(configuration);
let body:.ContactsTeamApiApiGetTeamBranchRequest = {
// string | space id
xSpaceId: "spcyQkKp9XJEl",
};
apiInstance.getTeamBranch(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 |
ResponseDataListTeamTreeVo
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]
ResponseDataListMemberPageVo getTeamMembers()
Query the team's members, no include sub team's
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ContactsTeamApiApi(configuration);
let body:.ContactsTeamApiApiGetTeamMembersRequest = {
// string | team id
teamId: "0",
// string | space id
xSpaceId: "spcyQkKp9XJEl",
};
apiInstance.getTeamMembers(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| teamId | [string] | team id | defaults to undefined |
| xSpaceId | [string] | space id | defaults to undefined |
ResponseDataListMemberPageVo
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]
ResponseDataListTeamTreeVo getTeamTree()
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ContactsTeamApiApi(configuration);
let body:.ContactsTeamApiApiGetTeamTreeRequest = {
// string | space id
xSpaceId: "spcyQkKp9XJEl",
// number | tree depth(default:1,max:2) (optional)
depth: 2,
};
apiInstance.getTeamTree(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 |
| depth | [number] | tree depth(default:1,max:2) | (optional) defaults to undefined |
ResponseDataListTeamTreeVo
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]
ResponseDataTeamInfoVo readTeamInfo()
Query department information. if team id lack, default root team
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ContactsTeamApiApi(configuration);
let body:.ContactsTeamApiApiReadTeamInfoRequest = {
// string | space id
xSpaceId: "spcyQkKp9XJEl",
// string | team id (optional)
teamId: "1",
};
apiInstance.readTeamInfo(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 |
| teamId | [string] | team id | (optional) defaults to undefined |
ResponseDataTeamInfoVo
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 updateTeam(updateTeamRo, )
Update team info. If modify team level,default sort in the end of parent team.
import { } from '';
import * as fs from 'fs';
const configuration = .createConfiguration();
const apiInstance = new .ContactsTeamApiApi(configuration);
let body:.ContactsTeamApiApiUpdateTeamRequest = {
// UpdateTeamRo
updateTeamRo: {
teamId: 1,
teamName: "Design Department",
superId: 0,
},
// string | space id
xSpaceId: "spcyQkKp9XJEl",
};
apiInstance.updateTeam(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
| Name | Type | Description | Notes |
|---|---|---|---|
| updateTeamRo | UpdateTeamRo | ||
| 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]