Back to Apitable

.ContactMemberApiApi

packages/api-client/ContactMemberApiApi.md

1.13.0-beta.126.3 KB
Original Source

.ContactMemberApiApi

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

MethodHTTP requestDescription
addMemberPOST /org/member/addMemberAdd member
checkEmailInSpaceGET /org/member/checkEmailCheck whether email in space
deleteBatchMemberDELETE /org/member/deleteBatchDelete members
deleteMemberDELETE /org/member/deleteDelete a Member
downloadTemplateGET /org/member/downloadTemplateDownload contact template
getMemberListGET /org/member/listQuery the team's members
getMembersGET /org/member/searchFuzzy Search Members
getUnitsGET /org/member/unitsQuery the units which a user belongs in space
inviteMemberPOST /org/member/sendInviteSend an email to invite members
inviteMemberSinglePOST /org/member/sendInviteSingleAgain send an email to invite members
read1GET /org/member/readGet member's detail info
readPageGET /org/member/pagePage query the team's member
update2POST /org/member/updateEdit self member information
updateInfoPOST /org/member/updateInfoEdit member info
updateTeam1POST /org/member/updateMemberTeamUpdate team
uploadExcelPOST /org/member/uploadExcelUpload employee sheet

addMember

ResponseDataVoid addMember(teamAddMemberRo, )

When adding new members, they can only be selected from within the organization structure and can be transferred by department

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ContactMemberApiApi(configuration);

let body:.ContactMemberApiApiAddMemberRequest = {
  // TeamAddMemberRo
  teamAddMemberRo: {
    teamId: 12032,
    unitList: [
      {
        id: 120322719823,
        type: 1,
      },
    ],
  },
  // string | space id
  xSpaceId: "spcyQkKp9XJEl",
};

apiInstance.addMember(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
teamAddMemberRoTeamAddMemberRo
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]

checkEmailInSpace

ResponseDataBoolean checkEmailInSpace()

Check whether email in space

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ContactMemberApiApi(configuration);

let body:.ContactMemberApiApiCheckEmailInSpaceRequest = {
  // string | email
  email: "[email protected]",
  // string | space id
  xSpaceId: "spcyQkKp9XJEl",
};

apiInstance.checkEmailInSpace(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
email[string]emaildefaults to undefined
xSpaceId[string]space iddefaults to undefined

Return type

ResponseDataBoolean

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]

deleteBatchMember

ResponseDataVoid deleteBatchMember(deleteBatchMemberRo, )

action provides two deletion modes,1.delete from organization 2. delete from team

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ContactMemberApiApi(configuration);

let body:.ContactMemberApiApiDeleteBatchMemberRequest = {
  // DeleteBatchMemberRo
  deleteBatchMemberRo: {
    action: 0,
    memberId: ["10101","10102","10103","10104"],
    teamId: 1,
  },
  // string | space id
  xSpaceId: "spcyQkKp9XJEl",
};

apiInstance.deleteBatchMember(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
deleteBatchMemberRoDeleteBatchMemberRo
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]

deleteMember

ResponseDataVoid deleteMember(deleteMemberRo, )

action provides two deletion modes.1.delete from organization 2. delete from team

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ContactMemberApiApi(configuration);

let body:.ContactMemberApiApiDeleteMemberRequest = {
  // DeleteMemberRo
  deleteMemberRo: {
    action: 0,
    memberId: 1,
    teamId: 1,
  },
  // string | space id
  xSpaceId: "spcyQkKp9XJEl",
};

apiInstance.deleteMember(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
deleteMemberRoDeleteMemberRo
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]

downloadTemplate

void downloadTemplate()

Download contact template

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ContactMemberApiApi(configuration);

let body:any = {};

apiInstance.downloadTemplate(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

This endpoint does not need any parameter.

Return type

void

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]

getMemberList

ResponseDataListMemberInfoVo getMemberList()

Query all the members of the department, including the members of the sub department.if root team can lack teamId, teamId default 0.

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ContactMemberApiApi(configuration);

let body:.ContactMemberApiApiGetMemberListRequest = {
  // string | space id
  xSpaceId: "spcyQkKp9XJEl",
  // string | team id. if root team can lack teamId, teamId default 0. (optional)
  teamId: "0",
};

apiInstance.getMemberList(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. if root team can lack teamId, teamId default 0.(optional) defaults to undefined

Return type

ResponseDataListMemberInfoVo

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]

getMembers

ResponseDataListSearchMemberVo getMembers()

Fuzzy Search Members

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ContactMemberApiApi(configuration);

let body:.ContactMemberApiApiGetMembersRequest = {
  // string | keyword
  keyword: "Luck",
  // string | space id
  xSpaceId: "spcyQkKp9XJEl",
  // boolean | whether to filter unadded members (optional)
  filter: true,
  // string | the highlighting style (optional)
  className: "highLight",
};

apiInstance.getMembers(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
keyword[string]keyworddefaults to undefined
xSpaceId[string]space iddefaults to undefined
filter[boolean]whether to filter unadded members(optional) defaults to undefined
className[string]the highlighting style(optional) defaults to undefined

Return type

ResponseDataListSearchMemberVo

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]

getUnits

ResponseDataMemberUnitsVo getUnits()

Query the units which a user belongs, include self

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ContactMemberApiApi(configuration);

let body:.ContactMemberApiApiGetUnitsRequest = {
  // string | space id
  xSpaceId: "spcyQkKp9XJEl",
};

apiInstance.getUnits(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

ResponseDataMemberUnitsVo

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]

inviteMember

