packages/api-client/ContactMemberApiApi.md
All URIs are relative to http://backend/api/v1
| Method | HTTP request | Description |
|---|---|---|
| addMember | POST /org/member/addMember | Add member |
| checkEmailInSpace | GET /org/member/checkEmail | Check whether email in space |
| deleteBatchMember | DELETE /org/member/deleteBatch | Delete members |
| deleteMember | DELETE /org/member/delete | Delete a Member |
| downloadTemplate | GET /org/member/downloadTemplate | Download contact template |
| getMemberList | GET /org/member/list | Query the team's members |
| getMembers | GET /org/member/search | Fuzzy Search Members |
| getUnits | GET /org/member/units | Query the units which a user belongs in space |
| inviteMember | POST /org/member/sendInvite | Send an email to invite members |
| inviteMemberSingle | POST /org/member/sendInviteSingle | Again send an email to invite members |
| read1 | GET /org/member/read | Get member's detail info |
| readPage | GET /org/member/page | Page query the team's member |
| update2 | POST /org/member/update | Edit self member information |
| updateInfo | POST /org/member/updateInfo | Edit member info |
| updateTeam1 | POST /org/member/updateMemberTeam | Update team |
| uploadExcel | POST /org/member/uploadExcel | Upload employee sheet |
ResponseDataVoid addMember(teamAddMemberRo, )
When adding new members, they can only be selected from within the organization structure and can be transferred by department
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));
| Name | Type | Description | Notes |
|---|---|---|---|
| teamAddMemberRo | TeamAddMemberRo | ||
| 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]
ResponseDataBoolean checkEmailInSpace()
Check whether email in space
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));
| Name | Type | Description | Notes |
|---|---|---|---|
| [string] | defaults to undefined | ||
| xSpaceId | [string] | space id | defaults to undefined |
ResponseDataBoolean
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 deleteBatchMember(deleteBatchMemberRo, )
action provides two deletion modes,1.delete from organization 2. delete from team
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));
| Name | Type | Description | Notes |
|---|---|---|---|
| deleteBatchMemberRo | DeleteBatchMemberRo | ||
| 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 deleteMember(deleteMemberRo, )
action provides two deletion modes.1.delete from organization 2. delete from team
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));
| Name | Type | Description | Notes |
|---|---|---|---|
| deleteMemberRo | DeleteMemberRo | ||
| 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]
void downloadTemplate()
Download contact template
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));
This endpoint does not need any parameter.
void
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]
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.
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));
| Name | Type | Description | Notes |
|---|---|---|---|
| xSpaceId | [string] | space id | defaults to undefined |
| teamId | [string] | team id. if root team can lack teamId, teamId default 0. | (optional) defaults to undefined |
ResponseDataListMemberInfoVo
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]
ResponseDataListSearchMemberVo getMembers()
Fuzzy Search Members
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));
| Name | Type | Description | Notes |
|---|---|---|---|
| keyword | [string] | keyword | defaults to undefined |
| xSpaceId | [string] | space id | defaults to undefined |
| filter | [boolean] | whether to filter unadded members | (optional) defaults to undefined |
| className | [string] | the highlighting style | (optional) defaults to undefined |
ResponseDataListSearchMemberVo
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]
ResponseDataMemberUnitsVo getUnits()
Query the units which a user belongs, include self
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));
| Name | Type | Description | Notes |
|---|---|---|---|
| xSpaceId | [string] | space id | defaults to undefined |
ResponseDataMemberUnitsVo
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]
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.
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));
| Name | Type | Description | Notes |
|---|---|---|---|
| inviteRo | InviteRo | ||
| xSpaceId | [string] | space id | defaults to undefined |
ResponseDataMemberUnitsVo
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 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.
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));
| Name | Type | Description | Notes |
|---|---|---|---|
| inviteMemberAgainRo | InviteMemberAgainRo | ||
| 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]
ResponseDataMemberInfoVo read1()
Get member's detail info
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));
| Name | Type | Description | Notes |
|---|---|---|---|
| xSpaceId | [string] | space id | defaults to undefined |
| memberId | [string] | member id | (optional) defaults to undefined |
| uuid | [string] | user uuid | (optional) defaults to undefined |
ResponseDataMemberInfoVo
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]
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"}
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));
| Name | Type | Description | Notes |
|---|---|---|---|
| page | Page | defaults to undefined | |
| xSpaceId | [string] | space id | defaults to undefined |
| pageObjectParams | [string] | page's parameter | defaults 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 |
ResponseDataPageInfoMemberPageVo
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 update2(updateMemberOpRo, )
Edit self member information
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));
| Name | Type | Description | Notes |
|---|---|---|---|
| updateMemberOpRo | UpdateMemberOpRo | ||
| 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 updateInfo(updateMemberRo, )
Edit member info
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));
| Name | Type | Description | Notes |
|---|---|---|---|
| updateMemberRo | UpdateMemberRo | ||
| 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 updateTeam1(updateMemberTeamRo, )
assign members to departments
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));
| Name | Type | Description | Notes |
|---|---|---|---|
| updateMemberTeamRo | UpdateMemberTeamRo | ||
| 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]
ResponseDataUploadParseResultVO uploadExcel()
Upload employee sheet,then parse it.
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));
| Name | Type | Description | Notes |
|---|---|---|---|
| data | UploadMemberTemplateRo | defaults to undefined | |
| xSpaceId | [string] | space id | defaults to undefined |
ResponseDataUploadParseResultVO
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]