pyrus-api 1.0.2 → 2.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/build/cjs/index.cjs +240 -234
- package/build/esm/index.js +223 -231
- package/build/types/index.d.ts +1426 -51
- package/package.json +3 -2
- package/build/types/src/api/announcementsApi.d.ts +0 -14
- package/build/types/src/api/baseApi.d.ts +0 -21
- package/build/types/src/api/botApi.d.ts +0 -17
- package/build/types/src/api/calendarApi.d.ts +0 -8
- package/build/types/src/api/callApi.d.ts +0 -11
- package/build/types/src/api/catalogsApi.d.ts +0 -22
- package/build/types/src/api/contactsApi.d.ts +0 -8
- package/build/types/src/api/filesApi.d.ts +0 -8
- package/build/types/src/api/formsApi.d.ts +0 -17
- package/build/types/src/api/index.d.ts +0 -1
- package/build/types/src/api/listsApi.d.ts +0 -20
- package/build/types/src/api/logsApi.d.ts +0 -13
- package/build/types/src/api/membersApi.d.ts +0 -21
- package/build/types/src/api/profileApi.d.ts +0 -8
- package/build/types/src/api/pyrusApiClient.d.ts +0 -57
- package/build/types/src/api/roleApi.d.ts +0 -15
- package/build/types/src/api/tasksApi.d.ts +0 -18
- package/build/types/src/entities/TaskWithComments.d.ts +0 -7
- package/build/types/src/entities/announcementComment.d.ts +0 -12
- package/build/types/src/entities/announcementWithComments.d.ts +0 -13
- package/build/types/src/entities/approval.d.ts +0 -7
- package/build/types/src/entities/attachedFile.d.ts +0 -9
- package/build/types/src/entities/bot.d.ts +0 -15
- package/build/types/src/entities/catalogHeader.d.ts +0 -9
- package/build/types/src/entities/catalogInfo.d.ts +0 -19
- package/build/types/src/entities/catalogItem.d.ts +0 -12
- package/build/types/src/entities/channel.d.ts +0 -8
- package/build/types/src/entities/channelUser.d.ts +0 -4
- package/build/types/src/entities/columnSettings.d.ts +0 -6
- package/build/types/src/entities/commentDescription.d.ts +0 -6
- package/build/types/src/entities/department.d.ts +0 -7
- package/build/types/src/entities/dueFilter.d.ts +0 -3
- package/build/types/src/entities/formFieldInfo.d.ts +0 -21
- package/build/types/src/entities/formFields/formField.d.ts +0 -26
- package/build/types/src/entities/formFields/formFieldAuthor.d.ts +0 -7
- package/build/types/src/entities/formFields/formFieldBase.d.ts +0 -12
- package/build/types/src/entities/formFields/formFieldCatalog.d.ts +0 -15
- package/build/types/src/entities/formFields/formFieldCheckmark.d.ts +0 -7
- package/build/types/src/entities/formFields/formFieldCreateDate.d.ts +0 -6
- package/build/types/src/entities/formFields/formFieldDate.d.ts +0 -6
- package/build/types/src/entities/formFields/formFieldDueDate.d.ts +0 -6
- package/build/types/src/entities/formFields/formFieldDueDateTime.d.ts +0 -6
- package/build/types/src/entities/formFields/formFieldEmail.d.ts +0 -6
- package/build/types/src/entities/formFields/formFieldFile.d.ts +0 -7
- package/build/types/src/entities/formFields/formFieldFlag.d.ts +0 -7
- package/build/types/src/entities/formFields/formFieldFormLink.d.ts +0 -7
- package/build/types/src/entities/formFields/formFieldMoney.d.ts +0 -6
- package/build/types/src/entities/formFields/formFieldMultipleChoice.d.ts +0 -14
- package/build/types/src/entities/formFields/formFieldNewFile.d.ts +0 -5
- package/build/types/src/entities/formFields/formFieldNote.d.ts +0 -6
- package/build/types/src/entities/formFields/formFieldNumber.d.ts +0 -6
- package/build/types/src/entities/formFields/formFieldPerson.d.ts +0 -7
- package/build/types/src/entities/formFields/formFieldPhone.d.ts +0 -6
- package/build/types/src/entities/formFields/formFieldProject.d.ts +0 -15
- package/build/types/src/entities/formFields/formFieldStatus.d.ts +0 -7
- package/build/types/src/entities/formFields/formFieldStep.d.ts +0 -6
- package/build/types/src/entities/formFields/formFieldTable.d.ts +0 -14
- package/build/types/src/entities/formFields/formFieldText.d.ts +0 -6
- package/build/types/src/entities/formFields/formFieldTime.d.ts +0 -6
- package/build/types/src/entities/formFields/formFieldTitle.d.ts +0 -13
- package/build/types/src/entities/formLink.d.ts +0 -5
- package/build/types/src/entities/formMapping.d.ts +0 -16
- package/build/types/src/entities/newFile.d.ts +0 -7
- package/build/types/src/entities/organization.d.ts +0 -9
- package/build/types/src/entities/person.d.ts +0 -19
- package/build/types/src/entities/plainTaskList.d.ts +0 -15
- package/build/types/src/entities/printForm.d.ts +0 -4
- package/build/types/src/entities/role.d.ts +0 -10
- package/build/types/src/entities/sessionLifespan.d.ts +0 -4
- package/build/types/src/entities/sessionRestriction.d.ts +0 -9
- package/build/types/src/entities/settings.d.ts +0 -5
- package/build/types/src/entities/smsInfo.d.ts +0 -8
- package/build/types/src/entities/step.d.ts +0 -5
- package/build/types/src/entities/subscriber.d.ts +0 -6
- package/build/types/src/entities/task.d.ts +0 -26
- package/build/types/src/entities/taskComment.d.ts +0 -50
- package/build/types/src/entities/taskHeader.d.ts +0 -11
- package/build/types/src/entities/taskList.d.ts +0 -4
- package/build/types/src/enums/activityAction.d.ts +0 -4
- package/build/types/src/enums/approvalChoice.d.ts +0 -7
- package/build/types/src/enums/callEventType.d.ts +0 -3
- package/build/types/src/enums/callStatus.d.ts +0 -7
- package/build/types/src/enums/channelType.d.ts +0 -23
- package/build/types/src/enums/checkmark.d.ts +0 -4
- package/build/types/src/enums/disconnectParty.d.ts +0 -6
- package/build/types/src/enums/errorCodeType.d.ts +0 -123
- package/build/types/src/enums/filterMask.d.ts +0 -20
- package/build/types/src/enums/flag.d.ts +0 -5
- package/build/types/src/enums/formFieldType.d.ts +0 -27
- package/build/types/src/enums/listType.d.ts +0 -4
- package/build/types/src/enums/operatorId.d.ts +0 -9
- package/build/types/src/enums/permissionLevel.d.ts +0 -6
- package/build/types/src/enums/personRights.d.ts +0 -24
- package/build/types/src/enums/personType.d.ts +0 -5
- package/build/types/src/enums/sendSmsError.d.ts +0 -11
- package/build/types/src/enums/sendSmsStatus.d.ts +0 -6
- package/build/types/src/enums/sourceType.d.ts +0 -4
- package/build/types/src/enums/status.d.ts +0 -4
- package/build/types/src/helpers/constants.d.ts +0 -8
- package/build/types/src/helpers/functions.d.ts +0 -13
- package/build/types/src/helpers/types.d.ts +0 -4
- package/build/types/src/requests/announcementCommentRequest.d.ts +0 -6
- package/build/types/src/requests/announcementRequest.d.ts +0 -6
- package/build/types/src/requests/attachCallRecordRequest.d.ts +0 -37
- package/build/types/src/requests/authRequest.d.ts +0 -11
- package/build/types/src/requests/calendarTasksRequest.d.ts +0 -24
- package/build/types/src/requests/callRequest.d.ts +0 -27
- package/build/types/src/requests/catalogRequestBase.d.ts +0 -15
- package/build/types/src/requests/changePermissionsRequest.d.ts +0 -4
- package/build/types/src/requests/contactsRequest.d.ts +0 -3
- package/build/types/src/requests/createBotRequest.d.ts +0 -5
- package/build/types/src/requests/createCallRequest.d.ts +0 -6
- package/build/types/src/requests/createCatalogRequest.d.ts +0 -6
- package/build/types/src/requests/createDepartmentRequest.d.ts +0 -6
- package/build/types/src/requests/createListRequest.d.ts +0 -12
- package/build/types/src/requests/createMemberRequest.d.ts +0 -12
- package/build/types/src/requests/createRoleRequest.d.ts +0 -5
- package/build/types/src/requests/deleteBotRequest.d.ts +0 -4
- package/build/types/src/requests/deleteRoleRequest.d.ts +0 -4
- package/build/types/src/requests/formFilter.d.ts +0 -6
- package/build/types/src/requests/formRegisterRequest.d.ts +0 -26
- package/build/types/src/requests/getAllRequest.d.ts +0 -3
- package/build/types/src/requests/getMessageRequest.d.ts +0 -10
- package/build/types/src/requests/inboxRequest.d.ts +0 -8
- package/build/types/src/requests/personIdentity.d.ts +0 -4
- package/build/types/src/requests/profileRequest.d.ts +0 -3
- package/build/types/src/requests/setAvatarRequest.d.ts +0 -4
- package/build/types/src/requests/syncCatalogRequest.d.ts +0 -6
- package/build/types/src/requests/taskCommentRequest.d.ts +0 -39
- package/build/types/src/requests/taskListRequest.d.ts +0 -10
- package/build/types/src/requests/taskRequest.d.ts +0 -24
- package/build/types/src/requests/updateBotRequest.d.ts +0 -13
- package/build/types/src/requests/updateDepartmentRequest.d.ts +0 -8
- package/build/types/src/requests/updateListRequest.d.ts +0 -14
- package/build/types/src/requests/updateMemberRequest.d.ts +0 -15
- package/build/types/src/requests/updateRoleRequest.d.ts +0 -8
- package/build/types/src/responses/announcementResponse.d.ts +0 -5
- package/build/types/src/responses/announcementsResponse.d.ts +0 -5
- package/build/types/src/responses/authResponse.d.ts +0 -6
- package/build/types/src/responses/botResponse.d.ts +0 -3
- package/build/types/src/responses/botsResponse.d.ts +0 -5
- package/build/types/src/responses/calendarResponse.d.ts +0 -6
- package/build/types/src/responses/callResponse.d.ts +0 -4
- package/build/types/src/responses/catalogItemResponse.d.ts +0 -4
- package/build/types/src/responses/catalogResponse.d.ts +0 -18
- package/build/types/src/responses/contactsResponse.d.ts +0 -5
- package/build/types/src/responses/departmentResponse.d.ts +0 -3
- package/build/types/src/responses/departmentsResponse.d.ts +0 -5
- package/build/types/src/responses/formRegisterResponse.d.ts +0 -5
- package/build/types/src/responses/formResponse.d.ts +0 -17
- package/build/types/src/responses/formsResponse.d.ts +0 -4
- package/build/types/src/responses/listsResponse.d.ts +0 -5
- package/build/types/src/responses/memberResponse.d.ts +0 -3
- package/build/types/src/responses/membersResponse.d.ts +0 -5
- package/build/types/src/responses/permissionsDict.d.ts +0 -4
- package/build/types/src/responses/permissionsResponse.d.ts +0 -5
- package/build/types/src/responses/plainListResponse.d.ts +0 -3
- package/build/types/src/responses/profileIdentityResponse.d.ts +0 -5
- package/build/types/src/responses/profileResponse.d.ts +0 -12
- package/build/types/src/responses/responseBase.d.ts +0 -6
- package/build/types/src/responses/roleResponse.d.ts +0 -3
- package/build/types/src/responses/rolesResponse.d.ts +0 -5
- package/build/types/src/responses/syncCatalogResponse.d.ts +0 -10
- package/build/types/src/responses/taskListResponse.d.ts +0 -6
- package/build/types/src/responses/taskResponse.d.ts +0 -5
- package/build/types/src/responses/uploadResponse.d.ts +0 -5
- package/build/types/src/responses//321/201atalogsResponse.d.ts +0 -5
- package/build/types/src/settings/defaults.d.ts +0 -2
- package/build/types/src/settings/endpoints.d.ts +0 -32
package/build/esm/index.js
CHANGED
|
@@ -1,31 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
})(FormFieldType || (FormFieldType = {}));
|
|
1
|
+
const FormFieldType = {
|
|
2
|
+
Unknown: "unknown",
|
|
3
|
+
Text: "text",
|
|
4
|
+
Money: "money",
|
|
5
|
+
Number: "number",
|
|
6
|
+
Date: "date",
|
|
7
|
+
Time: "time",
|
|
8
|
+
Checkmark: "checkmark",
|
|
9
|
+
MultipleChoice: "multiple_choice",
|
|
10
|
+
DueDate: "due_date",
|
|
11
|
+
Email: "email",
|
|
12
|
+
Phone: "phone",
|
|
13
|
+
Flag: "flag",
|
|
14
|
+
Step: "step",
|
|
15
|
+
Status: "status",
|
|
16
|
+
CreationDate: "creation_date",
|
|
17
|
+
Note: "note",
|
|
18
|
+
Catalog: "catalog",
|
|
19
|
+
File: "file",
|
|
20
|
+
Person: "person",
|
|
21
|
+
Author: "author",
|
|
22
|
+
Table: "table",
|
|
23
|
+
Title: "title",
|
|
24
|
+
Project: "project",
|
|
25
|
+
FormLink: "form_link",
|
|
26
|
+
DueDateTime: "due_date_time",
|
|
27
|
+
};
|
|
29
28
|
|
|
30
29
|
const dateTimeFieldTypes = [
|
|
31
30
|
FormFieldType.DueDateTime,
|
|
@@ -170,39 +169,43 @@ function processFilters(filters) {
|
|
|
170
169
|
}, {});
|
|
171
170
|
}
|
|
172
171
|
|
|
173
|
-
|
|
174
|
-
(
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
172
|
+
class ApiError extends Error {
|
|
173
|
+
constructor({ code, error }) {
|
|
174
|
+
const message = `${code} (${error.error_code}) - ${error.error}`;
|
|
175
|
+
super(message);
|
|
176
|
+
this.name = "ApiError";
|
|
177
|
+
this.errorCode = error.error_code;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
180
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
181
|
+
const FilterMask = {
|
|
182
|
+
Due: 0x1,
|
|
183
|
+
DueDate: 0x2,
|
|
184
|
+
DueForCurrentStep: 0x4,
|
|
185
|
+
Reminded: 0x8,
|
|
186
|
+
};
|
|
185
187
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
SourceType["FillTable"] = "fill_table";
|
|
190
|
-
})(SourceType || (SourceType = {}));
|
|
188
|
+
const CallEventType = {
|
|
189
|
+
Show: "show",
|
|
190
|
+
};
|
|
191
191
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
})(ActivityAction || (ActivityAction = {}));
|
|
192
|
+
const SourceType = {
|
|
193
|
+
Default: "default",
|
|
194
|
+
FillTable: "fill_table",
|
|
195
|
+
};
|
|
197
196
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
197
|
+
const ActivityAction = {
|
|
198
|
+
Finished: "finished",
|
|
199
|
+
Reopened: "reopened",
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
const ApprovalChoice = {
|
|
203
|
+
Waiting: "waiting",
|
|
204
|
+
Approved: "approved",
|
|
205
|
+
Rejected: "rejected",
|
|
206
|
+
Revoked: "revoked",
|
|
207
|
+
Acknowledged: "acknowledged",
|
|
208
|
+
};
|
|
206
209
|
|
|
207
210
|
var PersonRights;
|
|
208
211
|
(function (PersonRights) {
|
|
@@ -230,179 +233,172 @@ var PersonRights;
|
|
|
230
233
|
PersonRights[PersonRights["UIAdministrator"] = 2015] = "UIAdministrator";
|
|
231
234
|
})(PersonRights || (PersonRights = {}));
|
|
232
235
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
})(ListType || (ListType = {}));
|
|
236
|
+
const ListType = {
|
|
237
|
+
Private: "private",
|
|
238
|
+
OrganizationWide: "org_wide",
|
|
239
|
+
};
|
|
238
240
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
})(ErrorCodeType || (ErrorCodeType = {}));
|
|
241
|
+
const ErrorCodeType = {
|
|
242
|
+
ServerError: "server_error",
|
|
243
|
+
AuthorizationError: "authorization_error",
|
|
244
|
+
TokenNotSpecified: "token_not_specified",
|
|
245
|
+
RevokedToken: "revoked_token",
|
|
246
|
+
ExpiredToken: "expired_token",
|
|
247
|
+
InvalidToken: "invalid_token",
|
|
248
|
+
AccountBlocked: "account_blocked",
|
|
249
|
+
InvalidCredentials: "invalid_credentials",
|
|
250
|
+
InvalidApplicationId: "invalid_application_id",
|
|
251
|
+
InvalidFieldId: "invalid_field_id",
|
|
252
|
+
InvalidFieldName: "invalid_field_name",
|
|
253
|
+
InvalidFieldIdName: "invalid_field_id_name",
|
|
254
|
+
NonUniqueName: "non_unique_name",
|
|
255
|
+
FieldIdentityMissing: "field_identity_missing",
|
|
256
|
+
DuplicateField: "duplicate_field",
|
|
257
|
+
InvalidCatalogId: "invalid_catalog_id",
|
|
258
|
+
InvalidCatalogItemName: "invalid_catalog_item_name",
|
|
259
|
+
NonUniqueCatalogItemName: "non_unique_catalog_item_name",
|
|
260
|
+
InvalidCatalogItemId: "invalid_catalog_item_id",
|
|
261
|
+
InvalidCatalogItemIdName: "catalog_item_id_name_mismatch",
|
|
262
|
+
InvalidEmail: "invalid_email",
|
|
263
|
+
NonUniqueEmail: "non_unique_email",
|
|
264
|
+
InvalidPersonIdEmail: "invalid_person_id_email",
|
|
265
|
+
UnrecognizedAttachmentId: "unrecognized_attachment_id",
|
|
266
|
+
RequiredFieldMissing: "required_field_missing",
|
|
267
|
+
FieldTypeIsNotSupported: "type_is_not_supported",
|
|
268
|
+
IncorrectParametersCount: "incorrect_parameters_count",
|
|
269
|
+
FilterTypeIsNotSupported: "filter_type_is_not_supported",
|
|
270
|
+
StepFieldDoesNotExists: "step_field_does_not_exists",
|
|
271
|
+
NoFileInRequest: "no_file_in_request",
|
|
272
|
+
TooLargeRequestLength: "too_large_request_length",
|
|
273
|
+
TaskHasNoForm: "task_has_no_form",
|
|
274
|
+
RequiredParameterMissing: "required_parameter_missing",
|
|
275
|
+
InvalidValueFormat: "invalid_value_format",
|
|
276
|
+
InvalidJson: "invalid_json",
|
|
277
|
+
EmptyBody: "empty_body",
|
|
278
|
+
TextMissing: "text_missing",
|
|
279
|
+
FormIdMissing: "form_id_missing",
|
|
280
|
+
InvalidPersonId: "invalid_person_id",
|
|
281
|
+
DeletedField: "deleted_field",
|
|
282
|
+
PersonIdentityMissing: "person_identity_missing",
|
|
283
|
+
CatalogItemIdMissing: "catalog_identity_missing",
|
|
284
|
+
FormHasNoTask: "form_has_no_task",
|
|
285
|
+
EitherDueDateOrDueCanBeSet: "either_due_date_or_due_can_be_set",
|
|
286
|
+
NegativeDuration: "negative_duration",
|
|
287
|
+
DurationIsTooLong: "duration_is_too_long",
|
|
288
|
+
DueMissing: "due_missing",
|
|
289
|
+
ScheduledDateInPast: "scheduled_date_in_past",
|
|
290
|
+
CannotAddFormProject: "cannot_add_form_project",
|
|
291
|
+
FormTemplateCantBeRemovedFromTask: "form_template_cant_be_removed_from_task",
|
|
292
|
+
TooManyTaskSteps: "too_many_task_steps",
|
|
293
|
+
TooManyComments: "too_many_comments",
|
|
294
|
+
InvalidStepNumber: "invalid_step_number",
|
|
295
|
+
TaskLimitExceeded: "task_limit_exceeded",
|
|
296
|
+
FieldIsInTable: "field_is_in_table",
|
|
297
|
+
RequiredTableFieldMissing: "required_table_field_missing",
|
|
298
|
+
DepartmentCatalogCanNotBeModified: "department_catalog_can_not_be_modified",
|
|
299
|
+
CatalogDuplicateItems: "catalog_duplicate_rows",
|
|
300
|
+
EmptyCatalogHeaders: "empty_catalog_headers",
|
|
301
|
+
CanNotModifyDeletedCatalog: "can_not_modify_deleted_catalog",
|
|
302
|
+
CatalogDuplicateHeaders: "catalog_duplicate_headers",
|
|
303
|
+
CanNotModifyFirstColumn: "can_not_modify_first_column",
|
|
304
|
+
CatalogHeadersItemsMismatch: "catalog_headers_items_mismatch",
|
|
305
|
+
TooManyCatalogItems: "too_many_catalog_items",
|
|
306
|
+
CatalogItemMaxLengthExceeded: "catalog_item_max_length_exceeded",
|
|
307
|
+
SingleValueIsNotSupported: "single_value_is_not_supported",
|
|
308
|
+
ParticipantLimitExceeded: "participant_limit_exceeded",
|
|
309
|
+
TableRowsLimitExceeded: "table_rows_limit_exceeded",
|
|
310
|
+
TextFieldValueLimitExceeded: "text_field_value_limit_exceeded",
|
|
311
|
+
UnableToEditField: "unable_to_edit_field",
|
|
312
|
+
EmptyFile: "empty_file",
|
|
313
|
+
BadMultipartContent: "bad_multipart_content",
|
|
314
|
+
TooManyDecimalPlaces: "too_many_decimal_places",
|
|
315
|
+
ExternalCommentEmptyText: "external_comment_empty_text",
|
|
316
|
+
SenderAddressFieldMissing: "sender_address_field_missing",
|
|
317
|
+
ExternalCommentRecipientNotFound: "external_comment_recipient_not_found",
|
|
318
|
+
DefaultMailboxNotFound: "default_mailbox_not_found",
|
|
319
|
+
CatalogNullValue: "catalog_null_value",
|
|
320
|
+
MaxTextLengthExceeded: "max_text_length_exceeded",
|
|
321
|
+
DueOutsideOfBounds: "due_outside_of_bounds",
|
|
322
|
+
AttachmentsForbidden: "attachments_forbidden",
|
|
323
|
+
UnrecognizedCallGuid: "unrecognized_call_guid",
|
|
324
|
+
UnsupportedAttachmentFormat: "unsupported_attachment_format",
|
|
325
|
+
ValidationError: "validation_error",
|
|
326
|
+
UnrecognizedAccountId: "unrecognized_account_id",
|
|
327
|
+
WebhookIsDisabled: "webhook_is_disabled",
|
|
328
|
+
TooLargeMessageText: "too_large_message_text",
|
|
329
|
+
UnrecognizedMessageType: "unrecognized_message_type",
|
|
330
|
+
InvalidFieldMappingCode: "invalid_field_mapping_code",
|
|
331
|
+
TooManyAttachments: "too_many_attachments",
|
|
332
|
+
UnrecognizedCallId: "unrecognized_call_id",
|
|
333
|
+
UnsupportedRecordFileFormat: "unsupported_record_file_format",
|
|
334
|
+
UnrecognizedIntegrationGuid: "unrecognized_integration_guid",
|
|
335
|
+
LimitExceeded: "limit_exceeded",
|
|
336
|
+
MaxSmsTextLengthExceeded: "max_sms_text_length_exceeded",
|
|
337
|
+
SmsIntegrationNotConfigured: "sms_integration_not_configured",
|
|
338
|
+
AttachmentTooBig: "attachment_too_big",
|
|
339
|
+
UncreatedOrDeletedTableRows: "invalid_table_row",
|
|
340
|
+
PrivateChannelAccessDenied: "private_channel_access_denied",
|
|
341
|
+
PrivateCommentHasForbiddenChanges: "private_comment_has_forbidden_changes",
|
|
342
|
+
ItemsCountOutOfRange: "items_count_out_of_range",
|
|
343
|
+
CannotAddExternalUser: "cannot_add_external_user",
|
|
344
|
+
UnrecognizedTaskId: "unrecognized_task_id",
|
|
345
|
+
TooManyDeletedCatalogItems: "too_many_deleted_catalog_items",
|
|
346
|
+
FieldCannotHaveMultipleValues: "field_cannot_have_multiple_values",
|
|
347
|
+
FieldEditingIsNotAllowed: "field_editing_is_not_allowed",
|
|
348
|
+
NonUniqueCode: "non_unique_code",
|
|
349
|
+
InvalidFieldCode: "invalid_field_code",
|
|
350
|
+
AccessDeniedProject: "access_denied_project",
|
|
351
|
+
AccessDeniedTask: "access_denied_task",
|
|
352
|
+
AccessDeniedCatalog: "access_denied_catalog",
|
|
353
|
+
AccessDeniedForm: "access_denied_form",
|
|
354
|
+
AccessDeniedPerson: "access_denied_person",
|
|
355
|
+
AccessDeniedCloseTask: "access_denied_close_task",
|
|
356
|
+
AccessDeniedReopenTask: "access_denied_reopen_task",
|
|
357
|
+
AccessDeniedFileAccessHistory: "access_denied_file_access_history",
|
|
358
|
+
AccessDeniedFile: "access_denied_file",
|
|
359
|
+
AccessDeniedReport: "access_denied_report",
|
|
360
|
+
AccessDenied: "access_denied",
|
|
361
|
+
FileIsMissing: "file_is_missing",
|
|
362
|
+
TooManyRequests: "too_many_requests",
|
|
363
|
+
};
|
|
363
364
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
})(Flag || (Flag = {}));
|
|
365
|
+
const Flag = {
|
|
366
|
+
None: "none",
|
|
367
|
+
Checked: "checked",
|
|
368
|
+
Unchecked: "unchecked",
|
|
369
|
+
};
|
|
370
370
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
})(PermissionLevel || (PermissionLevel = {}));
|
|
371
|
+
const PermissionLevel = {
|
|
372
|
+
None: "none",
|
|
373
|
+
Manager: "manager",
|
|
374
|
+
Member: "member",
|
|
375
|
+
Administrator: "administrator",
|
|
376
|
+
};
|
|
378
377
|
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
})(PersonType || (PersonType = {}));
|
|
378
|
+
const PersonType = {
|
|
379
|
+
User: "user",
|
|
380
|
+
Bot: "bot",
|
|
381
|
+
Role: "role",
|
|
382
|
+
};
|
|
385
383
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
})(SendSmsError || (SendSmsError = {}));
|
|
384
|
+
const SendSmsError = {
|
|
385
|
+
None: "none",
|
|
386
|
+
Unknown: "unknown",
|
|
387
|
+
Expired: "expired",
|
|
388
|
+
Forbidden: "forbidden",
|
|
389
|
+
Unreachable: "unreachable",
|
|
390
|
+
UnknownStatus: "unknown_status",
|
|
391
|
+
UnableToDeliver: "unable_to_deliver",
|
|
392
|
+
InvalidPhoneNumber: "invalid_phone_number",
|
|
393
|
+
Rejected: "rejected",
|
|
394
|
+
};
|
|
398
395
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
})(SendSmsStatus || (SendSmsStatus = {}));
|
|
396
|
+
const SendSmsStatus = {
|
|
397
|
+
Sent: "sent",
|
|
398
|
+
Delivered: "delivered",
|
|
399
|
+
DeliveryFailed: "delivery_failed",
|
|
400
|
+
SendFailed: "send_failed",
|
|
401
|
+
};
|
|
406
402
|
|
|
407
403
|
/******************************************************************************
|
|
408
404
|
Copyright (c) Microsoft Corporation.
|
|
@@ -492,7 +488,8 @@ class BaseApi {
|
|
|
492
488
|
return yield resp.blob();
|
|
493
489
|
}
|
|
494
490
|
else {
|
|
495
|
-
|
|
491
|
+
const error = (yield resp.json());
|
|
492
|
+
throw new ApiError({ code: resp.status, error });
|
|
496
493
|
}
|
|
497
494
|
});
|
|
498
495
|
}
|
|
@@ -906,11 +903,6 @@ class BotApi extends BaseApi {
|
|
|
906
903
|
return yield this.fetchApi(yield this.getModulePath(), "POST", JSON.stringify(request));
|
|
907
904
|
});
|
|
908
905
|
}
|
|
909
|
-
get(_a) {
|
|
910
|
-
return __awaiter(this, arguments, void 0, function* ({ id }) {
|
|
911
|
-
return yield this.fetchApi((yield this.getModulePath()) + `/${id}`, "GET");
|
|
912
|
-
});
|
|
913
|
-
}
|
|
914
906
|
getAll(request) {
|
|
915
907
|
return __awaiter(this, void 0, void 0, function* () {
|
|
916
908
|
const searchParams = request ? toSearchParams(request) : "";
|
|
@@ -1025,4 +1017,4 @@ class PyrusApiClient extends BaseApi {
|
|
|
1025
1017
|
}
|
|
1026
1018
|
}
|
|
1027
1019
|
|
|
1028
|
-
export { ActivityAction, ApprovalChoice, CallEventType, ErrorCodeType, FilterMask, Flag, FormFieldType, ListType, OperatorId, PermissionLevel, PersonRights, PersonType, PyrusApiClient, SendSmsError, SendSmsStatus, SourceType, toDateString, toDateTimeString, toTimeString };
|
|
1020
|
+
export { ActivityAction, ApiError, ApprovalChoice, CallEventType, ErrorCodeType, FilterMask, Flag, FormFieldType, ListType, OperatorId, PermissionLevel, PersonRights, PersonType, PyrusApiClient, SendSmsError, SendSmsStatus, SourceType, toDateString, toDateTimeString, toTimeString };
|