@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
package/dist/core/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAA;AAIxD,KAAK,mBAAmB,CAAC,CAAC,GAAG,SAAS,IAAI;IACxC,GAAG,CAAC,EAAE,CAAC,CAAA;IACP,GAAG,CAAC,EAAE,CAAC,CAAA;IACP,GAAG,CAAC,EAAE,CAAC,CAAA;IACP,IAAI,CAAC,EAAE,CAAC,CAAA;IACR,GAAG,CAAC,EAAE,CAAC,CAAA;IACP,IAAI,CAAC,EAAE,CAAC,CAAA;IACR,GAAG,CAAC,EAAE,IAAI,GAAG,OAAO,CAAA;IACpB,IAAI,CAAC,EAAE,CAAC,CAAA;CACT,CAAA;AAED,KAAK,eAAe,GAAG;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,C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,OAAO;IAC/C,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC,CAAA;CAC5F;AAED,MAAM,WAAW,aAAa,CAAC,SAAS;IACtC,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC,CAAA;CAC7E;AAED,MAAM,MAAM,OAAO,CACjB,SAAS,EACT,OAAO,EACP,OAAO,GAAG,OAAO,EACjB,MAAM,SAAS,SAAS,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,SAAS,CAAC,EAC1D,eAAe,GAAG,SAAS,EAC3B,eAAe,GAAG,SAAS,EAC3B,eAAe,GAAG,SAAS,IACzB,UAAU,CAAC,SAAS,EAAE,MAAM,CAAC,GAC/B,UAAU,CAAC,SAAS,CAAC,GACrB,SAAS,CAAC,eAAe,EAAE,OAAO,CAAC,GACnC,aAAa,CAAC,eAAe,EAAE,OAAO,CAAC,GACvC,aAAa,CAAC,eAAe,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,28 @@
|
|
|
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 { Absence, CreateAbsencePayload, UpdateAbsencePayload } from './types'
|
|
4
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Absences of the users. The backend serves the report (`GET /absence`), `POST /absence` and
|
|
8
|
+
* `PUT /absence/:id`; there is no read by id nor delete.
|
|
9
|
+
*/
|
|
5
10
|
export class AbsenceApi extends BaseCrudApi<Absence, CreateAbsencePayload, UpdateAbsencePayload> {
|
|
6
11
|
constructor(client: ApiClient) {
|
|
7
12
|
super(client, '/absence')
|
|
8
13
|
}
|
|
14
|
+
|
|
15
|
+
/** @deprecated Not served: the backend has no GET /absence/:id, so this route answers 404. */
|
|
16
|
+
override getById(
|
|
17
|
+
id: string,
|
|
18
|
+
query?: GetByIdQuery<Absence>,
|
|
19
|
+
headers?: Record<string, string>,
|
|
20
|
+
): Promise<Absence> {
|
|
21
|
+
return super.getById(id, query, headers)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** @deprecated Not served: the backend has no DELETE /absence/:id, so this route answers 404. */
|
|
25
|
+
override deleteById(id: string, headers?: Record<string, string>): Promise<Absence> {
|
|
26
|
+
return super.deleteById(id, headers)
|
|
27
|
+
}
|
|
9
28
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
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 {
|
|
4
5
|
AcceptanceTerm,
|
|
@@ -9,9 +10,20 @@ import type {
|
|
|
9
10
|
export class AcceptanceTermsApi extends BaseCrudApi<
|
|
10
11
|
AcceptanceTerm,
|
|
11
12
|
CreateAcceptanceTermPayload,
|
|
12
|
-
UpdateAcceptanceTermPayload
|
|
13
|
+
UpdateAcceptanceTermPayload,
|
|
14
|
+
ListQuery<AcceptanceTerm>,
|
|
15
|
+
void
|
|
13
16
|
> {
|
|
14
17
|
constructor(client: ApiClient) {
|
|
15
18
|
super(client, '/acceptance-terms')
|
|
16
19
|
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Deletes an acceptance term. Resolves with no body; a term in use answers 404 `{ message: 'Term
|
|
23
|
+
* in use' }`.
|
|
24
|
+
* @permissions acceptanceTerms.view OR acceptanceTerms.destroy
|
|
25
|
+
*/
|
|
26
|
+
override deleteById(id: string, headers?: Record<string, string>): Promise<void> {
|
|
27
|
+
return super.deleteById(id, headers)
|
|
28
|
+
}
|
|
17
29
|
}
|
|
@@ -2,6 +2,11 @@ import type { ApiClient } from '../../core/ApiClient'
|
|
|
2
2
|
import { BaseCrudApi } from '../../core/BaseCrudApi'
|
|
3
3
|
import type { Account, CreateAccountPayload, UpdateAccountPayload } from './types'
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Not served: the backend mounts no `/accounts` route, so every method answers 404
|
|
7
|
+
* `Route not found.`. Read and update the account of the user with `MeApi.getAccount` and
|
|
8
|
+
* `MeApi.updateAccount`; `/admin/accounts` is a super admin route, kept out of the SDK.
|
|
9
|
+
*/
|
|
5
10
|
export class AccountsApi extends BaseCrudApi<Account, CreateAccountPayload, UpdateAccountPayload> {
|
|
6
11
|
constructor(client: ApiClient) {
|
|
7
12
|
super(client, '/accounts')
|
|
@@ -121,6 +121,8 @@ export type AccountSettingsCampaign = {
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
export type AccountSettings = {
|
|
124
|
+
/** Enables the block list (required by `ContactsApi.block`). */
|
|
125
|
+
isBlockListActive?: boolean
|
|
124
126
|
/** Feature flags that toggle specific platform capabilities. */
|
|
125
127
|
flags?: AccountSettingsFlags
|
|
126
128
|
/** Enables/disables specific communication channels (whatsapp, telegram, webchat, etc.). */
|
|
@@ -2,6 +2,10 @@ import type { ApiClient } from '../../core/ApiClient'
|
|
|
2
2
|
import { BaseCrudApi } from '../../core/BaseCrudApi'
|
|
3
3
|
import type { ActivityLog, CreateActivityLogPayload, UpdateActivityLogPayload } from './types'
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Activity log of the account (stored in MongoDB: the routes answer 503 when it is unavailable).
|
|
7
|
+
* The backend serves `GET /log`, `GET /log/:id` and `POST /log`; there is no update or delete.
|
|
8
|
+
*/
|
|
5
9
|
export class ActivityLogApi extends BaseCrudApi<
|
|
6
10
|
ActivityLog,
|
|
7
11
|
CreateActivityLogPayload,
|
|
@@ -10,4 +14,18 @@ export class ActivityLogApi extends BaseCrudApi<
|
|
|
10
14
|
constructor(client: ApiClient) {
|
|
11
15
|
super(client, '/log')
|
|
12
16
|
}
|
|
17
|
+
|
|
18
|
+
/** @deprecated Not served: the backend has no PUT /log/:id, so this route answers 404. */
|
|
19
|
+
override updateById(
|
|
20
|
+
id: string,
|
|
21
|
+
body: UpdateActivityLogPayload,
|
|
22
|
+
headers?: Record<string, string>,
|
|
23
|
+
): Promise<ActivityLog> {
|
|
24
|
+
return super.updateById(id, body, headers)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** @deprecated Not served: the backend has no DELETE /log/:id, so this route answers 404. */
|
|
28
|
+
override deleteById(id: string, headers?: Record<string, string>): Promise<ActivityLog> {
|
|
29
|
+
return super.deleteById(id, headers)
|
|
30
|
+
}
|
|
13
31
|
}
|
|
@@ -1,13 +1,24 @@
|
|
|
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 { Category, CreateCategoryPayload, UpdateCategoryPayload } from './types'
|
|
4
5
|
|
|
5
6
|
export class CategoriesApi extends BaseCrudApi<
|
|
6
7
|
Category,
|
|
7
8
|
CreateCategoryPayload,
|
|
8
|
-
UpdateCategoryPayload
|
|
9
|
+
UpdateCategoryPayload,
|
|
10
|
+
ListQuery<Category>,
|
|
11
|
+
'OK'
|
|
9
12
|
> {
|
|
10
13
|
constructor(client: ApiClient) {
|
|
11
14
|
super(client, '/categories')
|
|
12
15
|
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Deletes a category. Resolves the text `'OK'`; an unknown id answers 500. The route checks no
|
|
19
|
+
* permission.
|
|
20
|
+
*/
|
|
21
|
+
override deleteById(id: string, headers?: Record<string, string>): Promise<'OK'> {
|
|
22
|
+
return super.deleteById(id, headers)
|
|
23
|
+
}
|
|
13
24
|
}
|
|
@@ -8,7 +8,11 @@ export class ClientFeedbackApi
|
|
|
8
8
|
{
|
|
9
9
|
private readonly basePath = '/client-feedback'
|
|
10
10
|
|
|
11
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated The route is broken in the backend: it is mounted with no authentication (the
|
|
13
|
+
* account context throws, 500) and calls a `createFeedback` the resource does not have. The
|
|
14
|
+
* feedback on the AI summary is stored when the ticket is closed.
|
|
15
|
+
*/
|
|
12
16
|
create(
|
|
13
17
|
body: CreateClientFeedbackPayload,
|
|
14
18
|
headers?: Record<string, string>,
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { beforeEach, describe, expect, it, vi } from 'vitest'
|
|
2
|
+
import { ContactBlockListsApi } from './ContactBlockListsApi'
|
|
3
|
+
import type { ApiClient } from '../../core/ApiClient'
|
|
4
|
+
|
|
5
|
+
// ── Mock client factory ──────────────────────────────────────────────
|
|
6
|
+
|
|
7
|
+
function createMockClient(): ApiClient {
|
|
8
|
+
return {
|
|
9
|
+
setAccessToken: vi.fn().mockReturnThis(),
|
|
10
|
+
request: vi.fn(),
|
|
11
|
+
get: vi.fn(),
|
|
12
|
+
post: vi.fn(),
|
|
13
|
+
put: vi.fn(),
|
|
14
|
+
patch: vi.fn(),
|
|
15
|
+
delete: vi.fn(),
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// ── Tests ────────────────────────────────────────────────────────────
|
|
20
|
+
|
|
21
|
+
describe('ContactBlockListsApi', () => {
|
|
22
|
+
let client: ReturnType<typeof createMockClient>
|
|
23
|
+
let api: ContactBlockListsApi
|
|
24
|
+
|
|
25
|
+
beforeEach(() => {
|
|
26
|
+
client = createMockClient()
|
|
27
|
+
api = new ContactBlockListsApi(client)
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
describe('count', () => {
|
|
31
|
+
it('calls client.get with /contact-block-lists/count when no query is provided', async () => {
|
|
32
|
+
vi.mocked(client.get).mockResolvedValue({ count: 3 })
|
|
33
|
+
await expect(api.count()).resolves.toEqual({ count: 3 })
|
|
34
|
+
expect(client.get).toHaveBeenCalledWith('/contact-block-lists/count', undefined)
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
it('serializes the query and forwards custom headers', async () => {
|
|
38
|
+
const headers = { 'X-Custom': 'value' }
|
|
39
|
+
vi.mocked(client.get).mockResolvedValue({ count: 1 })
|
|
40
|
+
await api.count({ where: { name: 'QA' } }, headers)
|
|
41
|
+
const [url, sent] = vi.mocked(client.get).mock.calls[0] ?? []
|
|
42
|
+
expect(url).toContain('/contact-block-lists/count?')
|
|
43
|
+
expect(url).toContain('where')
|
|
44
|
+
expect(sent).toBe(headers)
|
|
45
|
+
})
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
it('create posts the name and the file of the CSV', async () => {
|
|
49
|
+
vi.mocked(client.post).mockResolvedValue({ id: 'list-1', status: 'ready' })
|
|
50
|
+
await api.create({ name: 'QA', fileId: 'file-1', defaultDDI: '55' })
|
|
51
|
+
expect(client.post).toHaveBeenCalledWith(
|
|
52
|
+
'/contact-block-lists',
|
|
53
|
+
{ name: 'QA', fileId: 'file-1', defaultDDI: '55' },
|
|
54
|
+
undefined,
|
|
55
|
+
)
|
|
56
|
+
})
|
|
57
|
+
})
|
|
@@ -1,4 +1,5 @@
|
|
|
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 {
|
|
4
5
|
ContactBlockList,
|
|
@@ -6,12 +7,67 @@ import type {
|
|
|
6
7
|
UpdateContactBlockListPayload,
|
|
7
8
|
} from './types'
|
|
8
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Lists of numbers to block. A list is processed in the background after it is created (`status`
|
|
12
|
+
* `ready` → `done` or `error`). `getById` answers `null` for an unknown id.
|
|
13
|
+
*/
|
|
9
14
|
export class ContactBlockListsApi extends BaseCrudApi<
|
|
10
15
|
ContactBlockList,
|
|
11
16
|
CreateContactBlockListPayload,
|
|
12
|
-
UpdateContactBlockListPayload
|
|
17
|
+
UpdateContactBlockListPayload,
|
|
18
|
+
ListQuery<ContactBlockList>,
|
|
19
|
+
'OK'
|
|
13
20
|
> {
|
|
14
21
|
constructor(client: ApiClient) {
|
|
15
22
|
super(client, '/contact-block-lists')
|
|
16
23
|
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Counts the block lists matching the query.
|
|
27
|
+
* @permissions contacts.view OR contacts.block
|
|
28
|
+
*/
|
|
29
|
+
count(
|
|
30
|
+
query?: ListQuery<ContactBlockList>,
|
|
31
|
+
headers?: Record<string, string>,
|
|
32
|
+
): Promise<{ count: number }> {
|
|
33
|
+
return this.client.get<{ count: number }>(
|
|
34
|
+
`${this.basePath}/count${this.toQueryString(query)}`,
|
|
35
|
+
headers,
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Creates a block list from a CSV uploaded with `FilesApi.createToUpload` (`attachedType:
|
|
41
|
+
* 'contact_block_list.file'` — with any other type the list is never processed). The CSV is
|
|
42
|
+
* comma-separated with the columns `ddi,number` (an empty DDI takes `defaultDDI`); invalid numbers are
|
|
43
|
+
* skipped. Resolves the list with `status: 'ready'`.
|
|
44
|
+
* @permissions contacts.view OR contacts.block
|
|
45
|
+
*/
|
|
46
|
+
override create(
|
|
47
|
+
body: CreateContactBlockListPayload,
|
|
48
|
+
headers?: Record<string, string>,
|
|
49
|
+
): Promise<ContactBlockList> {
|
|
50
|
+
return super.create(body, headers)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Updates a block list. `name` is required by the backend (400 without it). An unknown id answers 500.
|
|
55
|
+
* @permissions contacts.view OR contacts.update OR contacts.block
|
|
56
|
+
*/
|
|
57
|
+
override updateById(
|
|
58
|
+
id: string,
|
|
59
|
+
body: UpdateContactBlockListPayload,
|
|
60
|
+
headers?: Record<string, string>,
|
|
61
|
+
): Promise<ContactBlockList> {
|
|
62
|
+
return super.updateById(id, body, headers)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Deletes a block list and its numbers. Resolves the text `'OK'`; a list being processed (or with
|
|
67
|
+
* a block/unblock in progress) answers 500.
|
|
68
|
+
* @permissions contacts.view OR contacts.destroy OR contacts.block
|
|
69
|
+
*/
|
|
70
|
+
override deleteById(id: string, headers?: Record<string, string>): Promise<'OK'> {
|
|
71
|
+
return super.deleteById(id, headers)
|
|
72
|
+
}
|
|
17
73
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { File } from '../files/types'
|
|
1
2
|
import type { User } from '../users/types'
|
|
2
3
|
|
|
3
4
|
export type ContactBlockListStatus = 'ready' | 'processing' | 'done' | 'error'
|
|
@@ -17,9 +18,11 @@ export type ContactBlockList = {
|
|
|
17
18
|
deletedAt: string | null
|
|
18
19
|
// relationships
|
|
19
20
|
user?: User
|
|
21
|
+
/** The uploaded CSV (`include: ['importFile']`). */
|
|
22
|
+
importFile?: File
|
|
20
23
|
}
|
|
21
24
|
|
|
22
|
-
export type ContactBlockListRelationships = 'user'
|
|
25
|
+
export type ContactBlockListRelationships = 'user' | 'importFile'
|
|
23
26
|
|
|
24
27
|
export type CreateContactBlockListPayload = {
|
|
25
28
|
name: string
|
|
@@ -29,7 +32,9 @@ export type CreateContactBlockListPayload = {
|
|
|
29
32
|
}
|
|
30
33
|
|
|
31
34
|
export type UpdateContactBlockListPayload = {
|
|
35
|
+
/** Required by the backend (400 without it), even to change only `defaultDDI`. */
|
|
32
36
|
name?: string
|
|
37
|
+
/** @deprecated Ignored by the backend: the numbers come only from the CSV of the create. */
|
|
33
38
|
contacts?: string[]
|
|
34
39
|
defaultDDI?: string | null
|
|
35
40
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { beforeEach, describe, expect, it, vi } from 'vitest'
|
|
2
|
+
import { ContactBlockListsControlsApi } from './ContactBlockListsControlsApi'
|
|
3
|
+
import type { ApiClient } from '../../core/ApiClient'
|
|
4
|
+
|
|
5
|
+
// ── Mock client factory ──────────────────────────────────────────────
|
|
6
|
+
|
|
7
|
+
function createMockClient(): ApiClient {
|
|
8
|
+
return {
|
|
9
|
+
setAccessToken: vi.fn().mockReturnThis(),
|
|
10
|
+
request: vi.fn(),
|
|
11
|
+
get: vi.fn(),
|
|
12
|
+
post: vi.fn(),
|
|
13
|
+
put: vi.fn(),
|
|
14
|
+
patch: vi.fn(),
|
|
15
|
+
delete: vi.fn(),
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// ── Tests ────────────────────────────────────────────────────────────
|
|
20
|
+
|
|
21
|
+
describe('ContactBlockListsControlsApi', () => {
|
|
22
|
+
let client: ReturnType<typeof createMockClient>
|
|
23
|
+
let api: ContactBlockListsControlsApi
|
|
24
|
+
|
|
25
|
+
beforeEach(() => {
|
|
26
|
+
client = createMockClient()
|
|
27
|
+
api = new ContactBlockListsControlsApi(client)
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
it('count calls client.get with /contact-block-lists-controls/count', async () => {
|
|
31
|
+
vi.mocked(client.get).mockResolvedValue({ count: 2 })
|
|
32
|
+
await expect(api.count()).resolves.toEqual({ count: 2 })
|
|
33
|
+
expect(client.get).toHaveBeenCalledWith('/contact-block-lists-controls/count', undefined)
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
it('create posts the runs and resolves with no body', async () => {
|
|
37
|
+
vi.mocked(client.post).mockResolvedValue(undefined)
|
|
38
|
+
const body = {
|
|
39
|
+
reason: 'QA',
|
|
40
|
+
servicesIds: ['svc-1'],
|
|
41
|
+
contactBlockListsIds: ['list-1'],
|
|
42
|
+
action: 'block' as const,
|
|
43
|
+
revertExceptions: false,
|
|
44
|
+
}
|
|
45
|
+
await expect(api.create(body)).resolves.toBeUndefined()
|
|
46
|
+
expect(client.post).toHaveBeenCalledWith('/contact-block-lists-controls', body, undefined)
|
|
47
|
+
})
|
|
48
|
+
})
|
|
@@ -1,4 +1,5 @@
|
|
|
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 {
|
|
4
5
|
ContactBlockListsControl,
|
|
@@ -6,12 +7,69 @@ import type {
|
|
|
6
7
|
UpdateContactBlockListsControlPayload,
|
|
7
8
|
} from './types'
|
|
8
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Block/unblock runs of block lists over connections. A run blocks (or unblocks) the contacts of the
|
|
12
|
+
* connection whose numbers are in the list, in the background, and blocking closes their open tickets.
|
|
13
|
+
* `getById` answers `null` for an unknown id.
|
|
14
|
+
*/
|
|
9
15
|
export class ContactBlockListsControlsApi extends BaseCrudApi<
|
|
10
16
|
ContactBlockListsControl,
|
|
11
17
|
CreateContactBlockListsControlPayload,
|
|
12
|
-
UpdateContactBlockListsControlPayload
|
|
18
|
+
UpdateContactBlockListsControlPayload,
|
|
19
|
+
ListQuery<ContactBlockListsControl>,
|
|
20
|
+
'OK',
|
|
21
|
+
void
|
|
13
22
|
> {
|
|
14
23
|
constructor(client: ApiClient) {
|
|
15
24
|
super(client, '/contact-block-lists-controls')
|
|
16
25
|
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Counts the runs matching the query.
|
|
29
|
+
* @permissions contacts.view OR contacts.block
|
|
30
|
+
*/
|
|
31
|
+
count(
|
|
32
|
+
query?: ListQuery<ContactBlockListsControl>,
|
|
33
|
+
headers?: Record<string, string>,
|
|
34
|
+
): Promise<{ count: number }> {
|
|
35
|
+
return this.client.get<{ count: number }>(
|
|
36
|
+
`${this.basePath}/count${this.toQueryString(query)}`,
|
|
37
|
+
headers,
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Starts the runs: one per connection × list of the body, all with the same `reason`. Resolves with no
|
|
43
|
+
* body — find the runs with `getMany` by `reason`.
|
|
44
|
+
* @permissions contacts.view OR contacts.block
|
|
45
|
+
*/
|
|
46
|
+
override create(
|
|
47
|
+
body: CreateContactBlockListsControlPayload,
|
|
48
|
+
headers?: Record<string, string>,
|
|
49
|
+
): Promise<void> {
|
|
50
|
+
return super.create(body, headers)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Updates a run. The backend requires `reason`, `servicesIds`, `contactBlockListsIds` and `action` (400
|
|
55
|
+
* without them), but ignores the ids, and a new `action` does not run anything again. An unknown id
|
|
56
|
+
* answers 500.
|
|
57
|
+
* @permissions contacts.view OR contacts.update OR contacts.block
|
|
58
|
+
*/
|
|
59
|
+
override updateById(
|
|
60
|
+
id: string,
|
|
61
|
+
body: UpdateContactBlockListsControlPayload,
|
|
62
|
+
headers?: Record<string, string>,
|
|
63
|
+
): Promise<ContactBlockListsControl> {
|
|
64
|
+
return super.updateById(id, body, headers)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Deletes a block/unblock run. Resolves the text `'OK'`; it does not undo the contacts already
|
|
69
|
+
* blocked or unblocked.
|
|
70
|
+
* @permissions contacts.view OR contacts.destroy OR contacts.block
|
|
71
|
+
*/
|
|
72
|
+
override deleteById(id: string, headers?: Record<string, string>): Promise<'OK'> {
|
|
73
|
+
return super.deleteById(id, headers)
|
|
74
|
+
}
|
|
17
75
|
}
|
|
@@ -31,12 +31,19 @@ export type ContactBlockListsControl = {
|
|
|
31
31
|
export type ContactBlockListsControlRelationships = 'contactBlockList' | 'user' | 'service'
|
|
32
32
|
|
|
33
33
|
export type CreateContactBlockListsControlPayload = {
|
|
34
|
+
/** Unique in the account (409 when another run already has it). */
|
|
34
35
|
reason: string
|
|
35
36
|
servicesIds: string[]
|
|
36
37
|
contactBlockListsIds: string[]
|
|
37
38
|
action: ContactBlockListsControlAction
|
|
39
|
+
/**
|
|
40
|
+
* Applies the opposite action to the contacts of the connection that are NOT in the list: with `block`, it
|
|
41
|
+
* unblocks them; with `unblock`, it blocks all of them.
|
|
42
|
+
*/
|
|
43
|
+
revertExceptions?: boolean
|
|
38
44
|
}
|
|
39
45
|
|
|
46
|
+
/** The backend requires the four fields (400 without them); the ids are ignored. */
|
|
40
47
|
export type UpdateContactBlockListsControlPayload = {
|
|
41
48
|
reason?: string
|
|
42
49
|
servicesIds?: string[]
|
|
@@ -202,12 +202,13 @@ describe('ContactsApi', () => {
|
|
|
202
202
|
// ── exportTemplate ───────────────────────────────────────────────
|
|
203
203
|
|
|
204
204
|
describe('exportTemplate', () => {
|
|
205
|
-
it('calls client.post with /contacts/export-template and
|
|
206
|
-
|
|
207
|
-
|
|
205
|
+
it('calls client.post with /contacts/export-template and resolves the CSV text', async () => {
|
|
206
|
+
const csv = 'Nome;DDI;Número;Atendente Padrão;Departamento Padrão;Tags;Criado em\n'
|
|
207
|
+
vi.mocked(client.post).mockResolvedValue(csv)
|
|
208
|
+
const body: ExportTemplatePayload = { serviceType: 'whatsapp' }
|
|
208
209
|
const result = await api.exportTemplate(body)
|
|
209
210
|
expect(client.post).toHaveBeenCalledWith('/contacts/export-template', body, undefined)
|
|
210
|
-
expect(result).
|
|
211
|
+
expect(result).toBe(csv)
|
|
211
212
|
})
|
|
212
213
|
|
|
213
214
|
it('forwards custom headers', async () => {
|
|
@@ -476,6 +477,21 @@ describe('ContactsApi', () => {
|
|
|
476
477
|
|
|
477
478
|
// ── block ────────────────────────────────────────────────────────
|
|
478
479
|
|
|
480
|
+
describe('summarizeTicket', () => {
|
|
481
|
+
it('calls client.post with /contacts/:id/ticket/summary and no body', async () => {
|
|
482
|
+
vi.mocked(client.post).mockResolvedValue({ success: true })
|
|
483
|
+
const result = await api.summarizeTicket('c1')
|
|
484
|
+
expect(client.post).toHaveBeenCalledWith('/contacts/c1/ticket/summary', undefined, undefined)
|
|
485
|
+
expect(result).toEqual({ success: true })
|
|
486
|
+
})
|
|
487
|
+
|
|
488
|
+
it('forwards custom headers', async () => {
|
|
489
|
+
const headers = { 'X-Custom': 'value' }
|
|
490
|
+
await api.summarizeTicket('c1', headers)
|
|
491
|
+
expect(client.post).toHaveBeenCalledWith('/contacts/c1/ticket/summary', undefined, headers)
|
|
492
|
+
})
|
|
493
|
+
})
|
|
494
|
+
|
|
479
495
|
describe('block', () => {
|
|
480
496
|
it('calls client.post with /contacts/:id/block and body', async () => {
|
|
481
497
|
vi.mocked(client.post).mockResolvedValue({ ...contact, block: true })
|
|
@@ -21,6 +21,7 @@ import type {
|
|
|
21
21
|
SyncContactPayload,
|
|
22
22
|
TransferTicketPayload,
|
|
23
23
|
UpdateContactPayload,
|
|
24
|
+
SummarizeTicketResult,
|
|
24
25
|
} from './types'
|
|
25
26
|
|
|
26
27
|
export class ContactsApi extends BaseCrudApi<Contact, CreateContactPayload, UpdateContactPayload> {
|
|
@@ -29,11 +30,12 @@ export class ContactsApi extends BaseCrudApi<Contact, CreateContactPayload, Upda
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
/**
|
|
32
|
-
* Downloads
|
|
33
|
+
* Downloads the CSV template (`;`-separated header line, in the language of the user) for
|
|
34
|
+
* importing contacts, with columns based on the service type. Answered with no Content-Type.
|
|
33
35
|
* @permissions contacts.view AND contacts.export
|
|
34
36
|
*/
|
|
35
|
-
exportTemplate(body: ExportTemplatePayload, headers?: Record<string, string>): Promise<
|
|
36
|
-
return this.client.post<
|
|
37
|
+
exportTemplate(body: ExportTemplatePayload, headers?: Record<string, string>): Promise<string> {
|
|
38
|
+
return this.client.post<string, ExportTemplatePayload>(
|
|
37
39
|
`${this.basePath}/export-template`,
|
|
38
40
|
body,
|
|
39
41
|
headers,
|
|
@@ -172,7 +174,9 @@ export class ContactsApi extends BaseCrudApi<Contact, CreateContactPayload, Upda
|
|
|
172
174
|
|
|
173
175
|
/**
|
|
174
176
|
* Starts the import of a CSV file previously uploaded through `FilesApi`. The import runs
|
|
175
|
-
* in the background;
|
|
177
|
+
* in the background; `csvHeaderLine` is validated against the service type template, with
|
|
178
|
+
* every column of `exportTemplate` (including "Criado em"/"Created at"): a different header
|
|
179
|
+
* answers 403 `Csv File - Invalid Header`. The file itself is only read by the job.
|
|
176
180
|
* Resolves to `'OK'`.
|
|
177
181
|
* @permissions contacts.view OR contacts.update OR contacts.create
|
|
178
182
|
*/
|
|
@@ -199,7 +203,8 @@ export class ContactsApi extends BaseCrudApi<Contact, CreateContactPayload, Upda
|
|
|
199
203
|
|
|
200
204
|
/**
|
|
201
205
|
* Blocks or unblocks a contact. Blocking closes the contact's open ticket. Requires the
|
|
202
|
-
* block list to be active on the account.
|
|
206
|
+
* block list to be active on the account (`settings.isBlockListActive`; 400 otherwise).
|
|
207
|
+
* `byUserId` and `description` are stored as sent: the backend does not fill in the user.
|
|
203
208
|
* @permissions contacts.block
|
|
204
209
|
*/
|
|
205
210
|
block(id: string, body: BlockContactPayload, headers?: Record<string, string>): Promise<Contact> {
|
|
@@ -210,6 +215,20 @@ export class ContactsApi extends BaseCrudApi<Contact, CreateContactPayload, Upda
|
|
|
210
215
|
)
|
|
211
216
|
}
|
|
212
217
|
|
|
218
|
+
/**
|
|
219
|
+
* Generates an AI summary of the open ticket of the contact. Consumes AI credits; resolves
|
|
220
|
+
* `{ success, limitReached? }`. A contact with no open ticket (or an unknown contact) answers
|
|
221
|
+
* 400.
|
|
222
|
+
* @permissions tickets.update
|
|
223
|
+
*/
|
|
224
|
+
summarizeTicket(id: string, headers?: Record<string, string>): Promise<SummarizeTicketResult> {
|
|
225
|
+
return this.client.post<SummarizeTicketResult>(
|
|
226
|
+
`${this.basePath}/${id}/ticket/summary`,
|
|
227
|
+
undefined,
|
|
228
|
+
headers,
|
|
229
|
+
)
|
|
230
|
+
}
|
|
231
|
+
|
|
213
232
|
/**
|
|
214
233
|
* Resets the contact's unread counter. Resolves to `'OK'`.
|
|
215
234
|
* @permissions contacts.view OR contacts.update
|
|
@@ -176,9 +176,15 @@ export type UpdateContactPayload = {
|
|
|
176
176
|
tagIds?: string[]
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
+
/** Result of `ContactsApi.summarizeTicket`. */
|
|
180
|
+
export type SummarizeTicketResult = {
|
|
181
|
+
success: boolean
|
|
182
|
+
limitReached?: boolean
|
|
183
|
+
}
|
|
184
|
+
|
|
179
185
|
export type ExportTemplatePayload = {
|
|
180
186
|
serviceType: string
|
|
181
|
-
type
|
|
187
|
+
type?: string
|
|
182
188
|
}
|
|
183
189
|
|
|
184
190
|
export type CountContactsQuery = ListQuery<Contact> & {
|
|
@@ -6,6 +6,11 @@ import type {
|
|
|
6
6
|
UpdateCreditMovementPayload,
|
|
7
7
|
} from './types'
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Credit movements of the account (SMS and AI credits), only for reading: the writes are super
|
|
11
|
+
* admin routes (`/admin/credit-movements`). The backend serves only `GET /credit-movements` and
|
|
12
|
+
* `GET /credit-movements/:id`.
|
|
13
|
+
*/
|
|
9
14
|
export class CreditMovementsApi extends BaseCrudApi<
|
|
10
15
|
CreditMovement,
|
|
11
16
|
CreateCreditMovementPayload,
|
|
@@ -14,4 +19,26 @@ export class CreditMovementsApi extends BaseCrudApi<
|
|
|
14
19
|
constructor(client: ApiClient) {
|
|
15
20
|
super(client, '/credit-movements')
|
|
16
21
|
}
|
|
22
|
+
|
|
23
|
+
/** @deprecated Not served: the backend has no POST /credit-movements, so this route answers 404. */
|
|
24
|
+
override create(
|
|
25
|
+
body: CreateCreditMovementPayload,
|
|
26
|
+
headers?: Record<string, string>,
|
|
27
|
+
): Promise<CreditMovement> {
|
|
28
|
+
return super.create(body, headers)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** @deprecated Not served: the backend has no PUT /credit-movements/:id, so this route answers 404. */
|
|
32
|
+
override updateById(
|
|
33
|
+
id: string,
|
|
34
|
+
body: UpdateCreditMovementPayload,
|
|
35
|
+
headers?: Record<string, string>,
|
|
36
|
+
): Promise<CreditMovement> {
|
|
37
|
+
return super.updateById(id, body, headers)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** @deprecated Not served: the backend has no DELETE /credit-movements/:id, so this route answers 404. */
|
|
41
|
+
override deleteById(id: string, headers?: Record<string, string>): Promise<CreditMovement> {
|
|
42
|
+
return super.deleteById(id, headers)
|
|
43
|
+
}
|
|
17
44
|
}
|