Back to Apitable

.ContactsTeamApiApi

packages/api-client/ContactsTeamApiApi.md

1.13.0-beta.111.8 KB
Original Source

.ContactsTeamApiApi

All URIs are relative to http://backend/api/v1

MethodHTTP requestDescription
createTeamPOST /org/team/createCreate team
deleteTeamDELETE /org/team/delete/{teamId}Delete team
getSubTeamsGET /org/team/subTeamsQuery direct sub departments
getTeamBranchGET /org/team/branchteam branch
getTeamMembersGET /org/team/membersQuery the team's members
getTeamTreeGET /org/team/treeQuery team tree
readTeamInfoGET /org/team/readQuery team information
updateTeamPOST /org/team/updateUpdate team info

createTeam

ResponseDataVoid createTeam(createTeamRo, )

Create team

Example

typescript
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));

Parameters

NameTypeDescriptionNotes
createTeamRoCreateTeamRo
xSpaceId[string]space iddefaults to undefined

Return type

ResponseDataVoid

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteTeam

ResponseDataVoid deleteTeam()

Delete team. If team has members, it can be deleted.

Example

typescript
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));

Parameters

NameTypeDescriptionNotes
teamId[string]team iddefaults to undefined
xSpaceId[string]space iddefaults to undefined

Return type

ResponseDataVoid

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getSubTeams

ResponseDataListTeamTreeVo getSubTeams()

query sub team by team id. if team id lack, default root team.

Example

typescript
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));

Parameters

NameTypeDescriptionNotes
xSpaceId[string]space iddefaults to undefined
teamId[string]team id(optional) defaults to undefined

Return type

ResponseDataListTeamTreeVo

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getTeamBranch

ResponseDataListTeamTreeVo getTeamBranch()

team branch. result is tree

Example

typescript
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));

Parameters

NameTypeDescriptionNotes
xSpaceId[string]space iddefaults to undefined

Return type

ResponseDataListTeamTreeVo

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getTeamMembers

ResponseDataListMemberPageVo getTeamMembers()

Query the team's members, no include sub team's

Example

typescript
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));

Parameters

NameTypeDescriptionNotes
teamId[string]team iddefaults to undefined
xSpaceId[string]space iddefaults to undefined

Return type

ResponseDataListMemberPageVo

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getTeamTree

ResponseDataListTeamTreeVo getTeamTree()

Example

typescript
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));

Parameters

NameTypeDescriptionNotes
xSpaceId[string]space iddefaults to undefined
depth[number]tree depth(default:1,max:2)(optional) defaults to undefined

Return type

ResponseDataListTeamTreeVo

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

readTeamInfo

ResponseDataTeamInfoVo readTeamInfo()

Query department information. if team id lack, default root team

Example

typescript
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));

Parameters

NameTypeDescriptionNotes
xSpaceId[string]space iddefaults to undefined
teamId[string]team id(optional) defaults to undefined

Return type

ResponseDataTeamInfoVo

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateTeam

ResponseDataVoid updateTeam(updateTeamRo, )

Update team info. If modify team level,default sort in the end of parent team.

Example

typescript
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));

Parameters

NameTypeDescriptionNotes
updateTeamRoUpdateTeamRo
xSpaceId[string]space iddefaults to undefined

Return type

ResponseDataVoid

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: /

HTTP response details

Status codeDescriptionResponse headers
200OK-
500Internal Server Error-

[Back to top] [Back to API list] [Back to Model list] [Back to README]