ResponseDataMemberUnitsVo inviteMember(inviteRo, )

Send an email to invite. The email is automatically bound to the platform user. The invited member will be in the state to be activated, and will not take effect until the user self activates.

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ContactMemberApiApi(configuration);

let body:.ContactMemberApiApiInviteMemberRequest = {
  // InviteRo
  inviteRo: {
    invite: [
      {
        email: "[email protected]",
        teamId: 16272126,
      },
    ],
    data: "FutureIsComing",
  },
  // string | space id
  xSpaceId: "spcyQkKp9XJEl",
};

apiInstance.inviteMember(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
inviteRoInviteRo
xSpaceId[string]space iddefaults to undefined

Return type

ResponseDataMemberUnitsVo

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]

inviteMemberSingle

ResponseDataVoid inviteMemberSingle(inviteMemberAgainRo, )

If a member is not activated, it can send an invitation again regardless of whether the invitation has expired. After the invitation is successfully sent, the invitation link sent last time will be invalid.

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ContactMemberApiApi(configuration);

let body:.ContactMemberApiApiInviteMemberSingleRequest = {
  // InviteMemberAgainRo
  inviteMemberAgainRo: {
    email: "[email protected]",
  },
  // string | space id
  xSpaceId: "spcyQkKp9XJEl",
};

apiInstance.inviteMemberSingle(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
inviteMemberAgainRoInviteMemberAgainRo
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]

read1

ResponseDataMemberInfoVo read1()

Get member's detail info

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ContactMemberApiApi(configuration);

let body:.ContactMemberApiApiRead1Request = {
  // string | space id
  xSpaceId: "spcyQkKp9XJEl",
  // string | member id (optional)
  memberId: "1",
  // string | user uuid (optional)
  uuid: "1",
};

apiInstance.read1(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
memberId[string]member id(optional) defaults to undefined
uuid[string]user uuid(optional) defaults to undefined

Return type

ResponseDataMemberInfoVo

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]

readPage

ResponseDataPageInfoMemberPageVo readPage()

Query all the members of the department, including the members of the sub department. The query must be paging not full query. 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"}

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ContactMemberApiApi(configuration);

let body:.ContactMemberApiApiReadPageRequest = {
  // 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 | page\'s parameter
  pageObjectParams: "{"pageNo":1,"pageSize":20}",
  // string | team id. if root team can lack teamId, teamId default 0. (optional)
  teamId: "1",
  // string | whether to filter unadded members (optional)
  isActive: "1",
};

apiInstance.readPage(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
pagePagedefaults to undefined
xSpaceId[string]space iddefaults to undefined
pageObjectParams[string]page's parameterdefaults to undefined
teamId[string]team id. if root team can lack teamId, teamId default 0.(optional) defaults to undefined
isActive[string]whether to filter unadded members(optional) defaults to undefined

Return type

ResponseDataPageInfoMemberPageVo

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]

update2

ResponseDataVoid update2(updateMemberOpRo, )

Edit self member information

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ContactMemberApiApi(configuration);

let body:.ContactMemberApiApiUpdate2Request = {
  // UpdateMemberOpRo
  updateMemberOpRo: {
    memberName: "Zhang San",
  },
  // string | space id
  xSpaceId: "spcyQkKp9XJEl",
};

apiInstance.update2(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
updateMemberOpRoUpdateMemberOpRo
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]

updateInfo

ResponseDataVoid updateInfo(updateMemberRo, )

Edit member info

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ContactMemberApiApi(configuration);

let body:.ContactMemberApiApiUpdateInfoRequest = {
  // UpdateMemberRo
  updateMemberRo: {
    memberId: 1,
    memberName: "Zhang San",
    position: "Manager",
    email: "[email protected]",
    jobNumber: "143613308",
    teamIds: ["10101","10102","10103","10104"],
    roleIds: ["10101","10102","10103","10104"],
    tagIds: ["10101","10102","10103","10104"],
  },
  // string | space id
  xSpaceId: "spcyQkKp9XJEl",
};

apiInstance.updateInfo(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
updateMemberRoUpdateMemberRo
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]

updateTeam1

ResponseDataVoid updateTeam1(updateMemberTeamRo, )

assign members to departments

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ContactMemberApiApi(configuration);

let body:.ContactMemberApiApiUpdateTeam1Request = {
  // UpdateMemberTeamRo
  updateMemberTeamRo: {
    memberIds: ["10101","10102","10103","10104"],
    preTeamId: 271632,
    newTeamIds: ["10101","10102","10103","10104"],
  },
  // string | space id
  xSpaceId: "spcyQkKp9XJEl",
};

apiInstance.updateTeam1(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
updateMemberTeamRoUpdateMemberTeamRo
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]

uploadExcel

ResponseDataUploadParseResultVO uploadExcel()

Upload employee sheet,then parse it.

Example

typescript
import {  } from '';
import * as fs from 'fs';

const configuration = .createConfiguration();
const apiInstance = new .ContactMemberApiApi(configuration);

let body:.ContactMemberApiApiUploadExcelRequest = {
  // UploadMemberTemplateRo
  data: {
    file: { data: Buffer.from(fs.readFileSync('/path/to/file', 'utf-8')), name: '/path/to/file' },
    data: "FutureIsComing",
  },
  // string | space id
  xSpaceId: "spcyQkKp9XJEl",
};

apiInstance.uploadExcel(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

NameTypeDescriptionNotes
dataUploadMemberTemplateRodefaults to undefined
xSpaceId[string]space iddefaults to undefined

Return type

ResponseDataUploadParseResultVO

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]