pyrus-api 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +21 -0
- package/README.md +289 -0
- package/build/cjs/index.js +1015 -0
- package/build/esm/index.js +1010 -0
- package/build/types/index.d.ts +51 -0
- package/build/types/src/api/announcementsApi.d.ts +14 -0
- package/build/types/src/api/baseApi.d.ts +21 -0
- package/build/types/src/api/botApi.d.ts +17 -0
- package/build/types/src/api/calendarApi.d.ts +8 -0
- package/build/types/src/api/callApi.d.ts +11 -0
- package/build/types/src/api/catalogsApi.d.ts +22 -0
- package/build/types/src/api/contactsApi.d.ts +8 -0
- package/build/types/src/api/filesApi.d.ts +8 -0
- package/build/types/src/api/formsApi.d.ts +17 -0
- package/build/types/src/api/index.d.ts +1 -0
- package/build/types/src/api/listsApi.d.ts +20 -0
- package/build/types/src/api/logsApi.d.ts +13 -0
- package/build/types/src/api/membersApi.d.ts +21 -0
- package/build/types/src/api/profileApi.d.ts +8 -0
- package/build/types/src/api/pyrusApiClient.d.ts +57 -0
- package/build/types/src/api/roleApi.d.ts +15 -0
- package/build/types/src/api/tasksApi.d.ts +18 -0
- package/build/types/src/entities/TaskWithComments.d.ts +7 -0
- package/build/types/src/entities/announcementComment.d.ts +12 -0
- package/build/types/src/entities/announcementWithComments.d.ts +13 -0
- package/build/types/src/entities/approval.d.ts +7 -0
- package/build/types/src/entities/attachedFile.d.ts +9 -0
- package/build/types/src/entities/bot.d.ts +15 -0
- package/build/types/src/entities/catalogHeader.d.ts +9 -0
- package/build/types/src/entities/catalogInfo.d.ts +19 -0
- package/build/types/src/entities/catalogItem.d.ts +12 -0
- package/build/types/src/entities/channel.d.ts +8 -0
- package/build/types/src/entities/channelUser.d.ts +4 -0
- package/build/types/src/entities/columnSettings.d.ts +6 -0
- package/build/types/src/entities/commentDescription.d.ts +6 -0
- package/build/types/src/entities/department.d.ts +7 -0
- package/build/types/src/entities/dueFilter.d.ts +3 -0
- package/build/types/src/entities/formFieldInfo.d.ts +21 -0
- package/build/types/src/entities/formFields/formField.d.ts +26 -0
- package/build/types/src/entities/formFields/formFieldAuthor.d.ts +7 -0
- package/build/types/src/entities/formFields/formFieldBase.d.ts +12 -0
- package/build/types/src/entities/formFields/formFieldCatalog.d.ts +15 -0
- package/build/types/src/entities/formFields/formFieldCheckmark.d.ts +7 -0
- package/build/types/src/entities/formFields/formFieldCreateDate.d.ts +6 -0
- package/build/types/src/entities/formFields/formFieldDate.d.ts +6 -0
- package/build/types/src/entities/formFields/formFieldDueDate.d.ts +6 -0
- package/build/types/src/entities/formFields/formFieldDueDateTime.d.ts +6 -0
- package/build/types/src/entities/formFields/formFieldEmail.d.ts +6 -0
- package/build/types/src/entities/formFields/formFieldFile.d.ts +7 -0
- package/build/types/src/entities/formFields/formFieldFlag.d.ts +7 -0
- package/build/types/src/entities/formFields/formFieldFormLink.d.ts +7 -0
- package/build/types/src/entities/formFields/formFieldMoney.d.ts +6 -0
- package/build/types/src/entities/formFields/formFieldMultipleChoice.d.ts +14 -0
- package/build/types/src/entities/formFields/formFieldNewFile.d.ts +5 -0
- package/build/types/src/entities/formFields/formFieldNote.d.ts +6 -0
- package/build/types/src/entities/formFields/formFieldNumber.d.ts +6 -0
- package/build/types/src/entities/formFields/formFieldPerson.d.ts +7 -0
- package/build/types/src/entities/formFields/formFieldPhone.d.ts +6 -0
- package/build/types/src/entities/formFields/formFieldProject.d.ts +15 -0
- package/build/types/src/entities/formFields/formFieldStatus.d.ts +7 -0
- package/build/types/src/entities/formFields/formFieldStep.d.ts +6 -0
- package/build/types/src/entities/formFields/formFieldTable.d.ts +14 -0
- package/build/types/src/entities/formFields/formFieldText.d.ts +6 -0
- package/build/types/src/entities/formFields/formFieldTime.d.ts +6 -0
- package/build/types/src/entities/formFields/formFieldTitle.d.ts +13 -0
- package/build/types/src/entities/formLink.d.ts +5 -0
- package/build/types/src/entities/formMapping.d.ts +16 -0
- package/build/types/src/entities/newFile.d.ts +7 -0
- package/build/types/src/entities/organization.d.ts +9 -0
- package/build/types/src/entities/person.d.ts +19 -0
- package/build/types/src/entities/plainTaskList.d.ts +15 -0
- package/build/types/src/entities/printForm.d.ts +4 -0
- package/build/types/src/entities/role.d.ts +10 -0
- package/build/types/src/entities/sessionLifespan.d.ts +4 -0
- package/build/types/src/entities/sessionRestriction.d.ts +9 -0
- package/build/types/src/entities/settings.d.ts +5 -0
- package/build/types/src/entities/smsInfo.d.ts +8 -0
- package/build/types/src/entities/step.d.ts +5 -0
- package/build/types/src/entities/subscriber.d.ts +6 -0
- package/build/types/src/entities/task.d.ts +26 -0
- package/build/types/src/entities/taskComment.d.ts +50 -0
- package/build/types/src/entities/taskHeader.d.ts +11 -0
- package/build/types/src/entities/taskList.d.ts +4 -0
- package/build/types/src/enums/activityAction.d.ts +4 -0
- package/build/types/src/enums/approvalChoice.d.ts +7 -0
- package/build/types/src/enums/callEventType.d.ts +3 -0
- package/build/types/src/enums/callStatus.d.ts +7 -0
- package/build/types/src/enums/channelType.d.ts +23 -0
- package/build/types/src/enums/checkmark.d.ts +4 -0
- package/build/types/src/enums/disconnectParty.d.ts +6 -0
- package/build/types/src/enums/errorCodeType.d.ts +123 -0
- package/build/types/src/enums/filterMask.d.ts +20 -0
- package/build/types/src/enums/flag.d.ts +5 -0
- package/build/types/src/enums/formFieldType.d.ts +27 -0
- package/build/types/src/enums/listType.d.ts +4 -0
- package/build/types/src/enums/operatorId.d.ts +9 -0
- package/build/types/src/enums/permissionLevel.d.ts +6 -0
- package/build/types/src/enums/personRights.d.ts +24 -0
- package/build/types/src/enums/personType.d.ts +5 -0
- package/build/types/src/enums/sendSmsError.d.ts +11 -0
- package/build/types/src/enums/sendSmsStatus.d.ts +6 -0
- package/build/types/src/enums/sourceType.d.ts +4 -0
- package/build/types/src/enums/status.d.ts +4 -0
- package/build/types/src/helpers/constants.d.ts +8 -0
- package/build/types/src/helpers/functions.d.ts +13 -0
- package/build/types/src/helpers/types.d.ts +4 -0
- package/build/types/src/requests/announcementCommentRequest.d.ts +6 -0
- package/build/types/src/requests/announcementRequest.d.ts +6 -0
- package/build/types/src/requests/attachCallRecordRequest.d.ts +37 -0
- package/build/types/src/requests/authRequest.d.ts +11 -0
- package/build/types/src/requests/calendarTasksRequest.d.ts +24 -0
- package/build/types/src/requests/callRequest.d.ts +27 -0
- package/build/types/src/requests/catalogRequestBase.d.ts +15 -0
- package/build/types/src/requests/changePermissionsRequest.d.ts +4 -0
- package/build/types/src/requests/contactsRequest.d.ts +3 -0
- package/build/types/src/requests/createBotRequest.d.ts +5 -0
- package/build/types/src/requests/createCallRequest.d.ts +6 -0
- package/build/types/src/requests/createCatalogRequest.d.ts +6 -0
- package/build/types/src/requests/createDepartmentRequest.d.ts +6 -0
- package/build/types/src/requests/createListRequest.d.ts +12 -0
- package/build/types/src/requests/createMemberRequest.d.ts +12 -0
- package/build/types/src/requests/createRoleRequest.d.ts +5 -0
- package/build/types/src/requests/deleteBotRequest.d.ts +4 -0
- package/build/types/src/requests/deleteRoleRequest.d.ts +4 -0
- package/build/types/src/requests/formFilter.d.ts +6 -0
- package/build/types/src/requests/formRegisterRequest.d.ts +26 -0
- package/build/types/src/requests/getAllRequest.d.ts +3 -0
- package/build/types/src/requests/getMessageRequest.d.ts +10 -0
- package/build/types/src/requests/inboxRequest.d.ts +8 -0
- package/build/types/src/requests/personIdentity.d.ts +4 -0
- package/build/types/src/requests/profileRequest.d.ts +3 -0
- package/build/types/src/requests/setAvatarRequest.d.ts +4 -0
- package/build/types/src/requests/syncCatalogRequest.d.ts +6 -0
- package/build/types/src/requests/taskCommentRequest.d.ts +39 -0
- package/build/types/src/requests/taskListRequest.d.ts +10 -0
- package/build/types/src/requests/taskRequest.d.ts +24 -0
- package/build/types/src/requests/updateBotRequest.d.ts +13 -0
- package/build/types/src/requests/updateDepartmentRequest.d.ts +8 -0
- package/build/types/src/requests/updateListRequest.d.ts +14 -0
- package/build/types/src/requests/updateMemberRequest.d.ts +15 -0
- package/build/types/src/requests/updateRoleRequest.d.ts +8 -0
- package/build/types/src/responses/announcementResponse.d.ts +5 -0
- package/build/types/src/responses/announcementsResponse.d.ts +5 -0
- package/build/types/src/responses/authResponse.d.ts +6 -0
- package/build/types/src/responses/botResponse.d.ts +3 -0
- package/build/types/src/responses/botsResponse.d.ts +5 -0
- package/build/types/src/responses/calendarResponse.d.ts +6 -0
- package/build/types/src/responses/callResponse.d.ts +4 -0
- package/build/types/src/responses/catalogItemResponse.d.ts +4 -0
- package/build/types/src/responses/catalogResponse.d.ts +18 -0
- package/build/types/src/responses/contactsResponse.d.ts +5 -0
- package/build/types/src/responses/departmentResponse.d.ts +3 -0
- package/build/types/src/responses/departmentsResponse.d.ts +5 -0
- package/build/types/src/responses/formRegisterResponse.d.ts +5 -0
- package/build/types/src/responses/formResponse.d.ts +17 -0
- package/build/types/src/responses/formsResponse.d.ts +4 -0
- package/build/types/src/responses/listsResponse.d.ts +5 -0
- package/build/types/src/responses/memberResponse.d.ts +3 -0
- package/build/types/src/responses/membersResponse.d.ts +5 -0
- package/build/types/src/responses/permissionsDict.d.ts +4 -0
- package/build/types/src/responses/permissionsResponse.d.ts +5 -0
- package/build/types/src/responses/plainListResponse.d.ts +3 -0
- package/build/types/src/responses/profileIdentityResponse.d.ts +5 -0
- package/build/types/src/responses/profileResponse.d.ts +12 -0
- package/build/types/src/responses/responseBase.d.ts +6 -0
- package/build/types/src/responses/roleResponse.d.ts +3 -0
- package/build/types/src/responses/rolesResponse.d.ts +5 -0
- package/build/types/src/responses/syncCatalogResponse.d.ts +10 -0
- package/build/types/src/responses/taskListResponse.d.ts +6 -0
- package/build/types/src/responses/taskResponse.d.ts +5 -0
- package/build/types/src/responses/uploadResponse.d.ts +5 -0
- package/build/types/src/responses//321/201atalogsResponse.d.ts +5 -0
- package/build/types/src/settings/defaults.d.ts +2 -0
- package/build/types/src/settings/endpoints.d.ts +32 -0
- package/package.json +35 -0
|
@@ -0,0 +1,1010 @@
|
|
|
1
|
+
var FormFieldType;
|
|
2
|
+
(function (FormFieldType) {
|
|
3
|
+
FormFieldType["Unknown"] = "unknown";
|
|
4
|
+
FormFieldType["Text"] = "text";
|
|
5
|
+
FormFieldType["Money"] = "money";
|
|
6
|
+
FormFieldType["Number"] = "number";
|
|
7
|
+
FormFieldType["Date"] = "date";
|
|
8
|
+
FormFieldType["Time"] = "time";
|
|
9
|
+
FormFieldType["Checkmark"] = "checkmark";
|
|
10
|
+
FormFieldType["MultipleChoice"] = "multiple_choice";
|
|
11
|
+
FormFieldType["DueDate"] = "due_date";
|
|
12
|
+
FormFieldType["Email"] = "email";
|
|
13
|
+
FormFieldType["Phone"] = "phone";
|
|
14
|
+
FormFieldType["Flag"] = "flag";
|
|
15
|
+
FormFieldType["Step"] = "step";
|
|
16
|
+
FormFieldType["Status"] = "status";
|
|
17
|
+
FormFieldType["CreationDate"] = "creation_date";
|
|
18
|
+
FormFieldType["Note"] = "note";
|
|
19
|
+
FormFieldType["Catalog"] = "catalog";
|
|
20
|
+
FormFieldType["File"] = "file";
|
|
21
|
+
FormFieldType["Person"] = "person";
|
|
22
|
+
FormFieldType["Author"] = "author";
|
|
23
|
+
FormFieldType["Table"] = "table";
|
|
24
|
+
FormFieldType["Title"] = "title";
|
|
25
|
+
FormFieldType["Project"] = "project";
|
|
26
|
+
FormFieldType["FormLink"] = "form_link";
|
|
27
|
+
FormFieldType["DueDateTime"] = "due_date_time";
|
|
28
|
+
})(FormFieldType || (FormFieldType = {}));
|
|
29
|
+
|
|
30
|
+
const dateTimeFieldTypes = [FormFieldType.DueDateTime, FormFieldType.CreationDate];
|
|
31
|
+
const dateFieldTypes = [FormFieldType.Date, FormFieldType.DueDate];
|
|
32
|
+
const timeFieldTypes = [FormFieldType.Time];
|
|
33
|
+
const allDateAndTimeFieldTypes = [...dateFieldTypes, ...dateTimeFieldTypes, ...timeFieldTypes];
|
|
34
|
+
const allDateAndTimeResponseKeys = [
|
|
35
|
+
"create_date",
|
|
36
|
+
"last_modified_date",
|
|
37
|
+
"due_date",
|
|
38
|
+
"due",
|
|
39
|
+
"scheduled_date",
|
|
40
|
+
"scheduled_datetime_utc",
|
|
41
|
+
"close_date",
|
|
42
|
+
];
|
|
43
|
+
const dateRequestKeys = [
|
|
44
|
+
"due_date",
|
|
45
|
+
"scheduled_date",
|
|
46
|
+
];
|
|
47
|
+
const dateTimeRequestKeys = [
|
|
48
|
+
"start_date_utc",
|
|
49
|
+
"end_date_utc",
|
|
50
|
+
"modified_before",
|
|
51
|
+
"modified_after",
|
|
52
|
+
"created_before",
|
|
53
|
+
"created_after",
|
|
54
|
+
"closed_before",
|
|
55
|
+
"closed_after",
|
|
56
|
+
"due",
|
|
57
|
+
"scheduled_datetime_utc",
|
|
58
|
+
"start_time",
|
|
59
|
+
"end_time"
|
|
60
|
+
];
|
|
61
|
+
|
|
62
|
+
var OperatorId;
|
|
63
|
+
(function (OperatorId) {
|
|
64
|
+
OperatorId[OperatorId["Equals"] = 1] = "Equals";
|
|
65
|
+
OperatorId[OperatorId["LessThan"] = 2] = "LessThan";
|
|
66
|
+
OperatorId[OperatorId["GreaterThan"] = 3] = "GreaterThan";
|
|
67
|
+
OperatorId[OperatorId["IsIn"] = 4] = "IsIn";
|
|
68
|
+
OperatorId[OperatorId["Range"] = 5] = "Range";
|
|
69
|
+
OperatorId[OperatorId["MatchPrefix"] = 6] = "MatchPrefix";
|
|
70
|
+
OperatorId[OperatorId["IsEmpty"] = 7] = "IsEmpty";
|
|
71
|
+
})(OperatorId || (OperatorId = {}));
|
|
72
|
+
|
|
73
|
+
function toSearchParams(request) {
|
|
74
|
+
return "?" + new URLSearchParams(Object.entries(request)
|
|
75
|
+
.map(([key, value]) => {
|
|
76
|
+
if (value instanceof Date) {
|
|
77
|
+
if (dateTimeRequestKeys.includes(key))
|
|
78
|
+
return [key, toDateTimeString(value)];
|
|
79
|
+
if (dateRequestKeys.includes(key))
|
|
80
|
+
return [key, toDateString(value)];
|
|
81
|
+
}
|
|
82
|
+
return [key, value];
|
|
83
|
+
}))
|
|
84
|
+
.toString();
|
|
85
|
+
}
|
|
86
|
+
function extractDates(key, value) {
|
|
87
|
+
if (value instanceof Object
|
|
88
|
+
&& value.type
|
|
89
|
+
&& value.value) {
|
|
90
|
+
if (allDateAndTimeFieldTypes.includes(value.type)) {
|
|
91
|
+
value.value = new Date(value.value);
|
|
92
|
+
}
|
|
93
|
+
return value;
|
|
94
|
+
}
|
|
95
|
+
if (allDateAndTimeResponseKeys.includes(key)) {
|
|
96
|
+
value = value && new Date(value);
|
|
97
|
+
}
|
|
98
|
+
return value;
|
|
99
|
+
}
|
|
100
|
+
function packDates(key, value) {
|
|
101
|
+
if (dateRequestKeys.includes(key)) {
|
|
102
|
+
return value && toDateString(value);
|
|
103
|
+
}
|
|
104
|
+
if (dateTimeRequestKeys.includes(key)) {
|
|
105
|
+
return value && toDateTimeString(value);
|
|
106
|
+
}
|
|
107
|
+
if (value instanceof Object
|
|
108
|
+
&& value.type
|
|
109
|
+
&& value.value) {
|
|
110
|
+
if (dateTimeFieldTypes.includes(value.type)) {
|
|
111
|
+
value.value = toDateTimeString(value.value);
|
|
112
|
+
return value;
|
|
113
|
+
}
|
|
114
|
+
if (dateFieldTypes.includes(value.type)) {
|
|
115
|
+
value.value = toDateString(value.value);
|
|
116
|
+
return value;
|
|
117
|
+
}
|
|
118
|
+
if (timeFieldTypes.includes(value.type)) {
|
|
119
|
+
value.value = toTimeString(value.value);
|
|
120
|
+
return value;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return value;
|
|
124
|
+
}
|
|
125
|
+
function trimTailingSlash(url) {
|
|
126
|
+
return url.endsWith('/')
|
|
127
|
+
? url.slice(0, -1)
|
|
128
|
+
: url;
|
|
129
|
+
}
|
|
130
|
+
function toDateTimeString(date) {
|
|
131
|
+
if (typeof date !== "string")
|
|
132
|
+
date = date.toISOString();
|
|
133
|
+
return date.split(".")[0] + "Z";
|
|
134
|
+
}
|
|
135
|
+
function toDateString(date) {
|
|
136
|
+
if (typeof date !== "string")
|
|
137
|
+
date = date.toISOString();
|
|
138
|
+
return date.split("T")[0];
|
|
139
|
+
}
|
|
140
|
+
function toTimeString(date) {
|
|
141
|
+
if (typeof date !== "string")
|
|
142
|
+
date = date.toISOString();
|
|
143
|
+
return date.split("T")[1].slice(0, 5);
|
|
144
|
+
}
|
|
145
|
+
function processFilters(filters) {
|
|
146
|
+
if (!filters)
|
|
147
|
+
return {};
|
|
148
|
+
return filters
|
|
149
|
+
.reduce((prev, { operator_id, values, field_id }) => {
|
|
150
|
+
switch (operator_id) {
|
|
151
|
+
case OperatorId.Equals:
|
|
152
|
+
case OperatorId.MatchPrefix:
|
|
153
|
+
prev[`fld${field_id}`] = values[0];
|
|
154
|
+
break;
|
|
155
|
+
case OperatorId.LessThan:
|
|
156
|
+
prev[`fld${field_id}`] = `lt${values[0]}`;
|
|
157
|
+
break;
|
|
158
|
+
case OperatorId.GreaterThan:
|
|
159
|
+
prev[`fld${field_id}`] = `gt${values[0]}`;
|
|
160
|
+
break;
|
|
161
|
+
case OperatorId.IsIn:
|
|
162
|
+
prev[`fld${field_id}`] = values.join(",");
|
|
163
|
+
break;
|
|
164
|
+
case OperatorId.Range:
|
|
165
|
+
prev[`fld${field_id}`] = `gt${values[0]},lt${values[1]}`;
|
|
166
|
+
break;
|
|
167
|
+
case OperatorId.IsEmpty:
|
|
168
|
+
prev[`fld${field_id}`] = "empty";
|
|
169
|
+
break;
|
|
170
|
+
default:
|
|
171
|
+
return prev;
|
|
172
|
+
}
|
|
173
|
+
return prev;
|
|
174
|
+
}, {});
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
var FilterMask;
|
|
178
|
+
(function (FilterMask) {
|
|
179
|
+
FilterMask[FilterMask["Due"] = 1] = "Due";
|
|
180
|
+
FilterMask[FilterMask["DueDate"] = 2] = "DueDate";
|
|
181
|
+
FilterMask[FilterMask["DueForCurrentStep"] = 4] = "DueForCurrentStep";
|
|
182
|
+
FilterMask[FilterMask["Reminded"] = 8] = "Reminded";
|
|
183
|
+
})(FilterMask || (FilterMask = {}));
|
|
184
|
+
|
|
185
|
+
var CallEventType;
|
|
186
|
+
(function (CallEventType) {
|
|
187
|
+
CallEventType["Show"] = "show";
|
|
188
|
+
})(CallEventType || (CallEventType = {}));
|
|
189
|
+
|
|
190
|
+
var SourceType;
|
|
191
|
+
(function (SourceType) {
|
|
192
|
+
SourceType["Default"] = "default";
|
|
193
|
+
SourceType["FillTable"] = "fill_table";
|
|
194
|
+
})(SourceType || (SourceType = {}));
|
|
195
|
+
|
|
196
|
+
var ActivityAction;
|
|
197
|
+
(function (ActivityAction) {
|
|
198
|
+
ActivityAction["Finished"] = "finished";
|
|
199
|
+
ActivityAction["Reopened"] = "reopened";
|
|
200
|
+
})(ActivityAction || (ActivityAction = {}));
|
|
201
|
+
|
|
202
|
+
var ApprovalChoice;
|
|
203
|
+
(function (ApprovalChoice) {
|
|
204
|
+
ApprovalChoice["Waiting"] = "waiting";
|
|
205
|
+
ApprovalChoice["Approved"] = "approved";
|
|
206
|
+
ApprovalChoice["Rejected"] = "rejected";
|
|
207
|
+
ApprovalChoice["Revoked"] = "revoked";
|
|
208
|
+
ApprovalChoice["Acknowledged"] = "acknowledged";
|
|
209
|
+
})(ApprovalChoice || (ApprovalChoice = {}));
|
|
210
|
+
|
|
211
|
+
var PersonRights;
|
|
212
|
+
(function (PersonRights) {
|
|
213
|
+
PersonRights[PersonRights["None"] = 0] = "None";
|
|
214
|
+
PersonRights[PersonRights["ManageRoles"] = 1] = "ManageRoles";
|
|
215
|
+
PersonRights[PersonRights["CanSeeAllTasks"] = 2] = "CanSeeAllTasks";
|
|
216
|
+
PersonRights[PersonRights["ManagePersonsInOrganization"] = 4] = "ManagePersonsInOrganization";
|
|
217
|
+
PersonRights[PersonRights["EditOrganizationProjects"] = 8] = "EditOrganizationProjects";
|
|
218
|
+
PersonRights[PersonRights["EditOrganizationSettings"] = 16] = "EditOrganizationSettings";
|
|
219
|
+
PersonRights[PersonRights["DeleteMyTasksAndProjects"] = 32] = "DeleteMyTasksAndProjects";
|
|
220
|
+
PersonRights[PersonRights["CloseDeleteAnnouncements"] = 64] = "CloseDeleteAnnouncements";
|
|
221
|
+
PersonRights[PersonRights["BillsPayment"] = 128] = "BillsPayment";
|
|
222
|
+
PersonRights[PersonRights["InvitePersonsToOrganization"] = 256] = "InvitePersonsToOrganization";
|
|
223
|
+
PersonRights[PersonRights["DeleteOtherMembersTasks"] = 512] = "DeleteOtherMembersTasks";
|
|
224
|
+
PersonRights[PersonRights["ManageIntegrationsAndCatalogs"] = 1024] = "ManageIntegrationsAndCatalogs";
|
|
225
|
+
PersonRights[PersonRights["CreateAnnouncement"] = 2048] = "CreateAnnouncement";
|
|
226
|
+
PersonRights[PersonRights["CanDeleteTaskFlagEquivalent"] = 544] = "CanDeleteTaskFlagEquivalent";
|
|
227
|
+
PersonRights[PersonRights["SupervisorRights"] = 221] = "SupervisorRights";
|
|
228
|
+
PersonRights[PersonRights["MaxAdditionalRights"] = 2047] = "MaxAdditionalRights";
|
|
229
|
+
PersonRights[PersonRights["NewOrganizationDefaultRights"] = 2080] = "NewOrganizationDefaultRights";
|
|
230
|
+
PersonRights[PersonRights["UIOrganizationManager"] = 277] = "UIOrganizationManager";
|
|
231
|
+
PersonRights[PersonRights["UIAccountant"] = 128] = "UIAccountant";
|
|
232
|
+
PersonRights[PersonRights["UISupervisor"] = 10] = "UISupervisor";
|
|
233
|
+
PersonRights[PersonRights["UIConfigurationManager"] = 1600] = "UIConfigurationManager";
|
|
234
|
+
PersonRights[PersonRights["UIAdministrator"] = 2015] = "UIAdministrator";
|
|
235
|
+
})(PersonRights || (PersonRights = {}));
|
|
236
|
+
|
|
237
|
+
var ListType;
|
|
238
|
+
(function (ListType) {
|
|
239
|
+
ListType["Private"] = "private";
|
|
240
|
+
ListType["OrganizationWide"] = "org_wide";
|
|
241
|
+
})(ListType || (ListType = {}));
|
|
242
|
+
|
|
243
|
+
var ErrorCodeType;
|
|
244
|
+
(function (ErrorCodeType) {
|
|
245
|
+
ErrorCodeType["ServerError"] = "server_error";
|
|
246
|
+
ErrorCodeType["AuthorizationError"] = "authorization_error";
|
|
247
|
+
ErrorCodeType["TokenNotSpecified"] = "token_not_specified";
|
|
248
|
+
ErrorCodeType["RevokedToken"] = "revoked_token";
|
|
249
|
+
ErrorCodeType["ExpiredToken"] = "expired_token";
|
|
250
|
+
ErrorCodeType["InvalidToken"] = "invalid_token";
|
|
251
|
+
ErrorCodeType["AccountBlocked"] = "account_blocked";
|
|
252
|
+
ErrorCodeType["InvalidCredentials"] = "invalid_credentials";
|
|
253
|
+
ErrorCodeType["InvalidApplicationId"] = "invalid_application_id";
|
|
254
|
+
ErrorCodeType["InvalidFieldId"] = "invalid_field_id";
|
|
255
|
+
ErrorCodeType["InvalidFieldName"] = "invalid_field_name";
|
|
256
|
+
ErrorCodeType["InvalidFieldIdName"] = "invalid_field_id_name";
|
|
257
|
+
ErrorCodeType["NonUniqueName"] = "non_unique_name";
|
|
258
|
+
ErrorCodeType["FieldIdentityMissing"] = "field_identity_missing";
|
|
259
|
+
ErrorCodeType["DuplicateField"] = "duplicate_field";
|
|
260
|
+
ErrorCodeType["InvalidCatalogId"] = "invalid_catalog_id";
|
|
261
|
+
ErrorCodeType["InvalidCatalogItemName"] = "invalid_catalog_item_name";
|
|
262
|
+
ErrorCodeType["NonUniqueCatalogItemName"] = "non_unique_catalog_item_name";
|
|
263
|
+
ErrorCodeType["InvalidCatalogItemId"] = "invalid_catalog_item_id";
|
|
264
|
+
ErrorCodeType["InvalidCatalogItemIdName"] = "catalog_item_id_name_mismatch";
|
|
265
|
+
ErrorCodeType["InvalidEmail"] = "invalid_email";
|
|
266
|
+
ErrorCodeType["NonUniqueEmail"] = "non_unique_email";
|
|
267
|
+
ErrorCodeType["InvalidPersonIdEmail"] = "invalid_person_id_email";
|
|
268
|
+
ErrorCodeType["UnrecognizedAttachmentId"] = "unrecognized_attachment_id";
|
|
269
|
+
ErrorCodeType["RequiredFieldMissing"] = "required_field_missing";
|
|
270
|
+
ErrorCodeType["FieldTypeIsNotSupported"] = "type_is_not_supported";
|
|
271
|
+
ErrorCodeType["IncorrectParametersCount"] = "incorrect_parameters_count";
|
|
272
|
+
ErrorCodeType["FilterTypeIsNotSupported"] = "filter_type_is_not_supported";
|
|
273
|
+
ErrorCodeType["StepFieldDoesNotExists"] = "step_field_does_not_exists";
|
|
274
|
+
ErrorCodeType["NoFileInRequest"] = "no_file_in_request";
|
|
275
|
+
ErrorCodeType["TooLargeRequestLength"] = "too_large_request_length";
|
|
276
|
+
ErrorCodeType["TaskHasNoForm"] = "task_has_no_form";
|
|
277
|
+
ErrorCodeType["RequiredParameterMissing"] = "required_parameter_missing";
|
|
278
|
+
ErrorCodeType["InvalidValueFormat"] = "invalid_value_format";
|
|
279
|
+
ErrorCodeType["InvalidJson"] = "invalid_json";
|
|
280
|
+
ErrorCodeType["EmptyBody"] = "empty_body";
|
|
281
|
+
ErrorCodeType["TextMissing"] = "text_missing";
|
|
282
|
+
ErrorCodeType["FormIdMissing"] = "form_id_missing";
|
|
283
|
+
ErrorCodeType["InvalidPersonId"] = "invalid_person_id";
|
|
284
|
+
ErrorCodeType["DeletedField"] = "deleted_field";
|
|
285
|
+
ErrorCodeType["PersonIdentityMissing"] = "person_identity_missing";
|
|
286
|
+
ErrorCodeType["CatalogItemIdMissing"] = "catalog_identity_missing";
|
|
287
|
+
ErrorCodeType["FormHasNoTask"] = "form_has_no_task";
|
|
288
|
+
ErrorCodeType["EitherDueDateOrDueCanBeSet"] = "either_due_date_or_due_can_be_set";
|
|
289
|
+
ErrorCodeType["NegativeDuration"] = "negative_duration";
|
|
290
|
+
ErrorCodeType["DurationIsTooLong"] = "duration_is_too_long";
|
|
291
|
+
ErrorCodeType["DueMissing"] = "due_missing";
|
|
292
|
+
ErrorCodeType["ScheduledDateInPast"] = "scheduled_date_in_past";
|
|
293
|
+
ErrorCodeType["CannotAddFormProject"] = "cannot_add_form_project";
|
|
294
|
+
ErrorCodeType["FormTemplateCantBeRemovedFromTask"] = "form_template_cant_be_removed_from_task";
|
|
295
|
+
ErrorCodeType["TooManyTaskSteps"] = "too_many_task_steps";
|
|
296
|
+
ErrorCodeType["TooManyComments"] = "too_many_comments";
|
|
297
|
+
ErrorCodeType["InvalidStepNumber"] = "invalid_step_number";
|
|
298
|
+
ErrorCodeType["TaskLimitExceeded"] = "task_limit_exceeded";
|
|
299
|
+
ErrorCodeType["FieldIsInTable"] = "field_is_in_table";
|
|
300
|
+
ErrorCodeType["RequiredTableFieldMissing"] = "required_table_field_missing";
|
|
301
|
+
ErrorCodeType["DepartmentCatalogCanNotBeModified"] = "department_catalog_can_not_be_modified";
|
|
302
|
+
ErrorCodeType["CatalogDuplicateItems"] = "catalog_duplicate_rows";
|
|
303
|
+
ErrorCodeType["EmptyCatalogHeaders"] = "empty_catalog_headers";
|
|
304
|
+
ErrorCodeType["CanNotModifyDeletedCatalog"] = "can_not_modify_deleted_catalog";
|
|
305
|
+
ErrorCodeType["CatalogDuplicateHeaders"] = "catalog_duplicate_headers";
|
|
306
|
+
ErrorCodeType["CanNotModifyFirstColumn"] = "can_not_modify_first_column";
|
|
307
|
+
ErrorCodeType["CatalogHeadersItemsMismatch"] = "catalog_headers_items_mismatch";
|
|
308
|
+
ErrorCodeType["TooManyCatalogItems"] = "too_many_catalog_items";
|
|
309
|
+
ErrorCodeType["CatalogItemMaxLengthExceeded"] = "catalog_item_max_length_exceeded";
|
|
310
|
+
ErrorCodeType["SingleValueIsNotSupported"] = "single_value_is_not_supported";
|
|
311
|
+
ErrorCodeType["ParticipantLimitExceeded"] = "participant_limit_exceeded";
|
|
312
|
+
ErrorCodeType["TableRowsLimitExceeded"] = "table_rows_limit_exceeded";
|
|
313
|
+
ErrorCodeType["TextFieldValueLimitExceeded"] = "text_field_value_limit_exceeded";
|
|
314
|
+
ErrorCodeType["UnableToEditField"] = "unable_to_edit_field";
|
|
315
|
+
ErrorCodeType["EmptyFile"] = "empty_file";
|
|
316
|
+
ErrorCodeType["BadMultipartContent"] = "bad_multipart_content";
|
|
317
|
+
ErrorCodeType["TooManyDecimalPlaces"] = "too_many_decimal_places";
|
|
318
|
+
ErrorCodeType["ExternalCommentEmptyText"] = "external_comment_empty_text";
|
|
319
|
+
ErrorCodeType["SenderAddressFieldMissing"] = "sender_address_field_missing";
|
|
320
|
+
ErrorCodeType["ExternalCommentRecipientNotFound"] = "external_comment_recipient_not_found";
|
|
321
|
+
ErrorCodeType["DefaultMailboxNotFound"] = "default_mailbox_not_found";
|
|
322
|
+
ErrorCodeType["CatalogNullValue"] = "catalog_null_value";
|
|
323
|
+
ErrorCodeType["MaxTextLengthExceeded"] = "max_text_length_exceeded";
|
|
324
|
+
ErrorCodeType["DueOutsideOfBounds"] = "due_outside_of_bounds";
|
|
325
|
+
ErrorCodeType["AttachmentsForbidden"] = "attachments_forbidden";
|
|
326
|
+
ErrorCodeType["UnrecognizedCallGuid"] = "unrecognized_call_guid";
|
|
327
|
+
ErrorCodeType["UnsupportedAttachmentFormat"] = "unsupported_attachment_format";
|
|
328
|
+
ErrorCodeType["ValidationError"] = "validation_error";
|
|
329
|
+
ErrorCodeType["UnrecognizedAccountId"] = "unrecognized_account_id";
|
|
330
|
+
ErrorCodeType["WebhookIsDisabled"] = "webhook_is_disabled";
|
|
331
|
+
ErrorCodeType["TooLargeMessageText"] = "too_large_message_text";
|
|
332
|
+
ErrorCodeType["UnrecognizedMessageType"] = "unrecognized_message_type";
|
|
333
|
+
ErrorCodeType["InvalidFieldMappingCode"] = "invalid_field_mapping_code";
|
|
334
|
+
ErrorCodeType["TooManyAttachments"] = "too_many_attachments";
|
|
335
|
+
ErrorCodeType["UnrecognizedCallId"] = "unrecognized_call_id";
|
|
336
|
+
ErrorCodeType["UnsupportedRecordFileFormat"] = "unsupported_record_file_format";
|
|
337
|
+
ErrorCodeType["UnrecognizedIntegrationGuid"] = "unrecognized_integration_guid";
|
|
338
|
+
ErrorCodeType["LimitExceeded"] = "limit_exceeded";
|
|
339
|
+
ErrorCodeType["MaxSmsTextLengthExceeded"] = "max_sms_text_length_exceeded";
|
|
340
|
+
ErrorCodeType["SmsIntegrationNotConfigured"] = "sms_integration_not_configured";
|
|
341
|
+
ErrorCodeType["AttachmentTooBig"] = "attachment_too_big";
|
|
342
|
+
ErrorCodeType["UncreatedOrDeletedTableRows"] = "invalid_table_row";
|
|
343
|
+
ErrorCodeType["PrivateChannelAccessDenied"] = "private_channel_access_denied";
|
|
344
|
+
ErrorCodeType["PrivateCommentHasForbiddenChanges"] = "private_comment_has_forbidden_changes";
|
|
345
|
+
ErrorCodeType["ItemsCountOutOfRange"] = "items_count_out_of_range";
|
|
346
|
+
ErrorCodeType["CannotAddExternalUser"] = "cannot_add_external_user";
|
|
347
|
+
ErrorCodeType["UnrecognizedTaskId"] = "unrecognized_task_id";
|
|
348
|
+
ErrorCodeType["TooManyDeletedCatalogItems"] = "too_many_deleted_catalog_items";
|
|
349
|
+
ErrorCodeType["FieldCannotHaveMultipleValues"] = "field_cannot_have_multiple_values";
|
|
350
|
+
ErrorCodeType["FieldEditingIsNotAllowed"] = "field_editing_is_not_allowed";
|
|
351
|
+
ErrorCodeType["NonUniqueCode"] = "non_unique_code";
|
|
352
|
+
ErrorCodeType["InvalidFieldCode"] = "invalid_field_code";
|
|
353
|
+
ErrorCodeType["AccessDeniedProject"] = "access_denied_project";
|
|
354
|
+
ErrorCodeType["AccessDeniedTask"] = "access_denied_task";
|
|
355
|
+
ErrorCodeType["AccessDeniedCatalog"] = "access_denied_catalog";
|
|
356
|
+
ErrorCodeType["AccessDeniedForm"] = "access_denied_form";
|
|
357
|
+
ErrorCodeType["AccessDeniedPerson"] = "access_denied_person";
|
|
358
|
+
ErrorCodeType["AccessDeniedCloseTask"] = "access_denied_close_task";
|
|
359
|
+
ErrorCodeType["AccessDeniedReopenTask"] = "access_denied_reopen_task";
|
|
360
|
+
ErrorCodeType["AccessDeniedFileAccessHistory"] = "access_denied_file_access_history";
|
|
361
|
+
ErrorCodeType["AccessDeniedFile"] = "access_denied_file";
|
|
362
|
+
ErrorCodeType["AccessDeniedReport"] = "access_denied_report";
|
|
363
|
+
ErrorCodeType["AccessDenied"] = "access_denied";
|
|
364
|
+
ErrorCodeType["FileIsMissing"] = "file_is_missing";
|
|
365
|
+
ErrorCodeType["TooManyRequests"] = "too_many_requests";
|
|
366
|
+
})(ErrorCodeType || (ErrorCodeType = {}));
|
|
367
|
+
|
|
368
|
+
var Flag;
|
|
369
|
+
(function (Flag) {
|
|
370
|
+
Flag["None"] = "none";
|
|
371
|
+
Flag["Checked"] = "checked";
|
|
372
|
+
Flag["Unchecked"] = "unchecked";
|
|
373
|
+
})(Flag || (Flag = {}));
|
|
374
|
+
|
|
375
|
+
var PermissionLevel;
|
|
376
|
+
(function (PermissionLevel) {
|
|
377
|
+
PermissionLevel["None"] = "none";
|
|
378
|
+
PermissionLevel["Manager"] = "manager";
|
|
379
|
+
PermissionLevel["Member"] = "member";
|
|
380
|
+
PermissionLevel["Administrator"] = "administrator";
|
|
381
|
+
})(PermissionLevel || (PermissionLevel = {}));
|
|
382
|
+
|
|
383
|
+
var PersonType;
|
|
384
|
+
(function (PersonType) {
|
|
385
|
+
PersonType["User"] = "user";
|
|
386
|
+
PersonType["Bot"] = "bot";
|
|
387
|
+
PersonType["Role"] = "role";
|
|
388
|
+
})(PersonType || (PersonType = {}));
|
|
389
|
+
|
|
390
|
+
var SendSmsError;
|
|
391
|
+
(function (SendSmsError) {
|
|
392
|
+
SendSmsError["None"] = "none";
|
|
393
|
+
SendSmsError["Unknown"] = "unknown";
|
|
394
|
+
SendSmsError["Expired"] = "expired";
|
|
395
|
+
SendSmsError["Forbidden"] = "forbidden";
|
|
396
|
+
SendSmsError["Unreachable"] = "unreachable";
|
|
397
|
+
SendSmsError["UnknownStatus"] = "unknown_status";
|
|
398
|
+
SendSmsError["UnableToDeliver"] = "unable_to_deliver";
|
|
399
|
+
SendSmsError["InvalidPhoneNumber"] = "invalid_phone_number";
|
|
400
|
+
SendSmsError["Rejected"] = "rejected";
|
|
401
|
+
})(SendSmsError || (SendSmsError = {}));
|
|
402
|
+
|
|
403
|
+
var SendSmsStatus;
|
|
404
|
+
(function (SendSmsStatus) {
|
|
405
|
+
SendSmsStatus["Sent"] = "sent";
|
|
406
|
+
SendSmsStatus["Delivered"] = "delivered";
|
|
407
|
+
SendSmsStatus["DeliveryFailed"] = "delivery_failed";
|
|
408
|
+
SendSmsStatus["SendFailed"] = "send_failed";
|
|
409
|
+
})(SendSmsStatus || (SendSmsStatus = {}));
|
|
410
|
+
|
|
411
|
+
/******************************************************************************
|
|
412
|
+
Copyright (c) Microsoft Corporation.
|
|
413
|
+
|
|
414
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
415
|
+
purpose with or without fee is hereby granted.
|
|
416
|
+
|
|
417
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
418
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
419
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
420
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
421
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
422
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
423
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
424
|
+
***************************************************************************** */
|
|
425
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
429
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
430
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
431
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
432
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
433
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
434
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
439
|
+
var e = new Error(message);
|
|
440
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
class BaseApi {
|
|
444
|
+
constructor({ token, authRequest, settings }) {
|
|
445
|
+
this._authRequest = null;
|
|
446
|
+
this._moduleSubPath = '';
|
|
447
|
+
if (token)
|
|
448
|
+
this._token = token;
|
|
449
|
+
if (authRequest)
|
|
450
|
+
this._authRequest = authRequest;
|
|
451
|
+
if (settings) {
|
|
452
|
+
this._settings = settings;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
loginDone() {
|
|
456
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
457
|
+
if (!this._authRequest) {
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
460
|
+
const { access_token, api_url, files_url } = yield this._authRequest;
|
|
461
|
+
this._token = access_token;
|
|
462
|
+
this._settings.apiUrl = trimTailingSlash(api_url);
|
|
463
|
+
this._settings.filesUrl = trimTailingSlash(files_url);
|
|
464
|
+
this._authRequest = null;
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
fetchApi(url, method, body, headersOverride) {
|
|
468
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
469
|
+
yield this.loginDone();
|
|
470
|
+
const resp = yield fetch(url, {
|
|
471
|
+
method: method,
|
|
472
|
+
headers: headersOverride || (yield this.defaultHeaders()),
|
|
473
|
+
body: body,
|
|
474
|
+
});
|
|
475
|
+
return yield this._checkResponse(resp);
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
_checkResponse(resp) {
|
|
479
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
480
|
+
if (resp.ok) {
|
|
481
|
+
const contentType = resp.headers.get("Content-Type");
|
|
482
|
+
if (contentType && contentType.includes("application/json")) {
|
|
483
|
+
return JSON.parse(yield resp.text(), extractDates);
|
|
484
|
+
}
|
|
485
|
+
return yield resp.blob();
|
|
486
|
+
}
|
|
487
|
+
else {
|
|
488
|
+
return Promise.reject(yield resp.json());
|
|
489
|
+
}
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
getModulePath() {
|
|
493
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
494
|
+
yield this.loginDone();
|
|
495
|
+
return this._settings.apiUrl + this._moduleSubPath;
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
authorisationHeader() {
|
|
499
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
500
|
+
yield this.loginDone();
|
|
501
|
+
return {
|
|
502
|
+
"Authorization": `Bearer ${this._token}`
|
|
503
|
+
};
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
defaultHeaders() {
|
|
507
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
508
|
+
return Object.assign(Object.assign({}, (yield this.authorisationHeader())), { "Content-Type": "application/json" });
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
var Endpoints;
|
|
514
|
+
(function (Endpoints) {
|
|
515
|
+
Endpoints["Auth"] = "/auth";
|
|
516
|
+
Endpoints["Roles"] = "/roles";
|
|
517
|
+
Endpoints["Profile"] = "/profile";
|
|
518
|
+
Endpoints["Contacts"] = "/contacts";
|
|
519
|
+
Endpoints["Files"] = "/files";
|
|
520
|
+
Endpoints["V4"] = "/v4";
|
|
521
|
+
Endpoints["Upload"] = "/upload";
|
|
522
|
+
Endpoints["Download"] = "/download";
|
|
523
|
+
Endpoints["Lists"] = "/lists";
|
|
524
|
+
Endpoints["Inbox"] = "/inbox";
|
|
525
|
+
Endpoints["ListTasks"] = "/tasks";
|
|
526
|
+
Endpoints["Calendar"] = "/calendar";
|
|
527
|
+
Endpoints["Announcements"] = "/announcements";
|
|
528
|
+
Endpoints["AnnouncementComments"] = "/comments";
|
|
529
|
+
Endpoints["Catalogs"] = "/catalogs";
|
|
530
|
+
Endpoints["Members"] = "/members";
|
|
531
|
+
Endpoints["Tasks"] = "/tasks";
|
|
532
|
+
Endpoints["TasksComments"] = "/comments";
|
|
533
|
+
Endpoints["Forms"] = "/forms";
|
|
534
|
+
Endpoints["FormsRegister"] = "/register";
|
|
535
|
+
Endpoints["FormsPermissions"] = "/permissions";
|
|
536
|
+
Endpoints["EventHistory"] = "/eventhistory";
|
|
537
|
+
Endpoints["FileAccessHistory"] = "/fileaccesshistory";
|
|
538
|
+
Endpoints["TaskAccessHistory"] = "/taskaccesshistory";
|
|
539
|
+
Endpoints["TaskExportHistory"] = "/taskexporthistory";
|
|
540
|
+
Endpoints["RegistryDownloadHistory"] = "/registrydownloadhistory";
|
|
541
|
+
Endpoints["Integrations"] = "/integrations";
|
|
542
|
+
Endpoints["Call"] = "/call";
|
|
543
|
+
Endpoints["AttachCallRecord"] = "/attachcallrecord";
|
|
544
|
+
Endpoints["Bots"] = "/bots";
|
|
545
|
+
})(Endpoints || (Endpoints = {}));
|
|
546
|
+
|
|
547
|
+
class RoleApi extends BaseApi {
|
|
548
|
+
constructor() {
|
|
549
|
+
super(...arguments);
|
|
550
|
+
this._moduleSubPath = Endpoints.Roles;
|
|
551
|
+
}
|
|
552
|
+
create(request) {
|
|
553
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
554
|
+
return yield this.fetchApi(yield this.getModulePath(), "POST", JSON.stringify(request));
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
get(_a) {
|
|
558
|
+
return __awaiter(this, arguments, void 0, function* ({ id }) {
|
|
559
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${id}`, "GET");
|
|
560
|
+
});
|
|
561
|
+
}
|
|
562
|
+
getAll(request) {
|
|
563
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
564
|
+
const searchParams = request ? toSearchParams(request) : "";
|
|
565
|
+
return yield this.fetchApi((yield this.getModulePath()) + searchParams, "GET");
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
update(request) {
|
|
569
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
570
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${request.id}`, "PUT", JSON.stringify(request));
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
const defaults = {
|
|
576
|
+
authUrl: "https://accounts.pyrus.com/api/v4",
|
|
577
|
+
apiUrl: "https://api.pyrus.com/v4",
|
|
578
|
+
filesUrl: "https://files.pyrus.com"
|
|
579
|
+
};
|
|
580
|
+
|
|
581
|
+
class ProfileApi extends BaseApi {
|
|
582
|
+
constructor() {
|
|
583
|
+
super(...arguments);
|
|
584
|
+
this._moduleSubPath = Endpoints.Profile;
|
|
585
|
+
}
|
|
586
|
+
get(request) {
|
|
587
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
588
|
+
const searchParams = request ? toSearchParams(request) : "";
|
|
589
|
+
return yield this.fetchApi((yield this.getModulePath()) + searchParams, "GET");
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
class ContactsApi extends BaseApi {
|
|
595
|
+
constructor() {
|
|
596
|
+
super(...arguments);
|
|
597
|
+
this._moduleSubPath = Endpoints.Contacts;
|
|
598
|
+
}
|
|
599
|
+
getAll(request) {
|
|
600
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
601
|
+
const searchParams = request ? toSearchParams(request) : "";
|
|
602
|
+
return yield this.fetchApi((yield this.getModulePath()) + searchParams, "GET");
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
class FilesApi extends BaseApi {
|
|
608
|
+
upload(file, filename) {
|
|
609
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
610
|
+
const formData = new FormData();
|
|
611
|
+
formData.append(filename, file, filename);
|
|
612
|
+
return yield this.fetchApi((yield this._filePath()) + Endpoints.Upload, "POST", formData, yield this.authorisationHeader());
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
download(_a) {
|
|
616
|
+
return __awaiter(this, arguments, void 0, function* ({ id }) {
|
|
617
|
+
return yield this.fetchApi((yield this._filePath()) + Endpoints.Download + `/${id}`, "GET");
|
|
618
|
+
});
|
|
619
|
+
}
|
|
620
|
+
_filePath() {
|
|
621
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
622
|
+
yield this.loginDone();
|
|
623
|
+
if (this._settings.filesUrl)
|
|
624
|
+
return this._settings.filesUrl + Endpoints.V4 + Endpoints.Files;
|
|
625
|
+
return this._settings.apiUrl + Endpoints.Files;
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
class ListsApi extends BaseApi {
|
|
631
|
+
constructor() {
|
|
632
|
+
super(...arguments);
|
|
633
|
+
this._moduleSubPath = Endpoints.Lists;
|
|
634
|
+
}
|
|
635
|
+
getAll() {
|
|
636
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
637
|
+
return yield this.fetchApi(yield this.getModulePath(), "GET");
|
|
638
|
+
});
|
|
639
|
+
}
|
|
640
|
+
getTasksInList(listId, request) {
|
|
641
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
642
|
+
const searchParams = request ? toSearchParams(request) : "";
|
|
643
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${listId}` + Endpoints.ListTasks + searchParams, "GET");
|
|
644
|
+
});
|
|
645
|
+
}
|
|
646
|
+
getInbox(request) {
|
|
647
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
648
|
+
yield this.loginDone();
|
|
649
|
+
const searchParams = request ? toSearchParams(request) : "";
|
|
650
|
+
return yield this.fetchApi(this._settings.apiUrl + Endpoints.Inbox + searchParams, "GET");
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
create(request) {
|
|
654
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
655
|
+
return yield this.fetchApi(yield this.getModulePath(), "PUT", JSON.stringify(request));
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
delete(request) {
|
|
659
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
660
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${request.id}`, "DELETE", JSON.stringify(request));
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
update(request) {
|
|
664
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
665
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${request.id}`, "POST", JSON.stringify(request));
|
|
666
|
+
});
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
class CalendarApi extends BaseApi {
|
|
671
|
+
constructor() {
|
|
672
|
+
super(...arguments);
|
|
673
|
+
this._moduleSubPath = Endpoints.Calendar;
|
|
674
|
+
}
|
|
675
|
+
getTasks(request) {
|
|
676
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
677
|
+
return yield this.fetchApi((yield this.getModulePath()) + toSearchParams(request), "GET");
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
class AnnouncementsApi extends BaseApi {
|
|
683
|
+
constructor() {
|
|
684
|
+
super(...arguments);
|
|
685
|
+
this._moduleSubPath = Endpoints.Announcements;
|
|
686
|
+
}
|
|
687
|
+
getAll() {
|
|
688
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
689
|
+
return yield this.fetchApi(yield this.getModulePath(), "GET");
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
get(_a) {
|
|
693
|
+
return __awaiter(this, arguments, void 0, function* ({ id }) {
|
|
694
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${id}`, "GET");
|
|
695
|
+
});
|
|
696
|
+
}
|
|
697
|
+
create(request) {
|
|
698
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
699
|
+
return yield this.fetchApi(yield this.getModulePath(), "POST", JSON.stringify(request));
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
addComment(id, request) {
|
|
703
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
704
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${id}` + Endpoints.AnnouncementComments, "POST", JSON.stringify(request));
|
|
705
|
+
});
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
class CatalogsApi extends BaseApi {
|
|
710
|
+
constructor() {
|
|
711
|
+
super(...arguments);
|
|
712
|
+
this._moduleSubPath = Endpoints.Catalogs;
|
|
713
|
+
}
|
|
714
|
+
getAll() {
|
|
715
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
716
|
+
return yield this.fetchApi(yield this.getModulePath(), "GET");
|
|
717
|
+
});
|
|
718
|
+
}
|
|
719
|
+
get(_a) {
|
|
720
|
+
return __awaiter(this, arguments, void 0, function* ({ id }) {
|
|
721
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${id}`, "GET");
|
|
722
|
+
});
|
|
723
|
+
}
|
|
724
|
+
create(request) {
|
|
725
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
726
|
+
return yield this.fetchApi(yield this.getModulePath(), "PUT", JSON.stringify(request));
|
|
727
|
+
});
|
|
728
|
+
}
|
|
729
|
+
sync(request) {
|
|
730
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
731
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${request.id}`, "POST", JSON.stringify(request));
|
|
732
|
+
});
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
class MembersApi extends BaseApi {
|
|
737
|
+
constructor() {
|
|
738
|
+
super(...arguments);
|
|
739
|
+
this._moduleSubPath = Endpoints.Members;
|
|
740
|
+
}
|
|
741
|
+
create(request) {
|
|
742
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
743
|
+
return yield this.fetchApi(yield this.getModulePath(), "POST", JSON.stringify(request));
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
get(_a) {
|
|
747
|
+
return __awaiter(this, arguments, void 0, function* ({ id }) {
|
|
748
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${id}`, "GET");
|
|
749
|
+
});
|
|
750
|
+
}
|
|
751
|
+
getAll(request) {
|
|
752
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
753
|
+
const searchParams = request ? toSearchParams(request) : "";
|
|
754
|
+
return yield this.fetchApi((yield this.getModulePath()) + searchParams, "GET");
|
|
755
|
+
});
|
|
756
|
+
}
|
|
757
|
+
update(request) {
|
|
758
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
759
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${request.id}`, "PUT", JSON.stringify(request));
|
|
760
|
+
});
|
|
761
|
+
}
|
|
762
|
+
delete(_a) {
|
|
763
|
+
return __awaiter(this, arguments, void 0, function* ({ id }) {
|
|
764
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${id}`, "DELETE");
|
|
765
|
+
});
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
class TasksApi extends BaseApi {
|
|
770
|
+
constructor() {
|
|
771
|
+
super(...arguments);
|
|
772
|
+
this._moduleSubPath = Endpoints.Tasks;
|
|
773
|
+
}
|
|
774
|
+
get(_a) {
|
|
775
|
+
return __awaiter(this, arguments, void 0, function* ({ id }) {
|
|
776
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${id}`, "GET");
|
|
777
|
+
});
|
|
778
|
+
}
|
|
779
|
+
create(request) {
|
|
780
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
781
|
+
return yield this.fetchApi(yield this.getModulePath(), "POST", JSON.stringify(request, packDates));
|
|
782
|
+
});
|
|
783
|
+
}
|
|
784
|
+
addComment(id, request) {
|
|
785
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
786
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${id}` + Endpoints.TasksComments, "POST", JSON.stringify(request, packDates));
|
|
787
|
+
});
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
class FormsApi extends BaseApi {
|
|
792
|
+
constructor() {
|
|
793
|
+
super(...arguments);
|
|
794
|
+
this._moduleSubPath = Endpoints.Forms;
|
|
795
|
+
}
|
|
796
|
+
get(_a) {
|
|
797
|
+
return __awaiter(this, arguments, void 0, function* ({ id }) {
|
|
798
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${id}`, "GET");
|
|
799
|
+
});
|
|
800
|
+
}
|
|
801
|
+
getAll() {
|
|
802
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
803
|
+
return yield this.fetchApi(yield this.getModulePath(), "GET");
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
getTasks(id, request) {
|
|
807
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
808
|
+
const processedRequest = Object.assign(Object.assign({}, request), processFilters(request && request.filters));
|
|
809
|
+
if (processedRequest.filters)
|
|
810
|
+
delete processedRequest.filters;
|
|
811
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${id}` + Endpoints.FormsRegister, "POST", JSON.stringify(processedRequest, packDates));
|
|
812
|
+
});
|
|
813
|
+
}
|
|
814
|
+
getPermissions(_a) {
|
|
815
|
+
return __awaiter(this, arguments, void 0, function* ({ id }) {
|
|
816
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${id}` + Endpoints.FormsPermissions, "GET");
|
|
817
|
+
});
|
|
818
|
+
}
|
|
819
|
+
setPermissions(id, request) {
|
|
820
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
821
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${id}` + Endpoints.FormsPermissions, "POST", JSON.stringify(request));
|
|
822
|
+
});
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
class LogsApi extends BaseApi {
|
|
827
|
+
getEvents(request) {
|
|
828
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
829
|
+
yield this.loginDone();
|
|
830
|
+
const searchParams = request ? toSearchParams(request) : "";
|
|
831
|
+
return yield this.fetchApi(this._settings.apiUrl + Endpoints.EventHistory + searchParams, "GET");
|
|
832
|
+
});
|
|
833
|
+
}
|
|
834
|
+
getFileAccess(request) {
|
|
835
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
836
|
+
yield this.loginDone();
|
|
837
|
+
const searchParams = request ? toSearchParams(request) : "";
|
|
838
|
+
return yield this.fetchApi(this._settings.apiUrl + Endpoints.FileAccessHistory + searchParams, "GET");
|
|
839
|
+
});
|
|
840
|
+
}
|
|
841
|
+
getTaskAccess(request) {
|
|
842
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
843
|
+
yield this.loginDone();
|
|
844
|
+
const searchParams = request ? toSearchParams(request) : "";
|
|
845
|
+
return yield this.fetchApi(this._settings.apiUrl + Endpoints.TaskAccessHistory + searchParams, "GET");
|
|
846
|
+
});
|
|
847
|
+
}
|
|
848
|
+
getTaskExport(request) {
|
|
849
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
850
|
+
yield this.loginDone();
|
|
851
|
+
const searchParams = request ? toSearchParams(request) : "";
|
|
852
|
+
return yield this.fetchApi(this._settings.apiUrl + Endpoints.TaskExportHistory + searchParams, "GET");
|
|
853
|
+
});
|
|
854
|
+
}
|
|
855
|
+
getRegistryDownload(request) {
|
|
856
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
857
|
+
yield this.loginDone();
|
|
858
|
+
const searchParams = request ? toSearchParams(request) : "";
|
|
859
|
+
return yield this.fetchApi(this._settings.apiUrl + Endpoints.RegistryDownloadHistory + searchParams, "GET");
|
|
860
|
+
});
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
class CallApi extends BaseApi {
|
|
865
|
+
constructor() {
|
|
866
|
+
super(...arguments);
|
|
867
|
+
this._moduleSubPath = Endpoints.Integrations;
|
|
868
|
+
}
|
|
869
|
+
registerCall(request) {
|
|
870
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
871
|
+
return yield this.fetchApi((yield this.getModulePath()) + Endpoints.Call, "POST", JSON.stringify(request));
|
|
872
|
+
});
|
|
873
|
+
}
|
|
874
|
+
attachCallRecord(request) {
|
|
875
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
876
|
+
return yield this.fetchApi((yield this.getModulePath()) + Endpoints.AttachCallRecord, "POST", JSON.stringify(request));
|
|
877
|
+
});
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
class BotApi extends BaseApi {
|
|
882
|
+
constructor() {
|
|
883
|
+
super(...arguments);
|
|
884
|
+
this._moduleSubPath = Endpoints.Bots;
|
|
885
|
+
}
|
|
886
|
+
create(request) {
|
|
887
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
888
|
+
return yield this.fetchApi(yield this.getModulePath(), "POST", JSON.stringify(request));
|
|
889
|
+
});
|
|
890
|
+
}
|
|
891
|
+
get(_a) {
|
|
892
|
+
return __awaiter(this, arguments, void 0, function* ({ id }) {
|
|
893
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${id}`, "GET");
|
|
894
|
+
});
|
|
895
|
+
}
|
|
896
|
+
getAll(request) {
|
|
897
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
898
|
+
const searchParams = request ? toSearchParams(request) : "";
|
|
899
|
+
return yield this.fetchApi((yield this.getModulePath()) + searchParams, "GET");
|
|
900
|
+
});
|
|
901
|
+
}
|
|
902
|
+
update(request) {
|
|
903
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
904
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${request.id}`, "PUT", JSON.stringify(request));
|
|
905
|
+
});
|
|
906
|
+
}
|
|
907
|
+
delete(request) {
|
|
908
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
909
|
+
return yield this.fetchApi((yield this.getModulePath()) + `/${request.id}`, "DELETE", JSON.stringify(request));
|
|
910
|
+
});
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
class PyrusApiClient extends BaseApi {
|
|
915
|
+
constructor(auth, settings) {
|
|
916
|
+
const currentSettings = !!settings
|
|
917
|
+
? Object.assign(Object.assign({}, defaults), settings) : defaults;
|
|
918
|
+
super({ settings: currentSettings });
|
|
919
|
+
if (typeof auth === "string")
|
|
920
|
+
this._token = auth;
|
|
921
|
+
else
|
|
922
|
+
this._authRequest = this._authenticateClient(auth);
|
|
923
|
+
}
|
|
924
|
+
_authenticateClient(auth) {
|
|
925
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
926
|
+
return this.fetchApi(this._settings.authUrl + Endpoints.Auth, "POST", JSON.stringify(auth), {
|
|
927
|
+
"Content-Type": "application/json",
|
|
928
|
+
});
|
|
929
|
+
});
|
|
930
|
+
}
|
|
931
|
+
get initParams() {
|
|
932
|
+
return {
|
|
933
|
+
authRequest: this._authRequest,
|
|
934
|
+
token: this._token,
|
|
935
|
+
settings: this._settings,
|
|
936
|
+
};
|
|
937
|
+
}
|
|
938
|
+
get role() {
|
|
939
|
+
if (!this._role)
|
|
940
|
+
this._role = new RoleApi(this.initParams);
|
|
941
|
+
return this._role;
|
|
942
|
+
}
|
|
943
|
+
get profile() {
|
|
944
|
+
if (!this._profile)
|
|
945
|
+
this._profile = new ProfileApi(this.initParams);
|
|
946
|
+
return this._profile;
|
|
947
|
+
}
|
|
948
|
+
get contacts() {
|
|
949
|
+
if (!this._contacts)
|
|
950
|
+
this._contacts = new ContactsApi(this.initParams);
|
|
951
|
+
return this._contacts;
|
|
952
|
+
}
|
|
953
|
+
get files() {
|
|
954
|
+
if (!this._files)
|
|
955
|
+
this._files = new FilesApi(this.initParams);
|
|
956
|
+
return this._files;
|
|
957
|
+
}
|
|
958
|
+
get lists() {
|
|
959
|
+
if (!this._lists)
|
|
960
|
+
this._lists = new ListsApi(this.initParams);
|
|
961
|
+
return this._lists;
|
|
962
|
+
}
|
|
963
|
+
get calendar() {
|
|
964
|
+
if (!this._calendar)
|
|
965
|
+
this._calendar = new CalendarApi(this.initParams);
|
|
966
|
+
return this._calendar;
|
|
967
|
+
}
|
|
968
|
+
get announcements() {
|
|
969
|
+
if (!this._announcements)
|
|
970
|
+
this._announcements = new AnnouncementsApi(this.initParams);
|
|
971
|
+
return this._announcements;
|
|
972
|
+
}
|
|
973
|
+
get catalogs() {
|
|
974
|
+
if (!this._catalogs)
|
|
975
|
+
this._catalogs = new CatalogsApi(this.initParams);
|
|
976
|
+
return this._catalogs;
|
|
977
|
+
}
|
|
978
|
+
get members() {
|
|
979
|
+
if (!this._members)
|
|
980
|
+
this._members = new MembersApi(this.initParams);
|
|
981
|
+
return this._members;
|
|
982
|
+
}
|
|
983
|
+
get tasks() {
|
|
984
|
+
if (!this._tasks)
|
|
985
|
+
this._tasks = new TasksApi(this.initParams);
|
|
986
|
+
return this._tasks;
|
|
987
|
+
}
|
|
988
|
+
get forms() {
|
|
989
|
+
if (!this._forms)
|
|
990
|
+
this._forms = new FormsApi(this.initParams);
|
|
991
|
+
return this._forms;
|
|
992
|
+
}
|
|
993
|
+
get logs() {
|
|
994
|
+
if (!this._logs)
|
|
995
|
+
this._logs = new LogsApi(this.initParams);
|
|
996
|
+
return this._logs;
|
|
997
|
+
}
|
|
998
|
+
get call() {
|
|
999
|
+
if (!this._call)
|
|
1000
|
+
this._call = new CallApi(this.initParams);
|
|
1001
|
+
return this._call;
|
|
1002
|
+
}
|
|
1003
|
+
get bot() {
|
|
1004
|
+
if (!this._bot)
|
|
1005
|
+
this._bot = new BotApi(this.initParams);
|
|
1006
|
+
return this._bot;
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
export { ActivityAction, ApprovalChoice, CallEventType, ErrorCodeType, FilterMask, Flag, FormFieldType, ListType, OperatorId, PermissionLevel, PersonRights, PersonType, PyrusApiClient, SendSmsError, SendSmsStatus, SourceType, toDateString, toDateTimeString, toTimeString };
|