@ikatec/digisac-api-sdk 4.9.0 → 4.11.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/README.md +36 -12
- package/dist/apis/absence/AbsenceApi.cjs +12 -0
- package/dist/apis/absence/AbsenceApi.cjs.map +1 -1
- package/dist/apis/absence/AbsenceApi.d.ts +9 -0
- package/dist/apis/absence/AbsenceApi.d.ts.map +1 -1
- package/dist/apis/absence/AbsenceApi.mjs +12 -0
- package/dist/apis/absence/AbsenceApi.mjs.map +1 -1
- package/dist/apis/acceptanceTerms/AcceptanceTermsApi.cjs +8 -0
- package/dist/apis/acceptanceTerms/AcceptanceTermsApi.cjs.map +1 -1
- package/dist/apis/acceptanceTerms/AcceptanceTermsApi.d.ts +8 -1
- package/dist/apis/acceptanceTerms/AcceptanceTermsApi.d.ts.map +1 -1
- package/dist/apis/acceptanceTerms/AcceptanceTermsApi.mjs +8 -0
- package/dist/apis/acceptanceTerms/AcceptanceTermsApi.mjs.map +1 -1
- package/dist/apis/accounts/AccountsApi.cjs +5 -0
- package/dist/apis/accounts/AccountsApi.cjs.map +1 -1
- package/dist/apis/accounts/AccountsApi.d.ts +5 -0
- package/dist/apis/accounts/AccountsApi.d.ts.map +1 -1
- package/dist/apis/accounts/AccountsApi.mjs +5 -0
- package/dist/apis/accounts/AccountsApi.mjs.map +1 -1
- package/dist/apis/accounts/types.d.ts +2 -0
- package/dist/apis/accounts/types.d.ts.map +1 -1
- package/dist/apis/activityLog/ActivityLogApi.cjs +12 -0
- package/dist/apis/activityLog/ActivityLogApi.cjs.map +1 -1
- package/dist/apis/activityLog/ActivityLogApi.d.ts +8 -0
- package/dist/apis/activityLog/ActivityLogApi.d.ts.map +1 -1
- package/dist/apis/activityLog/ActivityLogApi.mjs +12 -0
- package/dist/apis/activityLog/ActivityLogApi.mjs.map +1 -1
- package/dist/apis/categories/CategoriesApi.cjs +7 -0
- package/dist/apis/categories/CategoriesApi.cjs.map +1 -1
- package/dist/apis/categories/CategoriesApi.d.ts +7 -1
- package/dist/apis/categories/CategoriesApi.d.ts.map +1 -1
- package/dist/apis/categories/CategoriesApi.mjs +7 -0
- package/dist/apis/categories/CategoriesApi.mjs.map +1 -1
- package/dist/apis/clientFeedback/ClientFeedbackApi.cjs +5 -1
- package/dist/apis/clientFeedback/ClientFeedbackApi.cjs.map +1 -1
- package/dist/apis/clientFeedback/ClientFeedbackApi.d.ts +5 -1
- package/dist/apis/clientFeedback/ClientFeedbackApi.d.ts.map +1 -1
- package/dist/apis/clientFeedback/ClientFeedbackApi.mjs +5 -1
- package/dist/apis/clientFeedback/ClientFeedbackApi.mjs.map +1 -1
- package/dist/apis/contactBlockLists/ContactBlockListsApi.cjs +36 -0
- package/dist/apis/contactBlockLists/ContactBlockListsApi.cjs.map +1 -1
- package/dist/apis/contactBlockLists/ContactBlockListsApi.d.ts +32 -1
- package/dist/apis/contactBlockLists/ContactBlockListsApi.d.ts.map +1 -1
- package/dist/apis/contactBlockLists/ContactBlockListsApi.mjs +36 -0
- package/dist/apis/contactBlockLists/ContactBlockListsApi.mjs.map +1 -1
- package/dist/apis/contactBlockLists/types.d.ts +6 -1
- package/dist/apis/contactBlockLists/types.d.ts.map +1 -1
- package/dist/apis/contactBlockListsControls/ContactBlockListsControlsApi.cjs +37 -0
- package/dist/apis/contactBlockListsControls/ContactBlockListsControlsApi.cjs.map +1 -1
- package/dist/apis/contactBlockListsControls/ContactBlockListsControlsApi.d.ts +33 -1
- package/dist/apis/contactBlockListsControls/ContactBlockListsControlsApi.d.ts.map +1 -1
- package/dist/apis/contactBlockListsControls/ContactBlockListsControlsApi.mjs +37 -0
- package/dist/apis/contactBlockListsControls/ContactBlockListsControlsApi.mjs.map +1 -1
- package/dist/apis/contactBlockListsControls/types.d.ts +7 -0
- package/dist/apis/contactBlockListsControls/types.d.ts.map +1 -1
- package/dist/apis/contacts/ContactsApi.cjs +16 -3
- package/dist/apis/contacts/ContactsApi.cjs.map +1 -1
- package/dist/apis/contacts/ContactsApi.d.ts +16 -5
- package/dist/apis/contacts/ContactsApi.d.ts.map +1 -1
- package/dist/apis/contacts/ContactsApi.mjs +16 -3
- package/dist/apis/contacts/ContactsApi.mjs.map +1 -1
- package/dist/apis/contacts/types.d.ts +6 -1
- package/dist/apis/contacts/types.d.ts.map +1 -1
- package/dist/apis/creditMovements/CreditMovementsApi.cjs +17 -0
- package/dist/apis/creditMovements/CreditMovementsApi.cjs.map +1 -1
- package/dist/apis/creditMovements/CreditMovementsApi.d.ts +11 -0
- package/dist/apis/creditMovements/CreditMovementsApi.d.ts.map +1 -1
- package/dist/apis/creditMovements/CreditMovementsApi.mjs +17 -0
- package/dist/apis/creditMovements/CreditMovementsApi.mjs.map +1 -1
- package/dist/apis/customFields/CustomFieldsApi.cjs +7 -0
- package/dist/apis/customFields/CustomFieldsApi.cjs.map +1 -1
- package/dist/apis/customFields/CustomFieldsApi.d.ts +7 -1
- package/dist/apis/customFields/CustomFieldsApi.d.ts.map +1 -1
- package/dist/apis/customFields/CustomFieldsApi.mjs +7 -0
- package/dist/apis/customFields/CustomFieldsApi.mjs.map +1 -1
- package/dist/apis/departments/DepartmentsApi.cjs +21 -0
- package/dist/apis/departments/DepartmentsApi.cjs.map +1 -1
- package/dist/apis/departments/DepartmentsApi.d.ts +20 -2
- package/dist/apis/departments/DepartmentsApi.d.ts.map +1 -1
- package/dist/apis/departments/DepartmentsApi.mjs +21 -0
- package/dist/apis/departments/DepartmentsApi.mjs.map +1 -1
- package/dist/apis/departments/types.d.ts +5 -0
- package/dist/apis/departments/types.d.ts.map +1 -1
- package/dist/apis/distribution/DistributionApi.cjs +32 -0
- package/dist/apis/distribution/DistributionApi.cjs.map +1 -1
- package/dist/apis/distribution/DistributionApi.d.ts +26 -1
- package/dist/apis/distribution/DistributionApi.d.ts.map +1 -1
- package/dist/apis/distribution/DistributionApi.mjs +32 -0
- package/dist/apis/distribution/DistributionApi.mjs.map +1 -1
- package/dist/apis/distribution/types.d.ts +18 -1
- package/dist/apis/distribution/types.d.ts.map +1 -1
- package/dist/apis/files/FilesApi.cjs +49 -0
- package/dist/apis/files/FilesApi.cjs.map +1 -1
- package/dist/apis/files/FilesApi.d.ts +45 -2
- package/dist/apis/files/FilesApi.d.ts.map +1 -1
- package/dist/apis/files/FilesApi.mjs +49 -0
- package/dist/apis/files/FilesApi.mjs.map +1 -1
- package/dist/apis/files/types.d.ts +45 -7
- package/dist/apis/files/types.d.ts.map +1 -1
- package/dist/apis/holiday/HolidayApi.cjs +7 -0
- package/dist/apis/holiday/HolidayApi.cjs.map +1 -1
- package/dist/apis/holiday/HolidayApi.d.ts +7 -1
- package/dist/apis/holiday/HolidayApi.d.ts.map +1 -1
- package/dist/apis/holiday/HolidayApi.mjs +7 -0
- package/dist/apis/holiday/HolidayApi.mjs.map +1 -1
- package/dist/apis/integrations/IntegrationsApi.cjs +24 -0
- package/dist/apis/integrations/IntegrationsApi.cjs.map +1 -1
- package/dist/apis/integrations/IntegrationsApi.d.ts +21 -2
- package/dist/apis/integrations/IntegrationsApi.d.ts.map +1 -1
- package/dist/apis/integrations/IntegrationsApi.mjs +24 -0
- package/dist/apis/integrations/IntegrationsApi.mjs.map +1 -1
- package/dist/apis/integrations/types.d.ts +15 -6
- package/dist/apis/integrations/types.d.ts.map +1 -1
- package/dist/apis/interactiveMessages/InteractiveMessagesApi.cjs +7 -0
- package/dist/apis/interactiveMessages/InteractiveMessagesApi.cjs.map +1 -1
- package/dist/apis/interactiveMessages/InteractiveMessagesApi.d.ts +7 -1
- package/dist/apis/interactiveMessages/InteractiveMessagesApi.d.ts.map +1 -1
- package/dist/apis/interactiveMessages/InteractiveMessagesApi.mjs +7 -0
- package/dist/apis/interactiveMessages/InteractiveMessagesApi.mjs.map +1 -1
- package/dist/apis/kanbanBoards/KanbanBoardsApi.cjs +7 -0
- package/dist/apis/kanbanBoards/KanbanBoardsApi.cjs.map +1 -1
- package/dist/apis/kanbanBoards/KanbanBoardsApi.d.ts +7 -1
- package/dist/apis/kanbanBoards/KanbanBoardsApi.d.ts.map +1 -1
- package/dist/apis/kanbanBoards/KanbanBoardsApi.mjs +7 -0
- package/dist/apis/kanbanBoards/KanbanBoardsApi.mjs.map +1 -1
- package/dist/apis/kanbanCards/KanbanCardsApi.cjs +7 -0
- package/dist/apis/kanbanCards/KanbanCardsApi.cjs.map +1 -1
- package/dist/apis/kanbanCards/KanbanCardsApi.d.ts +7 -1
- package/dist/apis/kanbanCards/KanbanCardsApi.d.ts.map +1 -1
- package/dist/apis/kanbanCards/KanbanCardsApi.mjs +7 -0
- package/dist/apis/kanbanCards/KanbanCardsApi.mjs.map +1 -1
- package/dist/apis/knowledgeBase/KnowledgeBaseApi.cjs +8 -0
- package/dist/apis/knowledgeBase/KnowledgeBaseApi.cjs.map +1 -1
- package/dist/apis/knowledgeBase/KnowledgeBaseApi.d.ts +8 -1
- package/dist/apis/knowledgeBase/KnowledgeBaseApi.d.ts.map +1 -1
- package/dist/apis/knowledgeBase/KnowledgeBaseApi.mjs +8 -0
- package/dist/apis/knowledgeBase/KnowledgeBaseApi.mjs.map +1 -1
- package/dist/apis/knowledgeBaseItem/KnowledgeBaseItemApi.cjs +8 -0
- package/dist/apis/knowledgeBaseItem/KnowledgeBaseItemApi.cjs.map +1 -1
- package/dist/apis/knowledgeBaseItem/KnowledgeBaseItemApi.d.ts +8 -1
- package/dist/apis/knowledgeBaseItem/KnowledgeBaseItemApi.d.ts.map +1 -1
- package/dist/apis/knowledgeBaseItem/KnowledgeBaseItemApi.mjs +8 -0
- package/dist/apis/knowledgeBaseItem/KnowledgeBaseItemApi.mjs.map +1 -1
- package/dist/apis/messages/MessagesApi.cjs +23 -3
- package/dist/apis/messages/MessagesApi.cjs.map +1 -1
- package/dist/apis/messages/MessagesApi.d.ts +19 -3
- package/dist/apis/messages/MessagesApi.d.ts.map +1 -1
- package/dist/apis/messages/MessagesApi.mjs +23 -3
- package/dist/apis/messages/MessagesApi.mjs.map +1 -1
- package/dist/apis/messages/types.d.ts +3 -0
- package/dist/apis/messages/types.d.ts.map +1 -1
- package/dist/apis/notifications/NotificationsApi.cjs +7 -0
- package/dist/apis/notifications/NotificationsApi.cjs.map +1 -1
- package/dist/apis/notifications/NotificationsApi.d.ts +7 -1
- package/dist/apis/notifications/NotificationsApi.d.ts.map +1 -1
- package/dist/apis/notifications/NotificationsApi.mjs +7 -0
- package/dist/apis/notifications/NotificationsApi.mjs.map +1 -1
- package/dist/apis/organizations/OrganizationsApi.cjs +7 -0
- package/dist/apis/organizations/OrganizationsApi.cjs.map +1 -1
- package/dist/apis/organizations/OrganizationsApi.d.ts +7 -1
- package/dist/apis/organizations/OrganizationsApi.d.ts.map +1 -1
- package/dist/apis/organizations/OrganizationsApi.mjs +7 -0
- package/dist/apis/organizations/OrganizationsApi.mjs.map +1 -1
- package/dist/apis/people/PeopleApi.cjs +7 -0
- package/dist/apis/people/PeopleApi.cjs.map +1 -1
- package/dist/apis/people/PeopleApi.d.ts +7 -1
- package/dist/apis/people/PeopleApi.d.ts.map +1 -1
- package/dist/apis/people/PeopleApi.mjs +7 -0
- package/dist/apis/people/PeopleApi.mjs.map +1 -1
- package/dist/apis/planAiHistory/PlanAiHistoryApi.cjs +16 -0
- package/dist/apis/planAiHistory/PlanAiHistoryApi.cjs.map +1 -1
- package/dist/apis/planAiHistory/PlanAiHistoryApi.d.ts +10 -0
- package/dist/apis/planAiHistory/PlanAiHistoryApi.d.ts.map +1 -1
- package/dist/apis/planAiHistory/PlanAiHistoryApi.mjs +16 -0
- package/dist/apis/planAiHistory/PlanAiHistoryApi.mjs.map +1 -1
- package/dist/apis/roles/RolesApi.cjs +7 -0
- package/dist/apis/roles/RolesApi.cjs.map +1 -1
- package/dist/apis/roles/RolesApi.d.ts +6 -1
- package/dist/apis/roles/RolesApi.d.ts.map +1 -1
- package/dist/apis/roles/RolesApi.mjs +7 -0
- package/dist/apis/roles/RolesApi.mjs.map +1 -1
- package/dist/apis/services/ServicesApi.cjs +68 -0
- package/dist/apis/services/ServicesApi.cjs.map +1 -1
- package/dist/apis/services/ServicesApi.d.ts +53 -1
- package/dist/apis/services/ServicesApi.d.ts.map +1 -1
- package/dist/apis/services/ServicesApi.mjs +68 -0
- package/dist/apis/services/ServicesApi.mjs.map +1 -1
- package/dist/apis/services/types.d.ts +15 -0
- package/dist/apis/services/types.d.ts.map +1 -1
- package/dist/apis/stickers/StickersApi.cjs +20 -0
- package/dist/apis/stickers/StickersApi.cjs.map +1 -1
- package/dist/apis/stickers/StickersApi.d.ts +15 -0
- package/dist/apis/stickers/StickersApi.d.ts.map +1 -1
- package/dist/apis/stickers/StickersApi.mjs +20 -0
- package/dist/apis/stickers/StickersApi.mjs.map +1 -1
- package/dist/apis/tags/TagsApi.cjs +7 -0
- package/dist/apis/tags/TagsApi.cjs.map +1 -1
- package/dist/apis/tags/TagsApi.d.ts +7 -1
- package/dist/apis/tags/TagsApi.d.ts.map +1 -1
- package/dist/apis/tags/TagsApi.mjs +7 -0
- package/dist/apis/tags/TagsApi.mjs.map +1 -1
- package/dist/apis/timetable/TimetableApi.cjs +7 -0
- package/dist/apis/timetable/TimetableApi.cjs.map +1 -1
- package/dist/apis/timetable/TimetableApi.d.ts +7 -1
- package/dist/apis/timetable/TimetableApi.d.ts.map +1 -1
- package/dist/apis/timetable/TimetableApi.mjs +7 -0
- package/dist/apis/timetable/TimetableApi.mjs.map +1 -1
- package/dist/apis/users/UsersApi.cjs +8 -0
- package/dist/apis/users/UsersApi.cjs.map +1 -1
- package/dist/apis/users/UsersApi.d.ts +8 -1
- package/dist/apis/users/UsersApi.d.ts.map +1 -1
- package/dist/apis/users/UsersApi.mjs +8 -0
- package/dist/apis/users/UsersApi.mjs.map +1 -1
- package/dist/apis/users/types.d.ts +15 -0
- package/dist/apis/users/types.d.ts.map +1 -1
- package/dist/apis/webhooks/WebhooksApi.cjs +7 -0
- package/dist/apis/webhooks/WebhooksApi.cjs.map +1 -1
- package/dist/apis/webhooks/WebhooksApi.d.ts +7 -1
- package/dist/apis/webhooks/WebhooksApi.d.ts.map +1 -1
- package/dist/apis/webhooks/WebhooksApi.mjs +7 -0
- package/dist/apis/webhooks/WebhooksApi.mjs.map +1 -1
- package/dist/core/ApiClient.d.ts +14 -0
- package/dist/core/ApiClient.d.ts.map +1 -1
- package/dist/core/ArchivableCrudApi.cjs.map +1 -1
- package/dist/core/ArchivableCrudApi.d.ts +1 -1
- package/dist/core/ArchivableCrudApi.d.ts.map +1 -1
- package/dist/core/ArchivableCrudApi.mjs.map +1 -1
- package/dist/core/BaseApiClient.cjs +24 -3
- package/dist/core/BaseApiClient.cjs.map +1 -1
- package/dist/core/BaseApiClient.d.ts +14 -0
- package/dist/core/BaseApiClient.d.ts.map +1 -1
- package/dist/core/BaseApiClient.mjs +24 -3
- package/dist/core/BaseApiClient.mjs.map +1 -1
- package/dist/core/BaseCrudApi.cjs +3 -1
- package/dist/core/BaseCrudApi.cjs.map +1 -1
- package/dist/core/BaseCrudApi.d.ts +6 -4
- package/dist/core/BaseCrudApi.d.ts.map +1 -1
- package/dist/core/BaseCrudApi.mjs +3 -1
- package/dist/core/BaseCrudApi.mjs.map +1 -1
- package/dist/core/requestExternal.cjs +33 -0
- package/dist/core/requestExternal.cjs.map +1 -0
- package/dist/core/requestExternal.d.ts +9 -0
- package/dist/core/requestExternal.d.ts.map +1 -0
- package/dist/core/requestExternal.mjs +32 -0
- package/dist/core/requestExternal.mjs.map +1 -0
- package/dist/core/types.d.ts +1 -1
- package/dist/core/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/apis/absence/AbsenceApi.ts +19 -0
- package/src/apis/acceptanceTerms/AcceptanceTermsApi.ts +13 -1
- package/src/apis/accounts/AccountsApi.ts +5 -0
- package/src/apis/accounts/types.ts +2 -0
- package/src/apis/activityLog/ActivityLogApi.ts +18 -0
- package/src/apis/categories/CategoriesApi.ts +12 -1
- package/src/apis/clientFeedback/ClientFeedbackApi.ts +5 -1
- package/src/apis/contactBlockLists/ContactBlockListsApi.test.ts +57 -0
- package/src/apis/contactBlockLists/ContactBlockListsApi.ts +57 -1
- package/src/apis/contactBlockLists/types.ts +6 -1
- package/src/apis/contactBlockListsControls/ContactBlockListsControlsApi.test.ts +48 -0
- package/src/apis/contactBlockListsControls/ContactBlockListsControlsApi.ts +59 -1
- package/src/apis/contactBlockListsControls/types.ts +7 -0
- package/src/apis/contacts/ContactsApi.test.ts +20 -4
- package/src/apis/contacts/ContactsApi.ts +24 -5
- package/src/apis/contacts/types.ts +7 -1
- package/src/apis/creditMovements/CreditMovementsApi.ts +27 -0
- package/src/apis/customFields/CustomFieldsApi.ts +12 -1
- package/src/apis/departments/DepartmentsApi.test.ts +88 -0
- package/src/apis/departments/DepartmentsApi.ts +41 -2
- package/src/apis/departments/types.ts +6 -0
- package/src/apis/distribution/DistributionApi.test.ts +65 -0
- package/src/apis/distribution/DistributionApi.ts +50 -1
- package/src/apis/distribution/types.ts +17 -1
- package/src/apis/files/FilesApi.test.ts +122 -0
- package/src/apis/files/FilesApi.ts +107 -2
- package/src/apis/files/types.ts +48 -7
- package/src/apis/holiday/HolidayApi.ts +16 -1
- package/src/apis/integrations/IntegrationsApi.test.ts +42 -0
- package/src/apis/integrations/IntegrationsApi.ts +46 -2
- package/src/apis/integrations/types.ts +25 -6
- package/src/apis/interactiveMessages/InteractiveMessagesApi.ts +12 -1
- package/src/apis/kanbanBoards/KanbanBoardsApi.ts +12 -1
- package/src/apis/kanbanCards/KanbanCardsApi.ts +12 -1
- package/src/apis/knowledgeBase/KnowledgeBaseApi.ts +13 -1
- package/src/apis/knowledgeBaseItem/KnowledgeBaseItemApi.ts +13 -1
- package/src/apis/messages/MessagesApi.test.ts +13 -7
- package/src/apis/messages/MessagesApi.ts +29 -3
- package/src/apis/messages/types.ts +3 -0
- package/src/apis/notifications/NotificationsApi.ts +12 -1
- package/src/apis/organizations/OrganizationsApi.ts +12 -1
- package/src/apis/payloads.test-d.ts +172 -0
- package/src/apis/people/PeopleApi.ts +16 -1
- package/src/apis/planAiHistory/PlanAiHistoryApi.ts +26 -0
- package/src/apis/roles/RolesApi.ts +10 -1
- package/src/apis/services/ServicesApi.test.ts +45 -0
- package/src/apis/services/ServicesApi.ts +91 -1
- package/src/apis/services/types.ts +16 -0
- package/src/apis/stickers/StickersApi.ts +32 -0
- package/src/apis/tags/TagsApi.ts +16 -1
- package/src/apis/timetable/TimetableApi.ts +12 -1
- package/src/apis/users/UsersApi.ts +17 -1
- package/src/apis/users/types.ts +11 -0
- package/src/apis/webhooks/WebhooksApi.ts +16 -1
- package/src/core/ApiClient.ts +24 -0
- package/src/core/ArchivableCrudApi.ts +2 -1
- package/src/core/BaseApiClient.test.ts +98 -0
- package/src/core/BaseApiClient.ts +49 -4
- package/src/core/BaseCrudApi.test-d.ts +11 -1
- package/src/core/BaseCrudApi.ts +15 -6
- package/src/core/requestExternal.ts +43 -0
- package/src/core/types.ts +4 -2
|
@@ -13,6 +13,74 @@ var ServicesApi = class extends ArchivableCrudApi {
|
|
|
13
13
|
getLimits(headers) {
|
|
14
14
|
return this.client.get(`${this.basePath}/limits`, headers);
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated The backend does not archive a connection by `PUT { archivedAt }`: the PUT
|
|
18
|
+
* requires `type` (400 without it) and ignores `archivedAt`. Use {@link archiveWithValidation}.
|
|
19
|
+
*/
|
|
20
|
+
archive(id, headers) {
|
|
21
|
+
return super.archive(id, headers);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated The backend does not restore a connection by `PUT { archivedAt: null }`: the PUT
|
|
25
|
+
* requires `type` (400 without it) and ignores `archivedAt`. Use {@link archiveWithValidation}.
|
|
26
|
+
*/
|
|
27
|
+
unarchive(id, headers) {
|
|
28
|
+
return super.unarchive(id, headers);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Archives (`archive: true`) or restores (`archive: false`) a connection through the route used
|
|
32
|
+
* by the UI. Archiving shuts the connection down, closes its open tickets, marks its schedules
|
|
33
|
+
* as done and cancels its campaigns; restoring checks the plan limit of the `type` (400 when it
|
|
34
|
+
* is full).
|
|
35
|
+
*
|
|
36
|
+
* Resolves `{}` before the work is done (the route does not await it): poll `getById` until
|
|
37
|
+
* `archivedAt` changes. Send the `type` of the connection: without it the request is never
|
|
38
|
+
* answered.
|
|
39
|
+
* @permissions services.disabled
|
|
40
|
+
*/
|
|
41
|
+
archiveWithValidation(id, body, headers) {
|
|
42
|
+
return this.client.post(`${this.basePath}/${id}/archive`, body, headers);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Takes the session of the connection over to this server. Resolves the text `'OK'`; an
|
|
46
|
+
* unknown id answers 404 `Service not found.`.
|
|
47
|
+
* @permissions services.operate
|
|
48
|
+
*/
|
|
49
|
+
takeover(id, headers) {
|
|
50
|
+
return this.client.post(`${this.basePath}/${id}/takeover`, void 0, headers);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Logs the connection out of the messaging service. Resolves the text `'OK'`; an unknown id
|
|
54
|
+
* answers 404 `Service not found.`.
|
|
55
|
+
* @permissions services.operate
|
|
56
|
+
*/
|
|
57
|
+
logout(id, headers) {
|
|
58
|
+
return this.client.post(`${this.basePath}/${id}/logout`, void 0, headers);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Shuts the connection down. Resolves the text `'OK'`; an unknown id answers 404
|
|
62
|
+
* `Service not found.`.
|
|
63
|
+
* @permissions services.operate
|
|
64
|
+
*/
|
|
65
|
+
shutdown(id, headers) {
|
|
66
|
+
return this.client.post(`${this.basePath}/${id}/shutdown`, void 0, headers);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Starts the connection. Resolves the text `'OK'`; an unknown id answers 404
|
|
70
|
+
* `Service not found.`.
|
|
71
|
+
* @permissions services.operate
|
|
72
|
+
*/
|
|
73
|
+
start(id, headers) {
|
|
74
|
+
return this.client.post(`${this.basePath}/${id}/start`, void 0, headers);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Restarts the connection. Resolves the text `'OK'`; an unknown id answers 404
|
|
78
|
+
* `Service not found.`.
|
|
79
|
+
* @permissions services.operate
|
|
80
|
+
*/
|
|
81
|
+
restart(id, headers) {
|
|
82
|
+
return this.client.post(`${this.basePath}/${id}/restart`, void 0, headers);
|
|
83
|
+
}
|
|
16
84
|
};
|
|
17
85
|
|
|
18
86
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServicesApi.mjs","names":[],"sources":["../../../src/apis/services/ServicesApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { ArchivableCrudApi } from '../../core/ArchivableCrudApi'\nimport type {
|
|
1
|
+
{"version":3,"file":"ServicesApi.mjs","names":[],"sources":["../../../src/apis/services/ServicesApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { ArchivableCrudApi } from '../../core/ArchivableCrudApi'\nimport type {\n Service,\n CreateServicePayload,\n ServiceLimits,\n UpdateServicePayload,\n ArchiveServicePayload,\n} from './types'\n\nexport class ServicesApi extends ArchivableCrudApi<\n Service,\n CreateServicePayload,\n UpdateServicePayload\n> {\n constructor(client: ApiClient) {\n super(client, '/services')\n }\n\n /**\n * Returns, for each connection type of the account plan, how many connections are used,\n * allowed and still available.\n * @permissions services.view\n */\n getLimits(headers?: Record<string, string>): Promise<ServiceLimits> {\n return this.client.get<ServiceLimits>(`${this.basePath}/limits`, headers)\n }\n\n /**\n * @deprecated The backend does not archive a connection by `PUT { archivedAt }`: the PUT\n * requires `type` (400 without it) and ignores `archivedAt`. Use {@link archiveWithValidation}.\n */\n override archive(id: string, headers?: Record<string, string>): Promise<Service> {\n return super.archive(id, headers)\n }\n\n /**\n * @deprecated The backend does not restore a connection by `PUT { archivedAt: null }`: the PUT\n * requires `type` (400 without it) and ignores `archivedAt`. Use {@link archiveWithValidation}.\n */\n override unarchive(id: string, headers?: Record<string, string>): Promise<Service> {\n return super.unarchive(id, headers)\n }\n\n /**\n * Archives (`archive: true`) or restores (`archive: false`) a connection through the route used\n * by the UI. Archiving shuts the connection down, closes its open tickets, marks its schedules\n * as done and cancels its campaigns; restoring checks the plan limit of the `type` (400 when it\n * is full).\n *\n * Resolves `{}` before the work is done (the route does not await it): poll `getById` until\n * `archivedAt` changes. Send the `type` of the connection: without it the request is never\n * answered.\n * @permissions services.disabled\n */\n archiveWithValidation(\n id: string,\n body: ArchiveServicePayload,\n headers?: Record<string, string>,\n ): Promise<Record<string, never>> {\n return this.client.post<Record<string, never>, ArchiveServicePayload>(\n `${this.basePath}/${id}/archive`,\n body,\n headers,\n )\n }\n\n /**\n * Takes the session of the connection over to this server. Resolves the text `'OK'`; an\n * unknown id answers 404 `Service not found.`.\n * @permissions services.operate\n */\n takeover(id: string, headers?: Record<string, string>): Promise<'OK'> {\n return this.client.post<'OK'>(`${this.basePath}/${id}/takeover`, undefined, headers)\n }\n\n /**\n * Logs the connection out of the messaging service. Resolves the text `'OK'`; an unknown id\n * answers 404 `Service not found.`.\n * @permissions services.operate\n */\n logout(id: string, headers?: Record<string, string>): Promise<'OK'> {\n return this.client.post<'OK'>(`${this.basePath}/${id}/logout`, undefined, headers)\n }\n\n /**\n * Shuts the connection down. Resolves the text `'OK'`; an unknown id answers 404\n * `Service not found.`.\n * @permissions services.operate\n */\n shutdown(id: string, headers?: Record<string, string>): Promise<'OK'> {\n return this.client.post<'OK'>(`${this.basePath}/${id}/shutdown`, undefined, headers)\n }\n\n /**\n * Starts the connection. Resolves the text `'OK'`; an unknown id answers 404\n * `Service not found.`.\n * @permissions services.operate\n */\n start(id: string, headers?: Record<string, string>): Promise<'OK'> {\n return this.client.post<'OK'>(`${this.basePath}/${id}/start`, undefined, headers)\n }\n\n /**\n * Restarts the connection. Resolves the text `'OK'`; an unknown id answers 404\n * `Service not found.`.\n * @permissions services.operate\n */\n restart(id: string, headers?: Record<string, string>): Promise<'OK'> {\n return this.client.post<'OK'>(`${this.basePath}/${id}/restart`, undefined, headers)\n }\n}\n"],"mappings":";;;AAUA,IAAa,cAAb,cAAiC,kBAI/B;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,YAAY;;;;;;;CAQ5B,UAAU,SAA0D;AAClE,SAAO,KAAK,OAAO,IAAmB,GAAG,KAAK,SAAS,UAAU,QAAQ;;;;;;CAO3E,AAAS,QAAQ,IAAY,SAAoD;AAC/E,SAAO,MAAM,QAAQ,IAAI,QAAQ;;;;;;CAOnC,AAAS,UAAU,IAAY,SAAoD;AACjF,SAAO,MAAM,UAAU,IAAI,QAAQ;;;;;;;;;;;;;CAcrC,sBACE,IACA,MACA,SACgC;AAChC,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,GAAG,GAAG,WACvB,MACA,QACD;;;;;;;CAQH,SAAS,IAAY,SAAiD;AACpE,SAAO,KAAK,OAAO,KAAW,GAAG,KAAK,SAAS,GAAG,GAAG,YAAY,QAAW,QAAQ;;;;;;;CAQtF,OAAO,IAAY,SAAiD;AAClE,SAAO,KAAK,OAAO,KAAW,GAAG,KAAK,SAAS,GAAG,GAAG,UAAU,QAAW,QAAQ;;;;;;;CAQpF,SAAS,IAAY,SAAiD;AACpE,SAAO,KAAK,OAAO,KAAW,GAAG,KAAK,SAAS,GAAG,GAAG,YAAY,QAAW,QAAQ;;;;;;;CAQtF,MAAM,IAAY,SAAiD;AACjE,SAAO,KAAK,OAAO,KAAW,GAAG,KAAK,SAAS,GAAG,GAAG,SAAS,QAAW,QAAQ;;;;;;;CAQnF,QAAQ,IAAY,SAAiD;AACnE,SAAO,KAAK,OAAO,KAAW,GAAG,KAAK,SAAS,GAAG,GAAG,WAAW,QAAW,QAAQ"}
|
|
@@ -240,19 +240,34 @@ export type ServiceRelationships = 'bot' | 'defaultDepartment';
|
|
|
240
240
|
export type CreateServicePayload = {
|
|
241
241
|
name: string;
|
|
242
242
|
type: ServiceType;
|
|
243
|
+
/** Send `null`: without it the duplicate-name check never answers (SUS-3784). */
|
|
244
|
+
archivedAt?: null;
|
|
243
245
|
data?: ServiceData;
|
|
244
246
|
settings?: ServiceSettings;
|
|
245
247
|
defaultDepartmentId?: string;
|
|
246
248
|
botId?: string;
|
|
247
249
|
};
|
|
248
250
|
export type UpdateServicePayload = {
|
|
251
|
+
/** Required by the backend (400 without it), although optional here for compatibility. */
|
|
252
|
+
type?: ServiceType;
|
|
249
253
|
name?: string;
|
|
250
254
|
data?: ServiceData;
|
|
251
255
|
settings?: ServiceSettings;
|
|
252
256
|
defaultDepartmentId?: string | null;
|
|
253
257
|
botId?: string | null;
|
|
258
|
+
/**
|
|
259
|
+
* Ignored by the backend (archive through `ServicesApi.archiveWithValidation`). Send `null`
|
|
260
|
+
* with a `name`: without `archivedAt` the duplicate-name check never answers (SUS-3784).
|
|
261
|
+
*/
|
|
254
262
|
archivedAt?: string | null;
|
|
255
263
|
};
|
|
264
|
+
/** Body of `ServicesApi.archiveWithValidation`. */
|
|
265
|
+
export type ArchiveServicePayload = {
|
|
266
|
+
/** `true` archives, `false` restores. */
|
|
267
|
+
archive: boolean;
|
|
268
|
+
/** The type of the connection, used by the plan limit check (the request hangs without it). */
|
|
269
|
+
type: ServiceType;
|
|
270
|
+
};
|
|
256
271
|
export type ServiceLimit = {
|
|
257
272
|
used: number;
|
|
258
273
|
total: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/apis/services/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEtD,MAAM,MAAM,WAAW,GACnB,UAAU,GACV,OAAO,GACP,SAAS,GACT,UAAU,GACV,UAAU,GACV,WAAW,GACX,cAAc,GACd,iBAAiB,GACjB,mBAAmB,GACnB,oBAAoB,GACpB,yBAAyB,CAAA;AAE7B,MAAM,MAAM,uBAAuB,GAAG;IACpC,SAAS,CAAC,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MAAM,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC,CAAA"}
|
|
@@ -2,10 +2,30 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
const require_core_BaseCrudApi = require('../../core/BaseCrudApi.cjs');
|
|
3
3
|
|
|
4
4
|
//#region src/apis/stickers/StickersApi.ts
|
|
5
|
+
/**
|
|
6
|
+
* Stickers of the account. The backend serves `GET /stickers` and `POST /stickers` (plus
|
|
7
|
+
* `GET /stickers/exist`, `POST /stickers/add` and `DELETE /stickers/remove/:stickerId`); there is
|
|
8
|
+
* no read by id, update nor `DELETE /stickers/:id`.
|
|
9
|
+
*/
|
|
5
10
|
var StickersApi = class extends require_core_BaseCrudApi.BaseCrudApi {
|
|
6
11
|
constructor(client) {
|
|
7
12
|
super(client, "/stickers");
|
|
8
13
|
}
|
|
14
|
+
/** @deprecated Not served: the backend has no GET /stickers/:id, so this route answers 404. */
|
|
15
|
+
getById(id, query, headers) {
|
|
16
|
+
return super.getById(id, query, headers);
|
|
17
|
+
}
|
|
18
|
+
/** @deprecated Not served: the backend has no PUT /stickers/:id, so this route answers 404. */
|
|
19
|
+
updateById(id, body, headers) {
|
|
20
|
+
return super.updateById(id, body, headers);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated Not served: the backend has no DELETE /stickers/:id (it removes a sticker by
|
|
24
|
+
* `DELETE /stickers/remove/:stickerId`), so this route answers 404.
|
|
25
|
+
*/
|
|
26
|
+
deleteById(id, headers) {
|
|
27
|
+
return super.deleteById(id, headers);
|
|
28
|
+
}
|
|
9
29
|
};
|
|
10
30
|
|
|
11
31
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StickersApi.cjs","names":["BaseCrudApi"],"sources":["../../../src/apis/stickers/StickersApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { Sticker, CreateStickerPayload, UpdateStickerPayload } from './types'\n\nexport class StickersApi extends BaseCrudApi<Sticker, CreateStickerPayload, UpdateStickerPayload> {\n constructor(client: ApiClient) {\n super(client, '/stickers')\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"StickersApi.cjs","names":["BaseCrudApi"],"sources":["../../../src/apis/stickers/StickersApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { GetByIdQuery } from '../../core/types'\nimport type { Sticker, CreateStickerPayload, UpdateStickerPayload } from './types'\n\n/**\n * Stickers of the account. The backend serves `GET /stickers` and `POST /stickers` (plus\n * `GET /stickers/exist`, `POST /stickers/add` and `DELETE /stickers/remove/:stickerId`); there is\n * no read by id, update nor `DELETE /stickers/:id`.\n */\nexport class StickersApi extends BaseCrudApi<Sticker, CreateStickerPayload, UpdateStickerPayload> {\n constructor(client: ApiClient) {\n super(client, '/stickers')\n }\n\n /** @deprecated Not served: the backend has no GET /stickers/:id, so this route answers 404. */\n override getById(\n id: string,\n query?: GetByIdQuery<Sticker>,\n headers?: Record<string, string>,\n ): Promise<Sticker> {\n return super.getById(id, query, headers)\n }\n\n /** @deprecated Not served: the backend has no PUT /stickers/:id, so this route answers 404. */\n override updateById(\n id: string,\n body: UpdateStickerPayload,\n headers?: Record<string, string>,\n ): Promise<Sticker> {\n return super.updateById(id, body, headers)\n }\n\n /**\n * @deprecated Not served: the backend has no DELETE /stickers/:id (it removes a sticker by\n * `DELETE /stickers/remove/:stickerId`), so this route answers 404.\n */\n override deleteById(id: string, headers?: Record<string, string>): Promise<Sticker> {\n return super.deleteById(id, headers)\n }\n}\n"],"mappings":";;;;;;;;;AAUA,IAAa,cAAb,cAAiCA,qCAAiE;CAChG,YAAY,QAAmB;AAC7B,QAAM,QAAQ,YAAY;;;CAI5B,AAAS,QACP,IACA,OACA,SACkB;AAClB,SAAO,MAAM,QAAQ,IAAI,OAAO,QAAQ;;;CAI1C,AAAS,WACP,IACA,MACA,SACkB;AAClB,SAAO,MAAM,WAAW,IAAI,MAAM,QAAQ;;;;;;CAO5C,AAAS,WAAW,IAAY,SAAoD;AAClF,SAAO,MAAM,WAAW,IAAI,QAAQ"}
|
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
import type { ApiClient } from '../../core/ApiClient';
|
|
2
2
|
import { BaseCrudApi } from '../../core/BaseCrudApi';
|
|
3
|
+
import type { GetByIdQuery } from '../../core/types';
|
|
3
4
|
import type { Sticker, CreateStickerPayload, UpdateStickerPayload } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* Stickers of the account. The backend serves `GET /stickers` and `POST /stickers` (plus
|
|
7
|
+
* `GET /stickers/exist`, `POST /stickers/add` and `DELETE /stickers/remove/:stickerId`); there is
|
|
8
|
+
* no read by id, update nor `DELETE /stickers/:id`.
|
|
9
|
+
*/
|
|
4
10
|
export declare class StickersApi extends BaseCrudApi<Sticker, CreateStickerPayload, UpdateStickerPayload> {
|
|
5
11
|
constructor(client: ApiClient);
|
|
12
|
+
/** @deprecated Not served: the backend has no GET /stickers/:id, so this route answers 404. */
|
|
13
|
+
getById(id: string, query?: GetByIdQuery<Sticker>, headers?: Record<string, string>): Promise<Sticker>;
|
|
14
|
+
/** @deprecated Not served: the backend has no PUT /stickers/:id, so this route answers 404. */
|
|
15
|
+
updateById(id: string, body: UpdateStickerPayload, headers?: Record<string, string>): Promise<Sticker>;
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated Not served: the backend has no DELETE /stickers/:id (it removes a sticker by
|
|
18
|
+
* `DELETE /stickers/remove/:stickerId`), so this route answers 404.
|
|
19
|
+
*/
|
|
20
|
+
deleteById(id: string, headers?: Record<string, string>): Promise<Sticker>;
|
|
6
21
|
}
|
|
7
22
|
//# sourceMappingURL=StickersApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StickersApi.d.ts","sourceRoot":"","sources":["../../../src/apis/stickers/StickersApi.ts"],"names":[],"mappings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AAO,CAAC,OAAO,CAAC;CAGpF"}
|
|
@@ -1,10 +1,30 @@
|
|
|
1
1
|
import { BaseCrudApi } from "../../core/BaseCrudApi.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/apis/stickers/StickersApi.ts
|
|
4
|
+
/**
|
|
5
|
+
* Stickers of the account. The backend serves `GET /stickers` and `POST /stickers` (plus
|
|
6
|
+
* `GET /stickers/exist`, `POST /stickers/add` and `DELETE /stickers/remove/:stickerId`); there is
|
|
7
|
+
* no read by id, update nor `DELETE /stickers/:id`.
|
|
8
|
+
*/
|
|
4
9
|
var StickersApi = class extends BaseCrudApi {
|
|
5
10
|
constructor(client) {
|
|
6
11
|
super(client, "/stickers");
|
|
7
12
|
}
|
|
13
|
+
/** @deprecated Not served: the backend has no GET /stickers/:id, so this route answers 404. */
|
|
14
|
+
getById(id, query, headers) {
|
|
15
|
+
return super.getById(id, query, headers);
|
|
16
|
+
}
|
|
17
|
+
/** @deprecated Not served: the backend has no PUT /stickers/:id, so this route answers 404. */
|
|
18
|
+
updateById(id, body, headers) {
|
|
19
|
+
return super.updateById(id, body, headers);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated Not served: the backend has no DELETE /stickers/:id (it removes a sticker by
|
|
23
|
+
* `DELETE /stickers/remove/:stickerId`), so this route answers 404.
|
|
24
|
+
*/
|
|
25
|
+
deleteById(id, headers) {
|
|
26
|
+
return super.deleteById(id, headers);
|
|
27
|
+
}
|
|
8
28
|
};
|
|
9
29
|
|
|
10
30
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StickersApi.mjs","names":[],"sources":["../../../src/apis/stickers/StickersApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { Sticker, CreateStickerPayload, UpdateStickerPayload } from './types'\n\nexport class StickersApi extends BaseCrudApi<Sticker, CreateStickerPayload, UpdateStickerPayload> {\n constructor(client: ApiClient) {\n super(client, '/stickers')\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"StickersApi.mjs","names":[],"sources":["../../../src/apis/stickers/StickersApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { GetByIdQuery } from '../../core/types'\nimport type { Sticker, CreateStickerPayload, UpdateStickerPayload } from './types'\n\n/**\n * Stickers of the account. The backend serves `GET /stickers` and `POST /stickers` (plus\n * `GET /stickers/exist`, `POST /stickers/add` and `DELETE /stickers/remove/:stickerId`); there is\n * no read by id, update nor `DELETE /stickers/:id`.\n */\nexport class StickersApi extends BaseCrudApi<Sticker, CreateStickerPayload, UpdateStickerPayload> {\n constructor(client: ApiClient) {\n super(client, '/stickers')\n }\n\n /** @deprecated Not served: the backend has no GET /stickers/:id, so this route answers 404. */\n override getById(\n id: string,\n query?: GetByIdQuery<Sticker>,\n headers?: Record<string, string>,\n ): Promise<Sticker> {\n return super.getById(id, query, headers)\n }\n\n /** @deprecated Not served: the backend has no PUT /stickers/:id, so this route answers 404. */\n override updateById(\n id: string,\n body: UpdateStickerPayload,\n headers?: Record<string, string>,\n ): Promise<Sticker> {\n return super.updateById(id, body, headers)\n }\n\n /**\n * @deprecated Not served: the backend has no DELETE /stickers/:id (it removes a sticker by\n * `DELETE /stickers/remove/:stickerId`), so this route answers 404.\n */\n override deleteById(id: string, headers?: Record<string, string>): Promise<Sticker> {\n return super.deleteById(id, headers)\n }\n}\n"],"mappings":";;;;;;;;AAUA,IAAa,cAAb,cAAiC,YAAiE;CAChG,YAAY,QAAmB;AAC7B,QAAM,QAAQ,YAAY;;;CAI5B,AAAS,QACP,IACA,OACA,SACkB;AAClB,SAAO,MAAM,QAAQ,IAAI,OAAO,QAAQ;;;CAI1C,AAAS,WACP,IACA,MACA,SACkB;AAClB,SAAO,MAAM,WAAW,IAAI,MAAM,QAAQ;;;;;;CAO5C,AAAS,WAAW,IAAY,SAAoD;AAClF,SAAO,MAAM,WAAW,IAAI,QAAQ"}
|
|
@@ -7,6 +7,13 @@ var TagsApi = class extends require_core_BaseCrudApi.BaseCrudApi {
|
|
|
7
7
|
super(client, "/tags");
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
+
* Deletes a tag. Resolves the text `'OK'`; an unknown id answers 500.
|
|
11
|
+
* @permissions tags.view OR tags.destroy
|
|
12
|
+
*/
|
|
13
|
+
deleteById(id, headers) {
|
|
14
|
+
return super.deleteById(id, headers);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
10
17
|
* Adds the tag to every contact of the account that matches the selection. Resolves to `'OK'`,
|
|
11
18
|
* or `false` when every contact already had the tag.
|
|
12
19
|
* @permissions tags.view
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagsApi.cjs","names":["BaseCrudApi"],"sources":["../../../src/apis/tags/TagsApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { ContactsSelection } from '../contacts/types'\nimport type {\n AttachTagsToDepartmentsPayload,\n CreateTagPayload,\n Tag,\n TagContactsLinkResult,\n UpdateTagPayload,\n} from './types'\n\nexport class TagsApi extends BaseCrudApi
|
|
1
|
+
{"version":3,"file":"TagsApi.cjs","names":["BaseCrudApi"],"sources":["../../../src/apis/tags/TagsApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport type { ListQuery } from '../../core/types'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { ContactsSelection } from '../contacts/types'\nimport type {\n AttachTagsToDepartmentsPayload,\n CreateTagPayload,\n Tag,\n TagContactsLinkResult,\n UpdateTagPayload,\n} from './types'\n\nexport class TagsApi extends BaseCrudApi<\n Tag,\n CreateTagPayload,\n UpdateTagPayload,\n ListQuery<Tag>,\n 'OK'\n> {\n constructor(client: ApiClient) {\n super(client, '/tags')\n }\n\n /**\n * Deletes a tag. Resolves the text `'OK'`; an unknown id answers 500.\n * @permissions tags.view OR tags.destroy\n */\n override deleteById(id: string, headers?: Record<string, string>): Promise<'OK'> {\n return super.deleteById(id, headers)\n }\n\n /**\n * Adds the tag to every contact of the account that matches the selection. Resolves to `'OK'`,\n * or `false` when every contact already had the tag.\n * @permissions tags.view\n */\n attachContacts(\n id: string,\n body: ContactsSelection,\n headers?: Record<string, string>,\n ): Promise<TagContactsLinkResult> {\n return this.client.post<TagContactsLinkResult, ContactsSelection>(\n `${this.basePath}/${id}/contacts`,\n body,\n headers,\n )\n }\n\n /**\n * Removes the tag from every contact of the account that matches the selection. Resolves to\n * `'OK'`, or `false` when no contact had the tag.\n * @permissions tags.view OR tags.destroy\n */\n detachContacts(\n id: string,\n body: ContactsSelection,\n headers?: Record<string, string>,\n ): Promise<TagContactsLinkResult> {\n return this.client.request<TagContactsLinkResult, ContactsSelection>(\n 'DELETE',\n `${this.basePath}/${id}/contacts`,\n body,\n headers,\n )\n }\n\n /**\n * Links several tags to the given departments. Resolves to `'OK'`. A tag without departments\n * is already available to all of them and is left unchanged.\n * @permissions tags.view\n */\n attachManyToDepartments(\n body: AttachTagsToDepartmentsPayload,\n headers?: Record<string, string>,\n ): Promise<string> {\n return this.client.post<string, AttachTagsToDepartmentsPayload>(\n `${this.basePath}/attach-many-departments`,\n body,\n headers,\n )\n }\n}\n"],"mappings":";;;;AAYA,IAAa,UAAb,cAA6BA,qCAM3B;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,QAAQ;;;;;;CAOxB,AAAS,WAAW,IAAY,SAAiD;AAC/E,SAAO,MAAM,WAAW,IAAI,QAAQ;;;;;;;CAQtC,eACE,IACA,MACA,SACgC;AAChC,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,GAAG,GAAG,YACvB,MACA,QACD;;;;;;;CAQH,eACE,IACA,MACA,SACgC;AAChC,SAAO,KAAK,OAAO,QACjB,UACA,GAAG,KAAK,SAAS,GAAG,GAAG,YACvB,MACA,QACD;;;;;;;CAQH,wBACE,MACA,SACiB;AACjB,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,2BACjB,MACA,QACD"}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import type { ApiClient } from '../../core/ApiClient';
|
|
2
|
+
import type { ListQuery } from '../../core/types';
|
|
2
3
|
import { BaseCrudApi } from '../../core/BaseCrudApi';
|
|
3
4
|
import type { ContactsSelection } from '../contacts/types';
|
|
4
5
|
import type { AttachTagsToDepartmentsPayload, CreateTagPayload, Tag, TagContactsLinkResult, UpdateTagPayload } from './types';
|
|
5
|
-
export declare class TagsApi extends BaseCrudApi<Tag, CreateTagPayload, UpdateTagPayload> {
|
|
6
|
+
export declare class TagsApi extends BaseCrudApi<Tag, CreateTagPayload, UpdateTagPayload, ListQuery<Tag>, 'OK'> {
|
|
6
7
|
constructor(client: ApiClient);
|
|
8
|
+
/**
|
|
9
|
+
* Deletes a tag. Resolves the text `'OK'`; an unknown id answers 500.
|
|
10
|
+
* @permissions tags.view OR tags.destroy
|
|
11
|
+
*/
|
|
12
|
+
deleteById(id: string, headers?: Record<string, string>): Promise<'OK'>;
|
|
7
13
|
/**
|
|
8
14
|
* Adds the tag to every contact of the account that matches the selection. Resolves to `'OK'`,
|
|
9
15
|
* or `false` when every contact already had the tag.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagsApi.d.ts","sourceRoot":"","sources":["../../../src/apis/tags/TagsApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,KAAK,EACV,8BAA8B,EAC9B,gBAAgB,EAChB,GAAG,EACH,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,SAAS,CAAA;AAEhB,qBAAa,OAAQ,SAAQ,WAAW,
|
|
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sApi = class extends BaseCrudApi {
|
|
|
6
6
|
super(client, "/tags");
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
|
+
* Deletes a tag. Resolves the text `'OK'`; an unknown id answers 500.
|
|
10
|
+
* @permissions tags.view OR tags.destroy
|
|
11
|
+
*/
|
|
12
|
+
deleteById(id, headers) {
|
|
13
|
+
return super.deleteById(id, headers);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
9
16
|
* Adds the tag to every contact of the account that matches the selection. Resolves to `'OK'`,
|
|
10
17
|
* or `false` when every contact already had the tag.
|
|
11
18
|
* @permissions tags.view
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagsApi.mjs","names":[],"sources":["../../../src/apis/tags/TagsApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { ContactsSelection } from '../contacts/types'\nimport type {\n AttachTagsToDepartmentsPayload,\n CreateTagPayload,\n Tag,\n TagContactsLinkResult,\n UpdateTagPayload,\n} from './types'\n\nexport class TagsApi extends BaseCrudApi
|
|
1
|
+
{"version":3,"file":"TagsApi.mjs","names":[],"sources":["../../../src/apis/tags/TagsApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport type { ListQuery } from '../../core/types'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { ContactsSelection } from '../contacts/types'\nimport type {\n AttachTagsToDepartmentsPayload,\n CreateTagPayload,\n Tag,\n TagContactsLinkResult,\n UpdateTagPayload,\n} from './types'\n\nexport class TagsApi extends BaseCrudApi<\n Tag,\n CreateTagPayload,\n UpdateTagPayload,\n ListQuery<Tag>,\n 'OK'\n> {\n constructor(client: ApiClient) {\n super(client, '/tags')\n }\n\n /**\n * Deletes a tag. Resolves the text `'OK'`; an unknown id answers 500.\n * @permissions tags.view OR tags.destroy\n */\n override deleteById(id: string, headers?: Record<string, string>): Promise<'OK'> {\n return super.deleteById(id, headers)\n }\n\n /**\n * Adds the tag to every contact of the account that matches the selection. Resolves to `'OK'`,\n * or `false` when every contact already had the tag.\n * @permissions tags.view\n */\n attachContacts(\n id: string,\n body: ContactsSelection,\n headers?: Record<string, string>,\n ): Promise<TagContactsLinkResult> {\n return this.client.post<TagContactsLinkResult, ContactsSelection>(\n `${this.basePath}/${id}/contacts`,\n body,\n headers,\n )\n }\n\n /**\n * Removes the tag from every contact of the account that matches the selection. Resolves to\n * `'OK'`, or `false` when no contact had the tag.\n * @permissions tags.view OR tags.destroy\n */\n detachContacts(\n id: string,\n body: ContactsSelection,\n headers?: Record<string, string>,\n ): Promise<TagContactsLinkResult> {\n return this.client.request<TagContactsLinkResult, ContactsSelection>(\n 'DELETE',\n `${this.basePath}/${id}/contacts`,\n body,\n headers,\n )\n }\n\n /**\n * Links several tags to the given departments. Resolves to `'OK'`. A tag without departments\n * is already available to all of them and is left unchanged.\n * @permissions tags.view\n */\n attachManyToDepartments(\n body: AttachTagsToDepartmentsPayload,\n headers?: Record<string, string>,\n ): Promise<string> {\n return this.client.post<string, AttachTagsToDepartmentsPayload>(\n `${this.basePath}/attach-many-departments`,\n body,\n headers,\n )\n }\n}\n"],"mappings":";;;AAYA,IAAa,UAAb,cAA6B,YAM3B;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,QAAQ;;;;;;CAOxB,AAAS,WAAW,IAAY,SAAiD;AAC/E,SAAO,MAAM,WAAW,IAAI,QAAQ;;;;;;;CAQtC,eACE,IACA,MACA,SACgC;AAChC,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,GAAG,GAAG,YACvB,MACA,QACD;;;;;;;CAQH,eACE,IACA,MACA,SACgC;AAChC,SAAO,KAAK,OAAO,QACjB,UACA,GAAG,KAAK,SAAS,GAAG,GAAG,YACvB,MACA,QACD;;;;;;;CAQH,wBACE,MACA,SACiB;AACjB,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,2BACjB,MACA,QACD"}
|
|
@@ -6,6 +6,13 @@ var TimetableApi = class extends require_core_BaseCrudApi.BaseCrudApi {
|
|
|
6
6
|
constructor(client) {
|
|
7
7
|
super(client, "/timetable");
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Deletes a timetable. Resolves the text `'OK'`.
|
|
11
|
+
* @permissions timetables.view OR timetables.destroy
|
|
12
|
+
*/
|
|
13
|
+
deleteById(id, headers) {
|
|
14
|
+
return super.deleteById(id, headers);
|
|
15
|
+
}
|
|
9
16
|
};
|
|
10
17
|
|
|
11
18
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimetableApi.cjs","names":["BaseCrudApi"],"sources":["../../../src/apis/timetable/TimetableApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { Timetable, CreateTimetablePayload, UpdateTimetablePayload } from './types'\n\nexport class TimetableApi extends BaseCrudApi<\n Timetable,\n CreateTimetablePayload,\n UpdateTimetablePayload\n> {\n constructor(client: ApiClient) {\n super(client, '/timetable')\n }\n}\n"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"TimetableApi.cjs","names":["BaseCrudApi"],"sources":["../../../src/apis/timetable/TimetableApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport type { ListQuery } from '../../core/types'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { Timetable, CreateTimetablePayload, UpdateTimetablePayload } from './types'\n\nexport class TimetableApi extends BaseCrudApi<\n Timetable,\n CreateTimetablePayload,\n UpdateTimetablePayload,\n ListQuery<Timetable>,\n 'OK'\n> {\n constructor(client: ApiClient) {\n super(client, '/timetable')\n }\n\n /**\n * Deletes a timetable. Resolves the text `'OK'`.\n * @permissions timetables.view OR timetables.destroy\n */\n override deleteById(id: string, headers?: Record<string, string>): Promise<'OK'> {\n return super.deleteById(id, headers)\n }\n}\n"],"mappings":";;;;AAKA,IAAa,eAAb,cAAkCA,qCAMhC;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,aAAa;;;;;;CAO7B,AAAS,WAAW,IAAY,SAAiD;AAC/E,SAAO,MAAM,WAAW,IAAI,QAAQ"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import type { ApiClient } from '../../core/ApiClient';
|
|
2
|
+
import type { ListQuery } from '../../core/types';
|
|
2
3
|
import { BaseCrudApi } from '../../core/BaseCrudApi';
|
|
3
4
|
import type { Timetable, CreateTimetablePayload, UpdateTimetablePayload } from './types';
|
|
4
|
-
export declare class TimetableApi extends BaseCrudApi<Timetable, CreateTimetablePayload, UpdateTimetablePayload> {
|
|
5
|
+
export declare class TimetableApi extends BaseCrudApi<Timetable, CreateTimetablePayload, UpdateTimetablePayload, ListQuery<Timetable>, 'OK'> {
|
|
5
6
|
constructor(client: ApiClient);
|
|
7
|
+
/**
|
|
8
|
+
* Deletes a timetable. Resolves the text `'OK'`.
|
|
9
|
+
* @permissions timetables.view OR timetables.destroy
|
|
10
|
+
*/
|
|
11
|
+
deleteById(id: string, headers?: Record<string, string>): Promise<'OK'>;
|
|
6
12
|
}
|
|
7
13
|
//# sourceMappingURL=TimetableApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimetableApi.d.ts","sourceRoot":"","sources":["../../../src/apis/timetable/TimetableApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAExF,qBAAa,YAAa,SAAQ,WAAW,CAC3C,SAAS,EACT,sBAAsB,EACtB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"TimetableApi.d.ts","sourceRoot":"","sources":["../../../src/apis/timetable/TimetableApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAExF,qBAAa,YAAa,SAAQ,WAAW,CAC3C,SAAS,EACT,sBAAsB,EACtB,sBAAsB,EACtB,SAAS,CAAC,SAAS,CAAC,EACpB,IAAI,CACL;gBACa,MAAM,EAAE,SAAS;IAI7B;;;OAGG;IACM,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAGjF"}
|
|
@@ -5,6 +5,13 @@ var TimetableApi = class extends BaseCrudApi {
|
|
|
5
5
|
constructor(client) {
|
|
6
6
|
super(client, "/timetable");
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Deletes a timetable. Resolves the text `'OK'`.
|
|
10
|
+
* @permissions timetables.view OR timetables.destroy
|
|
11
|
+
*/
|
|
12
|
+
deleteById(id, headers) {
|
|
13
|
+
return super.deleteById(id, headers);
|
|
14
|
+
}
|
|
8
15
|
};
|
|
9
16
|
|
|
10
17
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimetableApi.mjs","names":[],"sources":["../../../src/apis/timetable/TimetableApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { Timetable, CreateTimetablePayload, UpdateTimetablePayload } from './types'\n\nexport class TimetableApi extends BaseCrudApi<\n Timetable,\n CreateTimetablePayload,\n UpdateTimetablePayload\n> {\n constructor(client: ApiClient) {\n super(client, '/timetable')\n }\n}\n"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"TimetableApi.mjs","names":[],"sources":["../../../src/apis/timetable/TimetableApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport type { ListQuery } from '../../core/types'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { Timetable, CreateTimetablePayload, UpdateTimetablePayload } from './types'\n\nexport class TimetableApi extends BaseCrudApi<\n Timetable,\n CreateTimetablePayload,\n UpdateTimetablePayload,\n ListQuery<Timetable>,\n 'OK'\n> {\n constructor(client: ApiClient) {\n super(client, '/timetable')\n }\n\n /**\n * Deletes a timetable. Resolves the text `'OK'`.\n * @permissions timetables.view OR timetables.destroy\n */\n override deleteById(id: string, headers?: Record<string, string>): Promise<'OK'> {\n return super.deleteById(id, headers)\n }\n}\n"],"mappings":";;;AAKA,IAAa,eAAb,cAAkC,YAMhC;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,aAAa;;;;;;CAO7B,AAAS,WAAW,IAAY,SAAiD;AAC/E,SAAO,MAAM,WAAW,IAAI,QAAQ"}
|
|
@@ -7,6 +7,14 @@ var UsersApi = class extends require_core_ArchivableCrudApi.ArchivableCrudApi {
|
|
|
7
7
|
super(client, "/users");
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
+
* Deletes a user (removes it as the default user of the contacts and deletes its webhooks first).
|
|
11
|
+
* Resolves the text `'OK'`.
|
|
12
|
+
* @permissions users.destroy
|
|
13
|
+
*/
|
|
14
|
+
deleteById(id, headers) {
|
|
15
|
+
return super.deleteById(id, headers);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
10
18
|
* Archives or restores a user through the dedicated route used by the UI, which also
|
|
11
19
|
* sets the user offline and ends its sessions. The route enforces the business rules that
|
|
12
20
|
* {@link archive}/{@link unarchive} (a plain `PUT { archivedAt }`) skip:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UsersApi.cjs","names":["ArchivableCrudApi"],"sources":["../../../src/apis/users/UsersApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { ArchivableCrudApi } from '../../core/ArchivableCrudApi'\nimport type { Contact } from '../contacts/types'\nimport type {\n ArchiveUserPayload,\n BulkUsersStatusPayload,\n BulkUsersStatusPreview,\n BulkUsersStatusResult,\n CreateUserPayload,\n EnableUserAccessResult,\n ExportUsersPayload,\n ImportUsersPayload,\n ImportUsersResult,\n TogglePinContactPayload,\n TogglePinContactResult,\n UpdateUserPayload,\n User,\n ValidateUserImportPayload,\n ValidateUserImportResult,\n} from './types'\n\nexport class UsersApi extends ArchivableCrudApi
|
|
1
|
+
{"version":3,"file":"UsersApi.cjs","names":["ArchivableCrudApi"],"sources":["../../../src/apis/users/UsersApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport type { ListQuery } from '../../core/types'\nimport { ArchivableCrudApi } from '../../core/ArchivableCrudApi'\nimport type { Contact } from '../contacts/types'\nimport type {\n ArchiveUserPayload,\n BulkUsersStatusPayload,\n BulkUsersStatusPreview,\n BulkUsersStatusResult,\n CreateUserPayload,\n EnableUserAccessResult,\n ExportUsersPayload,\n ImportUsersPayload,\n ImportUsersResult,\n TogglePinContactPayload,\n TogglePinContactResult,\n UpdateUserPayload,\n User,\n ValidateUserImportPayload,\n ValidateUserImportResult,\n} from './types'\n\nexport class UsersApi extends ArchivableCrudApi<\n User,\n CreateUserPayload,\n UpdateUserPayload,\n ListQuery<User>,\n 'OK'\n> {\n constructor(client: ApiClient) {\n super(client, '/users')\n }\n\n /**\n * Deletes a user (removes it as the default user of the contacts and deletes its webhooks first).\n * Resolves the text `'OK'`.\n * @permissions users.destroy\n */\n override deleteById(id: string, headers?: Record<string, string>): Promise<'OK'> {\n return super.deleteById(id, headers)\n }\n\n /**\n * Archives or restores a user through the dedicated route used by the UI, which also\n * sets the user offline and ends its sessions. The route enforces the business rules that\n * {@link archive}/{@link unarchive} (a plain `PUT { archivedAt }`) skip:\n * - archiving refuses (403) a user referenced by a bot or with open tickets;\n * - restoring refuses (402) when the plan has no free user slot.\n * @permissions users.view OR users.archive\n */\n archiveWithValidation(\n id: string,\n body: ArchiveUserPayload,\n headers?: Record<string, string>,\n ): Promise<User> {\n return this.client.post<User, ArchiveUserPayload>(\n `${this.basePath}/${id}/archive`,\n body,\n headers,\n )\n }\n\n /**\n * Previews a bulk archive/unarchive without changing anything.\n * @permissions users.archive\n */\n previewBulkStatus(\n body: BulkUsersStatusPayload,\n headers?: Record<string, string>,\n ): Promise<BulkUsersStatusPreview> {\n return this.client.post<BulkUsersStatusPreview, BulkUsersStatusPayload>(\n `${this.basePath}/bulk-status/preview`,\n body,\n headers,\n )\n }\n\n /**\n * Archives or unarchives up to 100 users at once.\n * @permissions users.archive\n */\n bulkStatus(\n body: BulkUsersStatusPayload,\n headers?: Record<string, string>,\n ): Promise<BulkUsersStatusResult> {\n return this.client.post<BulkUsersStatusResult, BulkUsersStatusPayload>(\n `${this.basePath}/bulk-status`,\n body,\n headers,\n )\n }\n\n /**\n * Exports the users of the account as CSV. Resolves to the CSV text.\n * @permissions users.export\n */\n exportCsv(body: ExportUsersPayload, headers?: Record<string, string>): Promise<string> {\n return this.client.post<string, ExportUsersPayload>(`${this.basePath}/export`, body, headers)\n }\n\n /**\n * Validates a CSV file previously uploaded through `FilesApi` before importing it.\n * @permissions users.create\n */\n validateImport(\n body: ValidateUserImportPayload,\n headers?: Record<string, string>,\n ): Promise<ValidateUserImportResult> {\n return this.client.post<ValidateUserImportResult, ValidateUserImportPayload>(\n `${this.basePath}/import/validate`,\n body,\n headers,\n )\n }\n\n /**\n * Starts the import of a CSV file previously uploaded through `FilesApi`. The import runs\n * in the background (the route answers `202 Accepted`).\n * @permissions users.create\n */\n startImport(\n body: ImportUsersPayload,\n headers?: Record<string, string>,\n ): Promise<ImportUsersResult> {\n return this.client.post<ImportUsersResult, ImportUsersPayload>(\n `${this.basePath}/import`,\n body,\n headers,\n )\n }\n\n /**\n * Turns off the two-factor authentication (OTP) of a user.\n * @permissions users.update AND myAccount.update\n */\n disableOtpAuth(id: string, headers?: Record<string, string>): Promise<User> {\n return this.client.post<User>(`${this.basePath}/${id}/disable-otp-auth`, undefined, headers)\n }\n\n /**\n * Clears the login throttling of a user blocked by too many failed attempts.\n * @permissions users.update\n */\n enableAccess(id: string, headers?: Record<string, string>): Promise<EnableUserAccessResult> {\n return this.client.post<EnableUserAccessResult>(\n `${this.basePath}/${id}/enable-access`,\n undefined,\n headers,\n )\n }\n\n /**\n * Returns the contacts pinned by the logged user.\n * @permissions contacts.pin\n */\n getPinnedContacts(headers?: Record<string, string>): Promise<Contact[]> {\n return this.client.get<Contact[]>(`${this.basePath}/pin`, headers)\n }\n\n /**\n * Pins the contact for the logged user, or unpins it when already pinned. A user can pin\n * up to 3 contacts. Resolves to the created link rows when pinning, or to the number of\n * removed links when unpinning.\n * @permissions contacts.pin\n */\n togglePinContact(\n body: TogglePinContactPayload,\n headers?: Record<string, string>,\n ): Promise<TogglePinContactResult> {\n return this.client.patch<TogglePinContactResult, TogglePinContactPayload>(\n `${this.basePath}/pin`,\n body,\n headers,\n )\n }\n}\n"],"mappings":";;;;AAsBA,IAAa,WAAb,cAA8BA,iDAM5B;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,SAAS;;;;;;;CAQzB,AAAS,WAAW,IAAY,SAAiD;AAC/E,SAAO,MAAM,WAAW,IAAI,QAAQ;;;;;;;;;;CAWtC,sBACE,IACA,MACA,SACe;AACf,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,GAAG,GAAG,WACvB,MACA,QACD;;;;;;CAOH,kBACE,MACA,SACiC;AACjC,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,uBACjB,MACA,QACD;;;;;;CAOH,WACE,MACA,SACgC;AAChC,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,eACjB,MACA,QACD;;;;;;CAOH,UAAU,MAA0B,SAAmD;AACrF,SAAO,KAAK,OAAO,KAAiC,GAAG,KAAK,SAAS,UAAU,MAAM,QAAQ;;;;;;CAO/F,eACE,MACA,SACmC;AACnC,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,mBACjB,MACA,QACD;;;;;;;CAQH,YACE,MACA,SAC4B;AAC5B,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,UACjB,MACA,QACD;;;;;;CAOH,eAAe,IAAY,SAAiD;AAC1E,SAAO,KAAK,OAAO,KAAW,GAAG,KAAK,SAAS,GAAG,GAAG,oBAAoB,QAAW,QAAQ;;;;;;CAO9F,aAAa,IAAY,SAAmE;AAC1F,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,GAAG,GAAG,iBACvB,QACA,QACD;;;;;;CAOH,kBAAkB,SAAsD;AACtE,SAAO,KAAK,OAAO,IAAe,GAAG,KAAK,SAAS,OAAO,QAAQ;;;;;;;;CASpE,iBACE,MACA,SACiC;AACjC,SAAO,KAAK,OAAO,MACjB,GAAG,KAAK,SAAS,OACjB,MACA,QACD"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import type { ApiClient } from '../../core/ApiClient';
|
|
2
|
+
import type { ListQuery } from '../../core/types';
|
|
2
3
|
import { ArchivableCrudApi } from '../../core/ArchivableCrudApi';
|
|
3
4
|
import type { Contact } from '../contacts/types';
|
|
4
5
|
import type { ArchiveUserPayload, BulkUsersStatusPayload, BulkUsersStatusPreview, BulkUsersStatusResult, CreateUserPayload, EnableUserAccessResult, ExportUsersPayload, ImportUsersPayload, ImportUsersResult, TogglePinContactPayload, TogglePinContactResult, UpdateUserPayload, User, ValidateUserImportPayload, ValidateUserImportResult } from './types';
|
|
5
|
-
export declare class UsersApi extends ArchivableCrudApi<User, CreateUserPayload, UpdateUserPayload> {
|
|
6
|
+
export declare class UsersApi extends ArchivableCrudApi<User, CreateUserPayload, UpdateUserPayload, ListQuery<User>, 'OK'> {
|
|
6
7
|
constructor(client: ApiClient);
|
|
8
|
+
/**
|
|
9
|
+
* Deletes a user (removes it as the default user of the contacts and deletes its webhooks first).
|
|
10
|
+
* Resolves the text `'OK'`.
|
|
11
|
+
* @permissions users.destroy
|
|
12
|
+
*/
|
|
13
|
+
deleteById(id: string, headers?: Record<string, string>): Promise<'OK'>;
|
|
7
14
|
/**
|
|
8
15
|
* Archives or restores a user through the dedicated route used by the UI, which also
|
|
9
16
|
* sets the user offline and ends its sessions. The route enforces the business rules that
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UsersApi.d.ts","sourceRoot":"","sources":["../../../src/apis/users/UsersApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,KAAK,EACV,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,sBAAsB,EACtB,iBAAiB,EACjB,IAAI,EACJ,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,SAAS,CAAA;AAEhB,qBAAa,QAAS,SAAQ,iBAAiB,
|
|
1
|
+
{"version":3,"file":"UsersApi.d.ts","sourceRoot":"","sources":["../../../src/apis/users/UsersApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,KAAK,EACV,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,E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AAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAAC,iBAAiB,CAAC;IAQ7B;;;OAGG;IACH,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3E;;;OAGG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAQ3F;;;OAGG;IACH,iBAAiB,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAIvE;;;;;OAKG;IACH,gBAAgB,CACd,IAAI,EAAE,uBAAuB,EAC7B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAAC,sBAAsB,CAAC;CAOnC"}
|
|
@@ -6,6 +6,14 @@ var UsersApi = class extends ArchivableCrudApi {
|
|
|
6
6
|
super(client, "/users");
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
|
+
* Deletes a user (removes it as the default user of the contacts and deletes its webhooks first).
|
|
10
|
+
* Resolves the text `'OK'`.
|
|
11
|
+
* @permissions users.destroy
|
|
12
|
+
*/
|
|
13
|
+
deleteById(id, headers) {
|
|
14
|
+
return super.deleteById(id, headers);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
9
17
|
* Archives or restores a user through the dedicated route used by the UI, which also
|
|
10
18
|
* sets the user offline and ends its sessions. The route enforces the business rules that
|
|
11
19
|
* {@link archive}/{@link unarchive} (a plain `PUT { archivedAt }`) skip:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UsersApi.mjs","names":[],"sources":["../../../src/apis/users/UsersApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { ArchivableCrudApi } from '../../core/ArchivableCrudApi'\nimport type { Contact } from '../contacts/types'\nimport type {\n ArchiveUserPayload,\n BulkUsersStatusPayload,\n BulkUsersStatusPreview,\n BulkUsersStatusResult,\n CreateUserPayload,\n EnableUserAccessResult,\n ExportUsersPayload,\n ImportUsersPayload,\n ImportUsersResult,\n TogglePinContactPayload,\n TogglePinContactResult,\n UpdateUserPayload,\n User,\n ValidateUserImportPayload,\n ValidateUserImportResult,\n} from './types'\n\nexport class UsersApi extends ArchivableCrudApi
|
|
1
|
+
{"version":3,"file":"UsersApi.mjs","names":[],"sources":["../../../src/apis/users/UsersApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport type { ListQuery } from '../../core/types'\nimport { ArchivableCrudApi } from '../../core/ArchivableCrudApi'\nimport type { Contact } from '../contacts/types'\nimport type {\n ArchiveUserPayload,\n BulkUsersStatusPayload,\n BulkUsersStatusPreview,\n BulkUsersStatusResult,\n CreateUserPayload,\n EnableUserAccessResult,\n ExportUsersPayload,\n ImportUsersPayload,\n ImportUsersResult,\n TogglePinContactPayload,\n TogglePinContactResult,\n UpdateUserPayload,\n User,\n ValidateUserImportPayload,\n ValidateUserImportResult,\n} from './types'\n\nexport class UsersApi extends ArchivableCrudApi<\n User,\n CreateUserPayload,\n UpdateUserPayload,\n ListQuery<User>,\n 'OK'\n> {\n constructor(client: ApiClient) {\n super(client, '/users')\n }\n\n /**\n * Deletes a user (removes it as the default user of the contacts and deletes its webhooks first).\n * Resolves the text `'OK'`.\n * @permissions users.destroy\n */\n override deleteById(id: string, headers?: Record<string, string>): Promise<'OK'> {\n return super.deleteById(id, headers)\n }\n\n /**\n * Archives or restores a user through the dedicated route used by the UI, which also\n * sets the user offline and ends its sessions. The route enforces the business rules that\n * {@link archive}/{@link unarchive} (a plain `PUT { archivedAt }`) skip:\n * - archiving refuses (403) a user referenced by a bot or with open tickets;\n * - restoring refuses (402) when the plan has no free user slot.\n * @permissions users.view OR users.archive\n */\n archiveWithValidation(\n id: string,\n body: ArchiveUserPayload,\n headers?: Record<string, string>,\n ): Promise<User> {\n return this.client.post<User, ArchiveUserPayload>(\n `${this.basePath}/${id}/archive`,\n body,\n headers,\n )\n }\n\n /**\n * Previews a bulk archive/unarchive without changing anything.\n * @permissions users.archive\n */\n previewBulkStatus(\n body: BulkUsersStatusPayload,\n headers?: Record<string, string>,\n ): Promise<BulkUsersStatusPreview> {\n return this.client.post<BulkUsersStatusPreview, BulkUsersStatusPayload>(\n `${this.basePath}/bulk-status/preview`,\n body,\n headers,\n )\n }\n\n /**\n * Archives or unarchives up to 100 users at once.\n * @permissions users.archive\n */\n bulkStatus(\n body: BulkUsersStatusPayload,\n headers?: Record<string, string>,\n ): Promise<BulkUsersStatusResult> {\n return this.client.post<BulkUsersStatusResult, BulkUsersStatusPayload>(\n `${this.basePath}/bulk-status`,\n body,\n headers,\n )\n }\n\n /**\n * Exports the users of the account as CSV. Resolves to the CSV text.\n * @permissions users.export\n */\n exportCsv(body: ExportUsersPayload, headers?: Record<string, string>): Promise<string> {\n return this.client.post<string, ExportUsersPayload>(`${this.basePath}/export`, body, headers)\n }\n\n /**\n * Validates a CSV file previously uploaded through `FilesApi` before importing it.\n * @permissions users.create\n */\n validateImport(\n body: ValidateUserImportPayload,\n headers?: Record<string, string>,\n ): Promise<ValidateUserImportResult> {\n return this.client.post<ValidateUserImportResult, ValidateUserImportPayload>(\n `${this.basePath}/import/validate`,\n body,\n headers,\n )\n }\n\n /**\n * Starts the import of a CSV file previously uploaded through `FilesApi`. The import runs\n * in the background (the route answers `202 Accepted`).\n * @permissions users.create\n */\n startImport(\n body: ImportUsersPayload,\n headers?: Record<string, string>,\n ): Promise<ImportUsersResult> {\n return this.client.post<ImportUsersResult, ImportUsersPayload>(\n `${this.basePath}/import`,\n body,\n headers,\n )\n }\n\n /**\n * Turns off the two-factor authentication (OTP) of a user.\n * @permissions users.update AND myAccount.update\n */\n disableOtpAuth(id: string, headers?: Record<string, string>): Promise<User> {\n return this.client.post<User>(`${this.basePath}/${id}/disable-otp-auth`, undefined, headers)\n }\n\n /**\n * Clears the login throttling of a user blocked by too many failed attempts.\n * @permissions users.update\n */\n enableAccess(id: string, headers?: Record<string, string>): Promise<EnableUserAccessResult> {\n return this.client.post<EnableUserAccessResult>(\n `${this.basePath}/${id}/enable-access`,\n undefined,\n headers,\n )\n }\n\n /**\n * Returns the contacts pinned by the logged user.\n * @permissions contacts.pin\n */\n getPinnedContacts(headers?: Record<string, string>): Promise<Contact[]> {\n return this.client.get<Contact[]>(`${this.basePath}/pin`, headers)\n }\n\n /**\n * Pins the contact for the logged user, or unpins it when already pinned. A user can pin\n * up to 3 contacts. Resolves to the created link rows when pinning, or to the number of\n * removed links when unpinning.\n * @permissions contacts.pin\n */\n togglePinContact(\n body: TogglePinContactPayload,\n headers?: Record<string, string>,\n ): Promise<TogglePinContactResult> {\n return this.client.patch<TogglePinContactResult, TogglePinContactPayload>(\n `${this.basePath}/pin`,\n body,\n headers,\n )\n }\n}\n"],"mappings":";;;AAsBA,IAAa,WAAb,cAA8B,kBAM5B;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,SAAS;;;;;;;CAQzB,AAAS,WAAW,IAAY,SAAiD;AAC/E,SAAO,MAAM,WAAW,IAAI,QAAQ;;;;;;;;;;CAWtC,sBACE,IACA,MACA,SACe;AACf,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,GAAG,GAAG,WACvB,MACA,QACD;;;;;;CAOH,kBACE,MACA,SACiC;AACjC,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,uBACjB,MACA,QACD;;;;;;CAOH,WACE,MACA,SACgC;AAChC,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,eACjB,MACA,QACD;;;;;;CAOH,UAAU,MAA0B,SAAmD;AACrF,SAAO,KAAK,OAAO,KAAiC,GAAG,KAAK,SAAS,UAAU,MAAM,QAAQ;;;;;;CAO/F,eACE,MACA,SACmC;AACnC,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,mBACjB,MACA,QACD;;;;;;;CAQH,YACE,MACA,SAC4B;AAC5B,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,UACjB,MACA,QACD;;;;;;CAOH,eAAe,IAAY,SAAiD;AAC1E,SAAO,KAAK,OAAO,KAAW,GAAG,KAAK,SAAS,GAAG,GAAG,oBAAoB,QAAW,QAAQ;;;;;;CAO9F,aAAa,IAAY,SAAmE;AAC1F,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,GAAG,GAAG,iBACvB,QACA,QACD;;;;;;CAOH,kBAAkB,SAAsD;AACtE,SAAO,KAAK,OAAO,IAAe,GAAG,KAAK,SAAS,OAAO,QAAQ;;;;;;;;CASpE,iBACE,MACA,SACiC;AACjC,SAAO,KAAK,OAAO,MACjB,GAAG,KAAK,SAAS,OACjB,MACA,QACD"}
|
|
@@ -63,7 +63,12 @@ export type CreateUserPayload = {
|
|
|
63
63
|
isClientUser?: boolean;
|
|
64
64
|
roles?: string[];
|
|
65
65
|
departments?: string[];
|
|
66
|
+
/** @deprecated Not read by the backend: restrict the connections with `restrictedServices`. */
|
|
66
67
|
services?: string[];
|
|
68
|
+
/** Connections the user cannot access, as `{ value: serviceId }`. */
|
|
69
|
+
restrictedServices?: {
|
|
70
|
+
value: string;
|
|
71
|
+
}[];
|
|
67
72
|
scheduleId?: string;
|
|
68
73
|
};
|
|
69
74
|
export type UpdateUserPayload = {
|
|
@@ -74,7 +79,17 @@ export type UpdateUserPayload = {
|
|
|
74
79
|
isClientUser?: boolean;
|
|
75
80
|
roles?: string[];
|
|
76
81
|
departments?: string[];
|
|
82
|
+
/** @deprecated Not read by the backend: restrict the connections with `restrictedServices`. */
|
|
77
83
|
services?: string[];
|
|
84
|
+
/**
|
|
85
|
+
* Connections the user cannot access, as `{ value: serviceId }`. Every update without it (and
|
|
86
|
+
* every update of an admin) clears the restrictions of the user.
|
|
87
|
+
*/
|
|
88
|
+
restrictedServices?: {
|
|
89
|
+
value: string;
|
|
90
|
+
}[];
|
|
91
|
+
/** New password of the user. */
|
|
92
|
+
password?: string;
|
|
78
93
|
timetableId?: string | null;
|
|
79
94
|
preferences?: UserPreferences;
|
|
80
95
|
language?: string;
|