@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.
Files changed (310) hide show
  1. package/README.md +36 -12
  2. package/dist/apis/absence/AbsenceApi.cjs +12 -0
  3. package/dist/apis/absence/AbsenceApi.cjs.map +1 -1
  4. package/dist/apis/absence/AbsenceApi.d.ts +9 -0
  5. package/dist/apis/absence/AbsenceApi.d.ts.map +1 -1
  6. package/dist/apis/absence/AbsenceApi.mjs +12 -0
  7. package/dist/apis/absence/AbsenceApi.mjs.map +1 -1
  8. package/dist/apis/acceptanceTerms/AcceptanceTermsApi.cjs +8 -0
  9. package/dist/apis/acceptanceTerms/AcceptanceTermsApi.cjs.map +1 -1
  10. package/dist/apis/acceptanceTerms/AcceptanceTermsApi.d.ts +8 -1
  11. package/dist/apis/acceptanceTerms/AcceptanceTermsApi.d.ts.map +1 -1
  12. package/dist/apis/acceptanceTerms/AcceptanceTermsApi.mjs +8 -0
  13. package/dist/apis/acceptanceTerms/AcceptanceTermsApi.mjs.map +1 -1
  14. package/dist/apis/accounts/AccountsApi.cjs +5 -0
  15. package/dist/apis/accounts/AccountsApi.cjs.map +1 -1
  16. package/dist/apis/accounts/AccountsApi.d.ts +5 -0
  17. package/dist/apis/accounts/AccountsApi.d.ts.map +1 -1
  18. package/dist/apis/accounts/AccountsApi.mjs +5 -0
  19. package/dist/apis/accounts/AccountsApi.mjs.map +1 -1
  20. package/dist/apis/accounts/types.d.ts +2 -0
  21. package/dist/apis/accounts/types.d.ts.map +1 -1
  22. package/dist/apis/activityLog/ActivityLogApi.cjs +12 -0
  23. package/dist/apis/activityLog/ActivityLogApi.cjs.map +1 -1
  24. package/dist/apis/activityLog/ActivityLogApi.d.ts +8 -0
  25. package/dist/apis/activityLog/ActivityLogApi.d.ts.map +1 -1
  26. package/dist/apis/activityLog/ActivityLogApi.mjs +12 -0
  27. package/dist/apis/activityLog/ActivityLogApi.mjs.map +1 -1
  28. package/dist/apis/categories/CategoriesApi.cjs +7 -0
  29. package/dist/apis/categories/CategoriesApi.cjs.map +1 -1
  30. package/dist/apis/categories/CategoriesApi.d.ts +7 -1
  31. package/dist/apis/categories/CategoriesApi.d.ts.map +1 -1
  32. package/dist/apis/categories/CategoriesApi.mjs +7 -0
  33. package/dist/apis/categories/CategoriesApi.mjs.map +1 -1
  34. package/dist/apis/clientFeedback/ClientFeedbackApi.cjs +5 -1
  35. package/dist/apis/clientFeedback/ClientFeedbackApi.cjs.map +1 -1
  36. package/dist/apis/clientFeedback/ClientFeedbackApi.d.ts +5 -1
  37. package/dist/apis/clientFeedback/ClientFeedbackApi.d.ts.map +1 -1
  38. package/dist/apis/clientFeedback/ClientFeedbackApi.mjs +5 -1
  39. package/dist/apis/clientFeedback/ClientFeedbackApi.mjs.map +1 -1
  40. package/dist/apis/contactBlockLists/ContactBlockListsApi.cjs +36 -0
  41. package/dist/apis/contactBlockLists/ContactBlockListsApi.cjs.map +1 -1
  42. package/dist/apis/contactBlockLists/ContactBlockListsApi.d.ts +32 -1
  43. package/dist/apis/contactBlockLists/ContactBlockListsApi.d.ts.map +1 -1
  44. package/dist/apis/contactBlockLists/ContactBlockListsApi.mjs +36 -0
  45. package/dist/apis/contactBlockLists/ContactBlockListsApi.mjs.map +1 -1
  46. package/dist/apis/contactBlockLists/types.d.ts +6 -1
  47. package/dist/apis/contactBlockLists/types.d.ts.map +1 -1
  48. package/dist/apis/contactBlockListsControls/ContactBlockListsControlsApi.cjs +37 -0
  49. package/dist/apis/contactBlockListsControls/ContactBlockListsControlsApi.cjs.map +1 -1
  50. package/dist/apis/contactBlockListsControls/ContactBlockListsControlsApi.d.ts +33 -1
  51. package/dist/apis/contactBlockListsControls/ContactBlockListsControlsApi.d.ts.map +1 -1
  52. package/dist/apis/contactBlockListsControls/ContactBlockListsControlsApi.mjs +37 -0
  53. package/dist/apis/contactBlockListsControls/ContactBlockListsControlsApi.mjs.map +1 -1
  54. package/dist/apis/contactBlockListsControls/types.d.ts +7 -0
  55. package/dist/apis/contactBlockListsControls/types.d.ts.map +1 -1
  56. package/dist/apis/contacts/ContactsApi.cjs +16 -3
  57. package/dist/apis/contacts/ContactsApi.cjs.map +1 -1
  58. package/dist/apis/contacts/ContactsApi.d.ts +16 -5
  59. package/dist/apis/contacts/ContactsApi.d.ts.map +1 -1
  60. package/dist/apis/contacts/ContactsApi.mjs +16 -3
  61. package/dist/apis/contacts/ContactsApi.mjs.map +1 -1
  62. package/dist/apis/contacts/types.d.ts +6 -1
  63. package/dist/apis/contacts/types.d.ts.map +1 -1
  64. package/dist/apis/creditMovements/CreditMovementsApi.cjs +17 -0
  65. package/dist/apis/creditMovements/CreditMovementsApi.cjs.map +1 -1
  66. package/dist/apis/creditMovements/CreditMovementsApi.d.ts +11 -0
  67. package/dist/apis/creditMovements/CreditMovementsApi.d.ts.map +1 -1
  68. package/dist/apis/creditMovements/CreditMovementsApi.mjs +17 -0
  69. package/dist/apis/creditMovements/CreditMovementsApi.mjs.map +1 -1
  70. package/dist/apis/customFields/CustomFieldsApi.cjs +7 -0
  71. package/dist/apis/customFields/CustomFieldsApi.cjs.map +1 -1
  72. package/dist/apis/customFields/CustomFieldsApi.d.ts +7 -1
  73. package/dist/apis/customFields/CustomFieldsApi.d.ts.map +1 -1
  74. package/dist/apis/customFields/CustomFieldsApi.mjs +7 -0
  75. package/dist/apis/customFields/CustomFieldsApi.mjs.map +1 -1
  76. package/dist/apis/departments/DepartmentsApi.cjs +21 -0
  77. package/dist/apis/departments/DepartmentsApi.cjs.map +1 -1
  78. package/dist/apis/departments/DepartmentsApi.d.ts +20 -2
  79. package/dist/apis/departments/DepartmentsApi.d.ts.map +1 -1
  80. package/dist/apis/departments/DepartmentsApi.mjs +21 -0
  81. package/dist/apis/departments/DepartmentsApi.mjs.map +1 -1
  82. package/dist/apis/departments/types.d.ts +5 -0
  83. package/dist/apis/departments/types.d.ts.map +1 -1
  84. package/dist/apis/distribution/DistributionApi.cjs +32 -0
  85. package/dist/apis/distribution/DistributionApi.cjs.map +1 -1
  86. package/dist/apis/distribution/DistributionApi.d.ts +26 -1
  87. package/dist/apis/distribution/DistributionApi.d.ts.map +1 -1
  88. package/dist/apis/distribution/DistributionApi.mjs +32 -0
  89. package/dist/apis/distribution/DistributionApi.mjs.map +1 -1
  90. package/dist/apis/distribution/types.d.ts +18 -1
  91. package/dist/apis/distribution/types.d.ts.map +1 -1
  92. package/dist/apis/files/FilesApi.cjs +49 -0
  93. package/dist/apis/files/FilesApi.cjs.map +1 -1
  94. package/dist/apis/files/FilesApi.d.ts +45 -2
  95. package/dist/apis/files/FilesApi.d.ts.map +1 -1
  96. package/dist/apis/files/FilesApi.mjs +49 -0
  97. package/dist/apis/files/FilesApi.mjs.map +1 -1
  98. package/dist/apis/files/types.d.ts +45 -7
  99. package/dist/apis/files/types.d.ts.map +1 -1
  100. package/dist/apis/holiday/HolidayApi.cjs +7 -0
  101. package/dist/apis/holiday/HolidayApi.cjs.map +1 -1
  102. package/dist/apis/holiday/HolidayApi.d.ts +7 -1
  103. package/dist/apis/holiday/HolidayApi.d.ts.map +1 -1
  104. package/dist/apis/holiday/HolidayApi.mjs +7 -0
  105. package/dist/apis/holiday/HolidayApi.mjs.map +1 -1
  106. package/dist/apis/integrations/IntegrationsApi.cjs +24 -0
  107. package/dist/apis/integrations/IntegrationsApi.cjs.map +1 -1
  108. package/dist/apis/integrations/IntegrationsApi.d.ts +21 -2
  109. package/dist/apis/integrations/IntegrationsApi.d.ts.map +1 -1
  110. package/dist/apis/integrations/IntegrationsApi.mjs +24 -0
  111. package/dist/apis/integrations/IntegrationsApi.mjs.map +1 -1
  112. package/dist/apis/integrations/types.d.ts +15 -6
  113. package/dist/apis/integrations/types.d.ts.map +1 -1
  114. package/dist/apis/interactiveMessages/InteractiveMessagesApi.cjs +7 -0
  115. package/dist/apis/interactiveMessages/InteractiveMessagesApi.cjs.map +1 -1
  116. package/dist/apis/interactiveMessages/InteractiveMessagesApi.d.ts +7 -1
  117. package/dist/apis/interactiveMessages/InteractiveMessagesApi.d.ts.map +1 -1
  118. package/dist/apis/interactiveMessages/InteractiveMessagesApi.mjs +7 -0
  119. package/dist/apis/interactiveMessages/InteractiveMessagesApi.mjs.map +1 -1
  120. package/dist/apis/kanbanBoards/KanbanBoardsApi.cjs +7 -0
  121. package/dist/apis/kanbanBoards/KanbanBoardsApi.cjs.map +1 -1
  122. package/dist/apis/kanbanBoards/KanbanBoardsApi.d.ts +7 -1
  123. package/dist/apis/kanbanBoards/KanbanBoardsApi.d.ts.map +1 -1
  124. package/dist/apis/kanbanBoards/KanbanBoardsApi.mjs +7 -0
  125. package/dist/apis/kanbanBoards/KanbanBoardsApi.mjs.map +1 -1
  126. package/dist/apis/kanbanCards/KanbanCardsApi.cjs +7 -0
  127. package/dist/apis/kanbanCards/KanbanCardsApi.cjs.map +1 -1
  128. package/dist/apis/kanbanCards/KanbanCardsApi.d.ts +7 -1
  129. package/dist/apis/kanbanCards/KanbanCardsApi.d.ts.map +1 -1
  130. package/dist/apis/kanbanCards/KanbanCardsApi.mjs +7 -0
  131. package/dist/apis/kanbanCards/KanbanCardsApi.mjs.map +1 -1
  132. package/dist/apis/knowledgeBase/KnowledgeBaseApi.cjs +8 -0
  133. package/dist/apis/knowledgeBase/KnowledgeBaseApi.cjs.map +1 -1
  134. package/dist/apis/knowledgeBase/KnowledgeBaseApi.d.ts +8 -1
  135. package/dist/apis/knowledgeBase/KnowledgeBaseApi.d.ts.map +1 -1
  136. package/dist/apis/knowledgeBase/KnowledgeBaseApi.mjs +8 -0
  137. package/dist/apis/knowledgeBase/KnowledgeBaseApi.mjs.map +1 -1
  138. package/dist/apis/knowledgeBaseItem/KnowledgeBaseItemApi.cjs +8 -0
  139. package/dist/apis/knowledgeBaseItem/KnowledgeBaseItemApi.cjs.map +1 -1
  140. package/dist/apis/knowledgeBaseItem/KnowledgeBaseItemApi.d.ts +8 -1
  141. package/dist/apis/knowledgeBaseItem/KnowledgeBaseItemApi.d.ts.map +1 -1
  142. package/dist/apis/knowledgeBaseItem/KnowledgeBaseItemApi.mjs +8 -0
  143. package/dist/apis/knowledgeBaseItem/KnowledgeBaseItemApi.mjs.map +1 -1
  144. package/dist/apis/messages/MessagesApi.cjs +23 -3
  145. package/dist/apis/messages/MessagesApi.cjs.map +1 -1
  146. package/dist/apis/messages/MessagesApi.d.ts +19 -3
  147. package/dist/apis/messages/MessagesApi.d.ts.map +1 -1
  148. package/dist/apis/messages/MessagesApi.mjs +23 -3
  149. package/dist/apis/messages/MessagesApi.mjs.map +1 -1
  150. package/dist/apis/messages/types.d.ts +3 -0
  151. package/dist/apis/messages/types.d.ts.map +1 -1
  152. package/dist/apis/notifications/NotificationsApi.cjs +7 -0
  153. package/dist/apis/notifications/NotificationsApi.cjs.map +1 -1
  154. package/dist/apis/notifications/NotificationsApi.d.ts +7 -1
  155. package/dist/apis/notifications/NotificationsApi.d.ts.map +1 -1
  156. package/dist/apis/notifications/NotificationsApi.mjs +7 -0
  157. package/dist/apis/notifications/NotificationsApi.mjs.map +1 -1
  158. package/dist/apis/organizations/OrganizationsApi.cjs +7 -0
  159. package/dist/apis/organizations/OrganizationsApi.cjs.map +1 -1
  160. package/dist/apis/organizations/OrganizationsApi.d.ts +7 -1
  161. package/dist/apis/organizations/OrganizationsApi.d.ts.map +1 -1
  162. package/dist/apis/organizations/OrganizationsApi.mjs +7 -0
  163. package/dist/apis/organizations/OrganizationsApi.mjs.map +1 -1
  164. package/dist/apis/people/PeopleApi.cjs +7 -0
  165. package/dist/apis/people/PeopleApi.cjs.map +1 -1
  166. package/dist/apis/people/PeopleApi.d.ts +7 -1
  167. package/dist/apis/people/PeopleApi.d.ts.map +1 -1
  168. package/dist/apis/people/PeopleApi.mjs +7 -0
  169. package/dist/apis/people/PeopleApi.mjs.map +1 -1
  170. package/dist/apis/planAiHistory/PlanAiHistoryApi.cjs +16 -0
  171. package/dist/apis/planAiHistory/PlanAiHistoryApi.cjs.map +1 -1
  172. package/dist/apis/planAiHistory/PlanAiHistoryApi.d.ts +10 -0
  173. package/dist/apis/planAiHistory/PlanAiHistoryApi.d.ts.map +1 -1
  174. package/dist/apis/planAiHistory/PlanAiHistoryApi.mjs +16 -0
  175. package/dist/apis/planAiHistory/PlanAiHistoryApi.mjs.map +1 -1
  176. package/dist/apis/roles/RolesApi.cjs +7 -0
  177. package/dist/apis/roles/RolesApi.cjs.map +1 -1
  178. package/dist/apis/roles/RolesApi.d.ts +6 -1
  179. package/dist/apis/roles/RolesApi.d.ts.map +1 -1
  180. package/dist/apis/roles/RolesApi.mjs +7 -0
  181. package/dist/apis/roles/RolesApi.mjs.map +1 -1
  182. package/dist/apis/services/ServicesApi.cjs +68 -0
  183. package/dist/apis/services/ServicesApi.cjs.map +1 -1
  184. package/dist/apis/services/ServicesApi.d.ts +53 -1
  185. package/dist/apis/services/ServicesApi.d.ts.map +1 -1
  186. package/dist/apis/services/ServicesApi.mjs +68 -0
  187. package/dist/apis/services/ServicesApi.mjs.map +1 -1
  188. package/dist/apis/services/types.d.ts +15 -0
  189. package/dist/apis/services/types.d.ts.map +1 -1
  190. package/dist/apis/stickers/StickersApi.cjs +20 -0
  191. package/dist/apis/stickers/StickersApi.cjs.map +1 -1
  192. package/dist/apis/stickers/StickersApi.d.ts +15 -0
  193. package/dist/apis/stickers/StickersApi.d.ts.map +1 -1
  194. package/dist/apis/stickers/StickersApi.mjs +20 -0
  195. package/dist/apis/stickers/StickersApi.mjs.map +1 -1
  196. package/dist/apis/tags/TagsApi.cjs +7 -0
  197. package/dist/apis/tags/TagsApi.cjs.map +1 -1
  198. package/dist/apis/tags/TagsApi.d.ts +7 -1
  199. package/dist/apis/tags/TagsApi.d.ts.map +1 -1
  200. package/dist/apis/tags/TagsApi.mjs +7 -0
  201. package/dist/apis/tags/TagsApi.mjs.map +1 -1
  202. package/dist/apis/timetable/TimetableApi.cjs +7 -0
  203. package/dist/apis/timetable/TimetableApi.cjs.map +1 -1
  204. package/dist/apis/timetable/TimetableApi.d.ts +7 -1
  205. package/dist/apis/timetable/TimetableApi.d.ts.map +1 -1
  206. package/dist/apis/timetable/TimetableApi.mjs +7 -0
  207. package/dist/apis/timetable/TimetableApi.mjs.map +1 -1
  208. package/dist/apis/users/UsersApi.cjs +8 -0
  209. package/dist/apis/users/UsersApi.cjs.map +1 -1
  210. package/dist/apis/users/UsersApi.d.ts +8 -1
  211. package/dist/apis/users/UsersApi.d.ts.map +1 -1
  212. package/dist/apis/users/UsersApi.mjs +8 -0
  213. package/dist/apis/users/UsersApi.mjs.map +1 -1
  214. package/dist/apis/users/types.d.ts +15 -0
  215. package/dist/apis/users/types.d.ts.map +1 -1
  216. package/dist/apis/webhooks/WebhooksApi.cjs +7 -0
  217. package/dist/apis/webhooks/WebhooksApi.cjs.map +1 -1
  218. package/dist/apis/webhooks/WebhooksApi.d.ts +7 -1
  219. package/dist/apis/webhooks/WebhooksApi.d.ts.map +1 -1
  220. package/dist/apis/webhooks/WebhooksApi.mjs +7 -0
  221. package/dist/apis/webhooks/WebhooksApi.mjs.map +1 -1
  222. package/dist/core/ApiClient.d.ts +14 -0
  223. package/dist/core/ApiClient.d.ts.map +1 -1
  224. package/dist/core/ArchivableCrudApi.cjs.map +1 -1
  225. package/dist/core/ArchivableCrudApi.d.ts +1 -1
  226. package/dist/core/ArchivableCrudApi.d.ts.map +1 -1
  227. package/dist/core/ArchivableCrudApi.mjs.map +1 -1
  228. package/dist/core/BaseApiClient.cjs +24 -3
  229. package/dist/core/BaseApiClient.cjs.map +1 -1
  230. package/dist/core/BaseApiClient.d.ts +14 -0
  231. package/dist/core/BaseApiClient.d.ts.map +1 -1
  232. package/dist/core/BaseApiClient.mjs +24 -3
  233. package/dist/core/BaseApiClient.mjs.map +1 -1
  234. package/dist/core/BaseCrudApi.cjs +3 -1
  235. package/dist/core/BaseCrudApi.cjs.map +1 -1
  236. package/dist/core/BaseCrudApi.d.ts +6 -4
  237. package/dist/core/BaseCrudApi.d.ts.map +1 -1
  238. package/dist/core/BaseCrudApi.mjs +3 -1
  239. package/dist/core/BaseCrudApi.mjs.map +1 -1
  240. package/dist/core/requestExternal.cjs +33 -0
  241. package/dist/core/requestExternal.cjs.map +1 -0
  242. package/dist/core/requestExternal.d.ts +9 -0
  243. package/dist/core/requestExternal.d.ts.map +1 -0
  244. package/dist/core/requestExternal.mjs +32 -0
  245. package/dist/core/requestExternal.mjs.map +1 -0
  246. package/dist/core/types.d.ts +1 -1
  247. package/dist/core/types.d.ts.map +1 -1
  248. package/package.json +1 -1
  249. package/src/apis/absence/AbsenceApi.ts +19 -0
  250. package/src/apis/acceptanceTerms/AcceptanceTermsApi.ts +13 -1
  251. package/src/apis/accounts/AccountsApi.ts +5 -0
  252. package/src/apis/accounts/types.ts +2 -0
  253. package/src/apis/activityLog/ActivityLogApi.ts +18 -0
  254. package/src/apis/categories/CategoriesApi.ts +12 -1
  255. package/src/apis/clientFeedback/ClientFeedbackApi.ts +5 -1
  256. package/src/apis/contactBlockLists/ContactBlockListsApi.test.ts +57 -0
  257. package/src/apis/contactBlockLists/ContactBlockListsApi.ts +57 -1
  258. package/src/apis/contactBlockLists/types.ts +6 -1
  259. package/src/apis/contactBlockListsControls/ContactBlockListsControlsApi.test.ts +48 -0
  260. package/src/apis/contactBlockListsControls/ContactBlockListsControlsApi.ts +59 -1
  261. package/src/apis/contactBlockListsControls/types.ts +7 -0
  262. package/src/apis/contacts/ContactsApi.test.ts +20 -4
  263. package/src/apis/contacts/ContactsApi.ts +24 -5
  264. package/src/apis/contacts/types.ts +7 -1
  265. package/src/apis/creditMovements/CreditMovementsApi.ts +27 -0
  266. package/src/apis/customFields/CustomFieldsApi.ts +12 -1
  267. package/src/apis/departments/DepartmentsApi.test.ts +88 -0
  268. package/src/apis/departments/DepartmentsApi.ts +41 -2
  269. package/src/apis/departments/types.ts +6 -0
  270. package/src/apis/distribution/DistributionApi.test.ts +65 -0
  271. package/src/apis/distribution/DistributionApi.ts +50 -1
  272. package/src/apis/distribution/types.ts +17 -1
  273. package/src/apis/files/FilesApi.test.ts +122 -0
  274. package/src/apis/files/FilesApi.ts +107 -2
  275. package/src/apis/files/types.ts +48 -7
  276. package/src/apis/holiday/HolidayApi.ts +16 -1
  277. package/src/apis/integrations/IntegrationsApi.test.ts +42 -0
  278. package/src/apis/integrations/IntegrationsApi.ts +46 -2
  279. package/src/apis/integrations/types.ts +25 -6
  280. package/src/apis/interactiveMessages/InteractiveMessagesApi.ts +12 -1
  281. package/src/apis/kanbanBoards/KanbanBoardsApi.ts +12 -1
  282. package/src/apis/kanbanCards/KanbanCardsApi.ts +12 -1
  283. package/src/apis/knowledgeBase/KnowledgeBaseApi.ts +13 -1
  284. package/src/apis/knowledgeBaseItem/KnowledgeBaseItemApi.ts +13 -1
  285. package/src/apis/messages/MessagesApi.test.ts +13 -7
  286. package/src/apis/messages/MessagesApi.ts +29 -3
  287. package/src/apis/messages/types.ts +3 -0
  288. package/src/apis/notifications/NotificationsApi.ts +12 -1
  289. package/src/apis/organizations/OrganizationsApi.ts +12 -1
  290. package/src/apis/payloads.test-d.ts +172 -0
  291. package/src/apis/people/PeopleApi.ts +16 -1
  292. package/src/apis/planAiHistory/PlanAiHistoryApi.ts +26 -0
  293. package/src/apis/roles/RolesApi.ts +10 -1
  294. package/src/apis/services/ServicesApi.test.ts +45 -0
  295. package/src/apis/services/ServicesApi.ts +91 -1
  296. package/src/apis/services/types.ts +16 -0
  297. package/src/apis/stickers/StickersApi.ts +32 -0
  298. package/src/apis/tags/TagsApi.ts +16 -1
  299. package/src/apis/timetable/TimetableApi.ts +12 -1
  300. package/src/apis/users/UsersApi.ts +17 -1
  301. package/src/apis/users/types.ts +11 -0
  302. package/src/apis/webhooks/WebhooksApi.ts +16 -1
  303. package/src/core/ApiClient.ts +24 -0
  304. package/src/core/ArchivableCrudApi.ts +2 -1
  305. package/src/core/BaseApiClient.test.ts +98 -0
  306. package/src/core/BaseApiClient.ts +49 -4
  307. package/src/core/BaseCrudApi.test-d.ts +11 -1
  308. package/src/core/BaseCrudApi.ts +15 -6
  309. package/src/core/requestExternal.ts +43 -0
  310. package/src/core/types.ts +4 -2
@@ -1 +1 @@
1
- {"version":3,"file":"DistributionApi.mjs","names":[],"sources":["../../../src/apis/distribution/DistributionApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { Distribution, CreateDistributionPayload, UpdateDistributionPayload } from './types'\n\nexport class DistributionApi extends BaseCrudApi<\n Distribution,\n CreateDistributionPayload,\n UpdateDistributionPayload\n> {\n constructor(client: ApiClient) {\n super(client, '/distribution')\n }\n}\n"],"mappings":";;;AAIA,IAAa,kBAAb,cAAqC,YAInC;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,gBAAgB"}
1
+ {"version":3,"file":"DistributionApi.mjs","names":[],"sources":["../../../src/apis/distribution/DistributionApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport type { ListQuery } from '../../core/types'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { Department } from '../departments/types'\nimport type { Distribution, CreateDistributionPayload, UpdateDistributionPayload } from './types'\n\n/**\n * Ticket distribution rules. `getById` answers `null` for an unknown id and always includes `departments` and\n * `roles` (the query is ignored).\n */\nexport class DistributionApi extends BaseCrudApi<\n Distribution,\n CreateDistributionPayload,\n UpdateDistributionPayload,\n ListQuery<Distribution>,\n void,\n Distribution | undefined,\n Distribution | Department[]\n> {\n constructor(client: ApiClient) {\n super(client, '/distribution')\n }\n\n /**\n * Creates a distribution. Resolves the distribution (without `departments`/`roles`), or no body\n * (`undefined`) when `departments` is sent — find it by name with `getMany` in that case.\n * @permissions distribution.create\n */\n override create(\n body: CreateDistributionPayload,\n headers?: Record<string, string>,\n ): Promise<Distribution | undefined> {\n return super.create(body, headers)\n }\n\n /**\n * Updates a distribution. The backend reads the id from the body, so it is sent there too. It replaces\n * the links: omitting `roles` or `departments` clears them. Resolves the stored distribution (with\n * `deletedAt`, without the links) or, when `departments` is sent, the updated departments. An unknown id\n * answers 500.\n * @permissions distribution.view OR distribution.update\n */\n override updateById(\n id: string,\n body: UpdateDistributionPayload,\n headers?: Record<string, string>,\n ): Promise<Distribution | Department[]> {\n return this.client.put<Distribution | Department[], UpdateDistributionPayload & { id: string }>(\n `${this.basePath}/${id}`,\n { ...body, id },\n headers,\n )\n }\n\n /**\n * Deletes a distribution. Resolves with no body, also for an unknown id (200).\n * @permissions distribution.view OR distribution.destroy\n */\n override deleteById(id: string, headers?: Record<string, string>): Promise<void> {\n return super.deleteById(id, headers)\n }\n}\n"],"mappings":";;;;;;;AAUA,IAAa,kBAAb,cAAqC,YAQnC;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,gBAAgB;;;;;;;CAQhC,AAAS,OACP,MACA,SACmC;AACnC,SAAO,MAAM,OAAO,MAAM,QAAQ;;;;;;;;;CAUpC,AAAS,WACP,IACA,MACA,SACsC;AACtC,SAAO,KAAK,OAAO,IACjB,GAAG,KAAK,SAAS,GAAG,MACpB;GAAE,GAAG;GAAM;GAAI,EACf,QACD;;;;;;CAOH,AAAS,WAAW,IAAY,SAAiD;AAC/E,SAAO,MAAM,WAAW,IAAI,QAAQ"}
@@ -10,13 +10,18 @@ export type Distribution = {
10
10
  distributeQueue: boolean;
11
11
  accountId: string;
12
12
  archivedAt: string | null;
13
- deletedAt: string | null;
13
+ /** Only in the answer of `updateById` (the stored model, not transformed). */
14
+ deletedAt?: string | null;
14
15
  createdAt: string;
15
16
  updatedAt: string;
16
17
  departments?: Department[];
17
18
  roles?: Role[];
18
19
  };
19
20
  export type DistributionRelationships = 'departments' | 'roles';
21
+ /** A department or a role linked to a distribution (only the id is read). */
22
+ export type DistributionLink = {
23
+ id: string;
24
+ };
20
25
  export type CreateDistributionPayload = {
21
26
  name: string;
22
27
  maxNum: number;
@@ -24,7 +29,16 @@ export type CreateDistributionPayload = {
24
29
  timeToRedistribute?: number;
25
30
  redistributeAssignedTickets?: boolean;
26
31
  distributeQueue?: boolean;
32
+ /** An archived distribution is skipped by the distribution crons. */
33
+ archivedAt?: string | null;
34
+ /** Departments to distribute; a department has at most one distribution. */
35
+ departments?: DistributionLink[];
36
+ roles?: DistributionLink[];
27
37
  };
38
+ /**
39
+ * The update replaces the links: send `departments` and `roles` again to keep them — omitting them
40
+ * clears them.
41
+ */
28
42
  export type UpdateDistributionPayload = {
29
43
  name?: string;
30
44
  maxNum?: number;
@@ -32,5 +46,8 @@ export type UpdateDistributionPayload = {
32
46
  timeToRedistribute?: number;
33
47
  redistributeAssignedTickets?: boolean;
34
48
  distributeQueue?: boolean;
49
+ archivedAt?: string | null;
50
+ departments?: DistributionLink[];
51
+ roles?: DistributionLink[];
35
52
  };
36
53
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/apis/distribution/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAE1C,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,kBAAkB,EAAE,MAAM,CAAA;IAC1B,eAAe,EAAE,OAAO,CAAA;IACxB,2BAA2B,EAAE,OAAO,CAAA;IACpC,eAAe,EAAE,OAAO,CAAA;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IAEjB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;IAC1B,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;CACf,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG,a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,EAAE,IAAI,EAAE,CAAA;CACf,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG,aAAa,GAAG,OAAO,CAAA;AAE/D,6EAA6E;AAC7E,MAAM,MAAM,gBAAgB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7C,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,eAAe,EAAE,OAAO,CAAA;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,2BAA2B,CAAC,EAAE,OAAO,CAAA;IACrC,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,4EAA4E;IAC5E,WAAW,CAAC,EAAE,gBAAgB,EAAE,CAAA;IAChC,KAAK,CAAC,EAAE,gBAAgB,EAAE,CAAA;CAC3B,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,2BAA2B,CAAC,EAAE,OAAO,CAAA;IACrC,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,WAAW,CAAC,EAAE,gBAAgB,EAAE,CAAA;IAChC,KAAK,CAAC,EAAE,gBAAgB,EAAE,CAAA;CAC3B,CAAA"}
@@ -1,11 +1,60 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_core_requestExternal = require('../../core/requestExternal.cjs');
2
3
  const require_core_BaseCrudApi = require('../../core/BaseCrudApi.cjs');
3
4
 
4
5
  //#region src/apis/files/FilesApi.ts
6
+ /**
7
+ * Files of the account. The backend serves `POST /files` (the record only, no content),
8
+ * `POST /files/create-to-upload` (record + signed URL to upload the content), `POST
9
+ * /files/duplicate-file`, `DELETE /files/:id` and the signed download `GET
10
+ * /files/:accountId/:filename`; there is no list, read by id nor update.
11
+ */
5
12
  var FilesApi = class extends require_core_BaseCrudApi.BaseCrudApi {
6
13
  constructor(client) {
7
14
  super(client, "/files");
8
15
  }
16
+ getMany(query, headers) {
17
+ return super.getMany(query, headers);
18
+ }
19
+ /** @deprecated Not served: the backend has no GET /files, so this route answers 404. */
20
+ getOne(query, headers) {
21
+ return super.getOne(query, headers);
22
+ }
23
+ /** @deprecated Not served: the backend has no GET /files/:id, so this route answers 404. */
24
+ getById(id, query, headers) {
25
+ return super.getById(id, query, headers);
26
+ }
27
+ /** @deprecated Not served: the backend has no PUT /files/:id, so this route answers 404. */
28
+ updateById(id, body, headers) {
29
+ return super.updateById(id, body, headers);
30
+ }
31
+ /**
32
+ * Deletes a file. Resolves `{ success: true }`, also for an unknown id; a file of another
33
+ * account answers 403.
34
+ */
35
+ deleteById(id, headers) {
36
+ return super.deleteById(id, headers);
37
+ }
38
+ /**
39
+ * Creates the record of a file and returns the signed URL to upload its content: send the
40
+ * content with {@link upload}. An audio that must be converted (a voice message for the
41
+ * connection) is sent in `base64` instead, and then no `urlToUpload` is returned. `name` and
42
+ * `mimetype` are required (500 without them; an audio without `name` is named `recording`).
43
+ */
44
+ createToUpload(body, headers) {
45
+ return this.client.post(`${this.basePath}/create-to-upload`, body, headers);
46
+ }
47
+ /**
48
+ * Uploads the content of a file to the `urlToUpload` returned by {@link createToUpload}. The URL
49
+ * is signed by the storage, so the request goes straight to it, without the API token (the
50
+ * storage refuses an `Authorization` header). `mimetype` must be the one sent to
51
+ * `createToUpload`. Sent through `client.requestExternal` (the global `fetch` for a client
52
+ * without it). A non-2xx answer of the storage throws `ApiError`.
53
+ */
54
+ async upload(urlToUpload, content, mimetype) {
55
+ const headers = { "Content-Type": mimetype };
56
+ await (this.client.requestExternal ? this.client.requestExternal("PUT", urlToUpload, content, headers) : require_core_requestExternal.requestExternal("PUT", urlToUpload, content, headers));
57
+ }
9
58
  };
10
59
 
11
60
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"FilesApi.cjs","names":["BaseCrudApi"],"sources":["../../../src/apis/files/FilesApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { File, CreateFilePayload, UpdateFilePayload } from './types'\n\nexport class FilesApi extends BaseCrudApi<File, CreateFilePayload, UpdateFilePayload> {\n constructor(client: ApiClient) {\n super(client, '/files')\n }\n}\n"],"mappings":";;;;AAIA,IAAa,WAAb,cAA8BA,qCAAwD;CACpF,YAAY,QAAmB;AAC7B,QAAM,QAAQ,SAAS"}
1
+ {"version":3,"file":"FilesApi.cjs","names":["BaseCrudApi","requestExternal"],"sources":["../../../src/apis/files/FilesApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport { requestExternal } from '../../core/requestExternal'\nimport type { GetByIdQuery, ListQuery, Paginated } from '../../core/types'\nimport type {\n File,\n CreateFilePayload,\n UpdateFilePayload,\n CreateToUploadPayload,\n CreateToUploadResult,\n DeleteFileResult,\n} from './types'\n\n/**\n * Files of the account. The backend serves `POST /files` (the record only, no content),\n * `POST /files/create-to-upload` (record + signed URL to upload the content), `POST\n * /files/duplicate-file`, `DELETE /files/:id` and the signed download `GET\n * /files/:accountId/:filename`; there is no list, read by id nor update.\n */\nexport class FilesApi extends BaseCrudApi<\n File,\n CreateFilePayload,\n UpdateFilePayload,\n ListQuery<File>,\n DeleteFileResult\n> {\n constructor(client: ApiClient) {\n super(client, '/files')\n }\n\n /** @deprecated Not served: the backend has no GET /files, so this route answers 404. */\n override getMany(\n query: ListQuery<File> & { paginate: false },\n headers?: Record<string, string>,\n ): Promise<File[]>\n /** @deprecated Not served: the backend has no GET /files, so this route answers 404. */\n override getMany(\n query?: ListQuery<File> & { paginate?: true },\n headers?: Record<string, string>,\n ): Promise<Paginated<File>>\n /** @deprecated Not served: the backend has no GET /files, so this route answers 404. */\n override getMany(\n query?: ListQuery<File>,\n headers?: Record<string, string>,\n ): Promise<Paginated<File> | File[]>\n override getMany(\n query?: ListQuery<File>,\n headers?: Record<string, string>,\n ): Promise<Paginated<File> | File[]> {\n return super.getMany(query, headers)\n }\n\n /** @deprecated Not served: the backend has no GET /files, so this route answers 404. */\n override getOne(query?: ListQuery<File>, headers?: Record<string, string>): Promise<File | null> {\n return super.getOne(query, headers)\n }\n\n /** @deprecated Not served: the backend has no GET /files/:id, so this route answers 404. */\n override getById(\n id: string,\n query?: GetByIdQuery<File>,\n headers?: Record<string, string>,\n ): Promise<File> {\n return super.getById(id, query, headers)\n }\n\n /** @deprecated Not served: the backend has no PUT /files/:id, so this route answers 404. */\n override updateById(\n id: string,\n body: UpdateFilePayload,\n headers?: Record<string, string>,\n ): Promise<File> {\n return super.updateById(id, body, headers)\n }\n\n /**\n * Deletes a file. Resolves `{ success: true }`, also for an unknown id; a file of another\n * account answers 403.\n */\n override deleteById(id: string, headers?: Record<string, string>): Promise<DeleteFileResult> {\n return super.deleteById(id, headers)\n }\n\n /**\n * Creates the record of a file and returns the signed URL to upload its content: send the\n * content with {@link upload}. An audio that must be converted (a voice message for the\n * connection) is sent in `base64` instead, and then no `urlToUpload` is returned. `name` and\n * `mimetype` are required (500 without them; an audio without `name` is named `recording`).\n */\n createToUpload(\n body: CreateToUploadPayload,\n headers?: Record<string, string>,\n ): Promise<CreateToUploadResult> {\n return this.client.post<CreateToUploadResult, CreateToUploadPayload>(\n `${this.basePath}/create-to-upload`,\n body,\n headers,\n )\n }\n\n /**\n * Uploads the content of a file to the `urlToUpload` returned by {@link createToUpload}. The URL\n * is signed by the storage, so the request goes straight to it, without the API token (the\n * storage refuses an `Authorization` header). `mimetype` must be the one sent to\n * `createToUpload`. Sent through `client.requestExternal` (the global `fetch` for a client\n * without it). A non-2xx answer of the storage throws `ApiError`.\n */\n async upload(urlToUpload: string, content: BodyInit, mimetype: string): Promise<void> {\n const headers = { 'Content-Type': mimetype }\n await (this.client.requestExternal\n ? this.client.requestExternal('PUT', urlToUpload, content, headers)\n : requestExternal('PUT', urlToUpload, content, headers))\n }\n}\n"],"mappings":";;;;;;;;;;;AAmBA,IAAa,WAAb,cAA8BA,qCAM5B;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,SAAS;;CAkBzB,AAAS,QACP,OACA,SACmC;AACnC,SAAO,MAAM,QAAQ,OAAO,QAAQ;;;CAItC,AAAS,OAAO,OAAyB,SAAwD;AAC/F,SAAO,MAAM,OAAO,OAAO,QAAQ;;;CAIrC,AAAS,QACP,IACA,OACA,SACe;AACf,SAAO,MAAM,QAAQ,IAAI,OAAO,QAAQ;;;CAI1C,AAAS,WACP,IACA,MACA,SACe;AACf,SAAO,MAAM,WAAW,IAAI,MAAM,QAAQ;;;;;;CAO5C,AAAS,WAAW,IAAY,SAA6D;AAC3F,SAAO,MAAM,WAAW,IAAI,QAAQ;;;;;;;;CAStC,eACE,MACA,SAC+B;AAC/B,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,oBACjB,MACA,QACD;;;;;;;;;CAUH,MAAM,OAAO,aAAqB,SAAmB,UAAiC;EACpF,MAAM,UAAU,EAAE,gBAAgB,UAAU;AAC5C,SAAO,KAAK,OAAO,kBACf,KAAK,OAAO,gBAAgB,OAAO,aAAa,SAAS,QAAQ,GACjEC,6CAAgB,OAAO,aAAa,SAAS,QAAQ"}
@@ -1,7 +1,50 @@
1
1
  import type { ApiClient } from '../../core/ApiClient';
2
2
  import { BaseCrudApi } from '../../core/BaseCrudApi';
3
- import type { File, CreateFilePayload, UpdateFilePayload } from './types';
4
- export declare class FilesApi extends BaseCrudApi<File, CreateFilePayload, UpdateFilePayload> {
3
+ import type { GetByIdQuery, ListQuery, Paginated } from '../../core/types';
4
+ import type { File, CreateFilePayload, UpdateFilePayload, CreateToUploadPayload, CreateToUploadResult, DeleteFileResult } from './types';
5
+ /**
6
+ * Files of the account. The backend serves `POST /files` (the record only, no content),
7
+ * `POST /files/create-to-upload` (record + signed URL to upload the content), `POST
8
+ * /files/duplicate-file`, `DELETE /files/:id` and the signed download `GET
9
+ * /files/:accountId/:filename`; there is no list, read by id nor update.
10
+ */
11
+ export declare class FilesApi extends BaseCrudApi<File, CreateFilePayload, UpdateFilePayload, ListQuery<File>, DeleteFileResult> {
5
12
  constructor(client: ApiClient);
13
+ /** @deprecated Not served: the backend has no GET /files, so this route answers 404. */
14
+ getMany(query: ListQuery<File> & {
15
+ paginate: false;
16
+ }, headers?: Record<string, string>): Promise<File[]>;
17
+ /** @deprecated Not served: the backend has no GET /files, so this route answers 404. */
18
+ getMany(query?: ListQuery<File> & {
19
+ paginate?: true;
20
+ }, headers?: Record<string, string>): Promise<Paginated<File>>;
21
+ /** @deprecated Not served: the backend has no GET /files, so this route answers 404. */
22
+ getMany(query?: ListQuery<File>, headers?: Record<string, string>): Promise<Paginated<File> | File[]>;
23
+ /** @deprecated Not served: the backend has no GET /files, so this route answers 404. */
24
+ getOne(query?: ListQuery<File>, headers?: Record<string, string>): Promise<File | null>;
25
+ /** @deprecated Not served: the backend has no GET /files/:id, so this route answers 404. */
26
+ getById(id: string, query?: GetByIdQuery<File>, headers?: Record<string, string>): Promise<File>;
27
+ /** @deprecated Not served: the backend has no PUT /files/:id, so this route answers 404. */
28
+ updateById(id: string, body: UpdateFilePayload, headers?: Record<string, string>): Promise<File>;
29
+ /**
30
+ * Deletes a file. Resolves `{ success: true }`, also for an unknown id; a file of another
31
+ * account answers 403.
32
+ */
33
+ deleteById(id: string, headers?: Record<string, string>): Promise<DeleteFileResult>;
34
+ /**
35
+ * Creates the record of a file and returns the signed URL to upload its content: send the
36
+ * content with {@link upload}. An audio that must be converted (a voice message for the
37
+ * connection) is sent in `base64` instead, and then no `urlToUpload` is returned. `name` and
38
+ * `mimetype` are required (500 without them; an audio without `name` is named `recording`).
39
+ */
40
+ createToUpload(body: CreateToUploadPayload, headers?: Record<string, string>): Promise<CreateToUploadResult>;
41
+ /**
42
+ * Uploads the content of a file to the `urlToUpload` returned by {@link createToUpload}. The URL
43
+ * is signed by the storage, so the request goes straight to it, without the API token (the
44
+ * storage refuses an `Authorization` header). `mimetype` must be the one sent to
45
+ * `createToUpload`. Sent through `client.requestExternal` (the global `fetch` for a client
46
+ * without it). A non-2xx answer of the storage throws `ApiError`.
47
+ */
48
+ upload(urlToUpload: string, content: BodyInit, mimetype: string): Promise<void>;
6
49
  }
7
50
  //# sourceMappingURL=FilesApi.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FilesApi.d.ts","sourceRoot":"","sources":["../../../src/apis/files/FilesApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,KAAK,EAAE,IAAI,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAEzE,qBAAa,QAAS,SAAQ,WAAW,CAAC,IAAI,EAAE,iBAAiB,EAAE,iBAAiB,CAAC;gBACvE,MAAM,EAAE,SAAS;CAG9B"}
1
+ {"version":3,"file":"FilesApi.d.ts","sourceRoot":"","sources":["../../../src/apis/files/FilesApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAEpD,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAC1E,OAAO,KAAK,EACV,IAAI,EACJ,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,SAAS,CAAA;AAEhB;;;;;GAKG;AACH,qBAAa,QAAS,SAA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CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAAC,IAAI,CAAC;IAIhB;;;OAGG;IACM,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAI5F;;;;;OAKG;IACH,cAAc,CACZ,IAAI,EAAE,qBAAqB,EAC3B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAAC,oBAAoB,CAAC;IAQhC;;;;;;OAMG;IACG,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAMtF"}
@@ -1,10 +1,59 @@
1
+ import { requestExternal } from "../../core/requestExternal.mjs";
1
2
  import { BaseCrudApi } from "../../core/BaseCrudApi.mjs";
2
3
 
3
4
  //#region src/apis/files/FilesApi.ts
5
+ /**
6
+ * Files of the account. The backend serves `POST /files` (the record only, no content),
7
+ * `POST /files/create-to-upload` (record + signed URL to upload the content), `POST
8
+ * /files/duplicate-file`, `DELETE /files/:id` and the signed download `GET
9
+ * /files/:accountId/:filename`; there is no list, read by id nor update.
10
+ */
4
11
  var FilesApi = class extends BaseCrudApi {
5
12
  constructor(client) {
6
13
  super(client, "/files");
7
14
  }
15
+ getMany(query, headers) {
16
+ return super.getMany(query, headers);
17
+ }
18
+ /** @deprecated Not served: the backend has no GET /files, so this route answers 404. */
19
+ getOne(query, headers) {
20
+ return super.getOne(query, headers);
21
+ }
22
+ /** @deprecated Not served: the backend has no GET /files/:id, so this route answers 404. */
23
+ getById(id, query, headers) {
24
+ return super.getById(id, query, headers);
25
+ }
26
+ /** @deprecated Not served: the backend has no PUT /files/:id, so this route answers 404. */
27
+ updateById(id, body, headers) {
28
+ return super.updateById(id, body, headers);
29
+ }
30
+ /**
31
+ * Deletes a file. Resolves `{ success: true }`, also for an unknown id; a file of another
32
+ * account answers 403.
33
+ */
34
+ deleteById(id, headers) {
35
+ return super.deleteById(id, headers);
36
+ }
37
+ /**
38
+ * Creates the record of a file and returns the signed URL to upload its content: send the
39
+ * content with {@link upload}. An audio that must be converted (a voice message for the
40
+ * connection) is sent in `base64` instead, and then no `urlToUpload` is returned. `name` and
41
+ * `mimetype` are required (500 without them; an audio without `name` is named `recording`).
42
+ */
43
+ createToUpload(body, headers) {
44
+ return this.client.post(`${this.basePath}/create-to-upload`, body, headers);
45
+ }
46
+ /**
47
+ * Uploads the content of a file to the `urlToUpload` returned by {@link createToUpload}. The URL
48
+ * is signed by the storage, so the request goes straight to it, without the API token (the
49
+ * storage refuses an `Authorization` header). `mimetype` must be the one sent to
50
+ * `createToUpload`. Sent through `client.requestExternal` (the global `fetch` for a client
51
+ * without it). A non-2xx answer of the storage throws `ApiError`.
52
+ */
53
+ async upload(urlToUpload, content, mimetype) {
54
+ const headers = { "Content-Type": mimetype };
55
+ await (this.client.requestExternal ? this.client.requestExternal("PUT", urlToUpload, content, headers) : requestExternal("PUT", urlToUpload, content, headers));
56
+ }
8
57
  };
9
58
 
10
59
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"FilesApi.mjs","names":[],"sources":["../../../src/apis/files/FilesApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { File, CreateFilePayload, UpdateFilePayload } from './types'\n\nexport class FilesApi extends BaseCrudApi<File, CreateFilePayload, UpdateFilePayload> {\n constructor(client: ApiClient) {\n super(client, '/files')\n }\n}\n"],"mappings":";;;AAIA,IAAa,WAAb,cAA8B,YAAwD;CACpF,YAAY,QAAmB;AAC7B,QAAM,QAAQ,SAAS"}
1
+ {"version":3,"file":"FilesApi.mjs","names":[],"sources":["../../../src/apis/files/FilesApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport { requestExternal } from '../../core/requestExternal'\nimport type { GetByIdQuery, ListQuery, Paginated } from '../../core/types'\nimport type {\n File,\n CreateFilePayload,\n UpdateFilePayload,\n CreateToUploadPayload,\n CreateToUploadResult,\n DeleteFileResult,\n} from './types'\n\n/**\n * Files of the account. The backend serves `POST /files` (the record only, no content),\n * `POST /files/create-to-upload` (record + signed URL to upload the content), `POST\n * /files/duplicate-file`, `DELETE /files/:id` and the signed download `GET\n * /files/:accountId/:filename`; there is no list, read by id nor update.\n */\nexport class FilesApi extends BaseCrudApi<\n File,\n CreateFilePayload,\n UpdateFilePayload,\n ListQuery<File>,\n DeleteFileResult\n> {\n constructor(client: ApiClient) {\n super(client, '/files')\n }\n\n /** @deprecated Not served: the backend has no GET /files, so this route answers 404. */\n override getMany(\n query: ListQuery<File> & { paginate: false },\n headers?: Record<string, string>,\n ): Promise<File[]>\n /** @deprecated Not served: the backend has no GET /files, so this route answers 404. */\n override getMany(\n query?: ListQuery<File> & { paginate?: true },\n headers?: Record<string, string>,\n ): Promise<Paginated<File>>\n /** @deprecated Not served: the backend has no GET /files, so this route answers 404. */\n override getMany(\n query?: ListQuery<File>,\n headers?: Record<string, string>,\n ): Promise<Paginated<File> | File[]>\n override getMany(\n query?: ListQuery<File>,\n headers?: Record<string, string>,\n ): Promise<Paginated<File> | File[]> {\n return super.getMany(query, headers)\n }\n\n /** @deprecated Not served: the backend has no GET /files, so this route answers 404. */\n override getOne(query?: ListQuery<File>, headers?: Record<string, string>): Promise<File | null> {\n return super.getOne(query, headers)\n }\n\n /** @deprecated Not served: the backend has no GET /files/:id, so this route answers 404. */\n override getById(\n id: string,\n query?: GetByIdQuery<File>,\n headers?: Record<string, string>,\n ): Promise<File> {\n return super.getById(id, query, headers)\n }\n\n /** @deprecated Not served: the backend has no PUT /files/:id, so this route answers 404. */\n override updateById(\n id: string,\n body: UpdateFilePayload,\n headers?: Record<string, string>,\n ): Promise<File> {\n return super.updateById(id, body, headers)\n }\n\n /**\n * Deletes a file. Resolves `{ success: true }`, also for an unknown id; a file of another\n * account answers 403.\n */\n override deleteById(id: string, headers?: Record<string, string>): Promise<DeleteFileResult> {\n return super.deleteById(id, headers)\n }\n\n /**\n * Creates the record of a file and returns the signed URL to upload its content: send the\n * content with {@link upload}. An audio that must be converted (a voice message for the\n * connection) is sent in `base64` instead, and then no `urlToUpload` is returned. `name` and\n * `mimetype` are required (500 without them; an audio without `name` is named `recording`).\n */\n createToUpload(\n body: CreateToUploadPayload,\n headers?: Record<string, string>,\n ): Promise<CreateToUploadResult> {\n return this.client.post<CreateToUploadResult, CreateToUploadPayload>(\n `${this.basePath}/create-to-upload`,\n body,\n headers,\n )\n }\n\n /**\n * Uploads the content of a file to the `urlToUpload` returned by {@link createToUpload}. The URL\n * is signed by the storage, so the request goes straight to it, without the API token (the\n * storage refuses an `Authorization` header). `mimetype` must be the one sent to\n * `createToUpload`. Sent through `client.requestExternal` (the global `fetch` for a client\n * without it). A non-2xx answer of the storage throws `ApiError`.\n */\n async upload(urlToUpload: string, content: BodyInit, mimetype: string): Promise<void> {\n const headers = { 'Content-Type': mimetype }\n await (this.client.requestExternal\n ? this.client.requestExternal('PUT', urlToUpload, content, headers)\n : requestExternal('PUT', urlToUpload, content, headers))\n }\n}\n"],"mappings":";;;;;;;;;;AAmBA,IAAa,WAAb,cAA8B,YAM5B;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,SAAS;;CAkBzB,AAAS,QACP,OACA,SACmC;AACnC,SAAO,MAAM,QAAQ,OAAO,QAAQ;;;CAItC,AAAS,OAAO,OAAyB,SAAwD;AAC/F,SAAO,MAAM,OAAO,OAAO,QAAQ;;;CAIrC,AAAS,QACP,IACA,OACA,SACe;AACf,SAAO,MAAM,QAAQ,IAAI,OAAO,QAAQ;;;CAI1C,AAAS,WACP,IACA,MACA,SACe;AACf,SAAO,MAAM,WAAW,IAAI,MAAM,QAAQ;;;;;;CAO5C,AAAS,WAAW,IAAY,SAA6D;AAC3F,SAAO,MAAM,WAAW,IAAI,QAAQ;;;;;;;;CAStC,eACE,MACA,SAC+B;AAC/B,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,oBACjB,MACA,QACD;;;;;;;;;CAUH,MAAM,OAAO,aAAqB,SAAmB,UAAiC;EACpF,MAAM,UAAU,EAAE,gBAAgB,UAAU;AAC5C,SAAO,KAAK,OAAO,kBACf,KAAK,OAAO,gBAAgB,OAAO,aAAa,SAAS,QAAQ,GACjE,gBAAgB,OAAO,aAAa,SAAS,QAAQ"}
@@ -12,22 +12,32 @@ export type FileData = {
12
12
  export type FileStorage = 's3' | 'oracle' | 'fs' | 'oracleFallback' | 'wpLvS3' | 'wpBrowserDataS3' | 'exportsS3' | string;
13
13
  export type File = {
14
14
  id: string;
15
+ /** Signed URL to download the content. */
15
16
  url: string;
16
17
  name: string | null;
18
+ /** Name of the file in the storage (`<id>.<extension>`). */
19
+ publicFilename: string | null;
17
20
  checksum: string | null;
18
21
  mimetype: string;
19
22
  extension: string;
20
- isEncrypted: boolean;
21
- iv: string | null;
22
- attachedId: string | null;
23
- attachedType: string | null;
24
- storage: FileStorage;
25
23
  data: FileData;
26
24
  accountId: string;
27
- serviceId: string | null;
28
25
  createdAt: string;
29
26
  updatedAt: string;
30
- deletedAt: string | null;
27
+ /** @deprecated Never answered: the file transformer leaves it out. */
28
+ isEncrypted?: boolean;
29
+ /** @deprecated Never answered: the file transformer leaves it out. */
30
+ iv?: string | null;
31
+ /** @deprecated Never answered: the file transformer leaves it out. */
32
+ attachedId?: string | null;
33
+ /** @deprecated Never answered: the file transformer leaves it out. */
34
+ attachedType?: string | null;
35
+ /** @deprecated Never answered: the file transformer leaves it out. */
36
+ storage?: FileStorage;
37
+ /** @deprecated Never answered: the file transformer leaves it out. */
38
+ serviceId?: string | null;
39
+ /** @deprecated Never answered: the file transformer leaves it out. */
40
+ deletedAt?: string | null;
31
41
  };
32
42
  export type CreateFilePayload = {
33
43
  name?: string;
@@ -43,4 +53,32 @@ export type UpdateFilePayload = {
43
53
  attachedId?: string | null;
44
54
  attachedType?: string | null;
45
55
  };
56
+ /** Body of `FilesApi.createToUpload`. */
57
+ export type CreateToUploadPayload = {
58
+ /** File name (commas are replaced by spaces). Required, except for an audio. */
59
+ name?: string;
60
+ mimetype: string;
61
+ /** What the file is attached to, e.g. `'message.file'` (default), `'campaign.file'`, `'quickreply.file'`. */
62
+ attachedType?: string;
63
+ /** Connection that will send the file (used to decide the audio conversion). */
64
+ serviceId?: string;
65
+ /** Audio sent as a voice message (default `true`). */
66
+ isPtt?: boolean;
67
+ /** Audio sent as a document, with no conversion (default `false`). */
68
+ sendAsDocument?: boolean;
69
+ /** Content of an audio that must be converted (required in that case). */
70
+ base64?: string;
71
+ };
72
+ /** Result of `FilesApi.createToUpload`. */
73
+ export type CreateToUploadResult = {
74
+ /** Signed URL to send the content to (`FilesApi.upload`); absent when the audio was converted. */
75
+ urlToUpload?: string;
76
+ id: string;
77
+ name: string;
78
+ mimetype: string;
79
+ };
80
+ /** Result of `FilesApi.deleteById`. */
81
+ export type DeleteFileResult = {
82
+ success: boolean;
83
+ };
46
84
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/apis/files/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,aAAa,CAAC,EAAE,iBAAiB,CAAA;CAClC,CAAA;AAED,MAAM,MAAM,WAAW,GACnB,IAAI,GACJ,QAAQ,GACR,IAAI,GACJ,gBAAgB,GA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
@@ -6,6 +6,13 @@ var HolidayApi = class extends require_core_BaseCrudApi.BaseCrudApi {
6
6
  constructor(client) {
7
7
  super(client, "/holiday");
8
8
  }
9
+ /**
10
+ * Deletes a holiday. Resolves the text `'OK'`.
11
+ * @permissions holidays.view OR holidays.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":"HolidayApi.cjs","names":["BaseCrudApi"],"sources":["../../../src/apis/holiday/HolidayApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { Holiday, CreateHolidayPayload, UpdateHolidayPayload } from './types'\n\nexport class HolidayApi extends BaseCrudApi<Holiday, CreateHolidayPayload, UpdateHolidayPayload> {\n constructor(client: ApiClient) {\n super(client, '/holiday')\n }\n}\n"],"mappings":";;;;AAIA,IAAa,aAAb,cAAgCA,qCAAiE;CAC/F,YAAY,QAAmB;AAC7B,QAAM,QAAQ,WAAW"}
1
+ {"version":3,"file":"HolidayApi.cjs","names":["BaseCrudApi"],"sources":["../../../src/apis/holiday/HolidayApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport type { ListQuery } from '../../core/types'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { Holiday, CreateHolidayPayload, UpdateHolidayPayload } from './types'\n\nexport class HolidayApi extends BaseCrudApi<\n Holiday,\n CreateHolidayPayload,\n UpdateHolidayPayload,\n ListQuery<Holiday>,\n 'OK'\n> {\n constructor(client: ApiClient) {\n super(client, '/holiday')\n }\n\n /**\n * Deletes a holiday. Resolves the text `'OK'`.\n * @permissions holidays.view OR holidays.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,aAAb,cAAgCA,qCAM9B;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,WAAW;;;;;;CAO3B,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 { Holiday, CreateHolidayPayload, UpdateHolidayPayload } from './types';
4
- export declare class HolidayApi extends BaseCrudApi<Holiday, CreateHolidayPayload, UpdateHolidayPayload> {
5
+ export declare class HolidayApi extends BaseCrudApi<Holiday, CreateHolidayPayload, UpdateHolidayPayload, ListQuery<Holiday>, 'OK'> {
5
6
  constructor(client: ApiClient);
7
+ /**
8
+ * Deletes a holiday. Resolves the text `'OK'`.
9
+ * @permissions holidays.view OR holidays.destroy
10
+ */
11
+ deleteById(id: string, headers?: Record<string, string>): Promise<'OK'>;
6
12
  }
7
13
  //# sourceMappingURL=HolidayApi.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HolidayApi.d.ts","sourceRoot":"","sources":["../../../src/apis/holiday/HolidayApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAElF,qBAAa,UAAW,SAAQ,WAAW,CAAC,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,CAAC;gBAClF,MAAM,EAAE,SAAS;CAG9B"}
1
+ {"version":3,"file":"HolidayApi.d.ts","sourceRoot":"","sources":["../../../src/apis/holiday/HolidayApi.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,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAElF,qBAAa,UAAW,SAAQ,WAAW,CACzC,OAAO,EACP,oBAAoB,EACpB,oBAAoB,EACpB,SAAS,CAAC,OAAO,CAAC,EAClB,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 HolidayApi = class extends BaseCrudApi {
5
5
  constructor(client) {
6
6
  super(client, "/holiday");
7
7
  }
8
+ /**
9
+ * Deletes a holiday. Resolves the text `'OK'`.
10
+ * @permissions holidays.view OR holidays.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":"HolidayApi.mjs","names":[],"sources":["../../../src/apis/holiday/HolidayApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { Holiday, CreateHolidayPayload, UpdateHolidayPayload } from './types'\n\nexport class HolidayApi extends BaseCrudApi<Holiday, CreateHolidayPayload, UpdateHolidayPayload> {\n constructor(client: ApiClient) {\n super(client, '/holiday')\n }\n}\n"],"mappings":";;;AAIA,IAAa,aAAb,cAAgC,YAAiE;CAC/F,YAAY,QAAmB;AAC7B,QAAM,QAAQ,WAAW"}
1
+ {"version":3,"file":"HolidayApi.mjs","names":[],"sources":["../../../src/apis/holiday/HolidayApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport type { ListQuery } from '../../core/types'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { Holiday, CreateHolidayPayload, UpdateHolidayPayload } from './types'\n\nexport class HolidayApi extends BaseCrudApi<\n Holiday,\n CreateHolidayPayload,\n UpdateHolidayPayload,\n ListQuery<Holiday>,\n 'OK'\n> {\n constructor(client: ApiClient) {\n super(client, '/holiday')\n }\n\n /**\n * Deletes a holiday. Resolves the text `'OK'`.\n * @permissions holidays.view OR holidays.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,aAAb,cAAgC,YAM9B;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,WAAW;;;;;;CAO3B,AAAS,WAAW,IAAY,SAAiD;AAC/E,SAAO,MAAM,WAAW,IAAI,QAAQ"}
@@ -2,10 +2,34 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_core_BaseCrudApi = require('../../core/BaseCrudApi.cjs');
3
3
 
4
4
  //#region src/apis/integrations/IntegrationsApi.ts
5
+ /** Integrations of the account (buttons and events of the UI). `getById` answers `null` for an unknown id. */
5
6
  var IntegrationsApi = class extends require_core_BaseCrudApi.BaseCrudApi {
6
7
  constructor(client) {
7
8
  super(client, "/integrations");
8
9
  }
10
+ /**
11
+ * Creates an integration. Resolves `{}` — also when the type is unique (`event_ticket_transfer`,
12
+ * `event_ticket_closed`), already exists in the account and nothing is created. Find the integration with
13
+ * `getMany` (e.g. by `text`).
14
+ * @permissions integrations.create
15
+ */
16
+ create(body, headers) {
17
+ return super.create(body, headers);
18
+ }
19
+ /**
20
+ * Updates an integration. Resolves `{}`; read it again with `getById`. An unknown id answers 500.
21
+ * @permissions integrations.view OR integrations.update
22
+ */
23
+ updateById(id, body, headers) {
24
+ return super.updateById(id, body, headers);
25
+ }
26
+ /**
27
+ * Deletes an integration. Resolves the text `'OK'`; an unknown id answers 500.
28
+ * @permissions integrations.view OR integrations.destroy
29
+ */
30
+ deleteById(id, headers) {
31
+ return super.deleteById(id, headers);
32
+ }
9
33
  };
10
34
 
11
35
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"IntegrationsApi.cjs","names":["BaseCrudApi"],"sources":["../../../src/apis/integrations/IntegrationsApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { Integration, CreateIntegrationPayload, UpdateIntegrationPayload } from './types'\n\nexport class IntegrationsApi extends BaseCrudApi<\n Integration,\n CreateIntegrationPayload,\n UpdateIntegrationPayload\n> {\n constructor(client: ApiClient) {\n super(client, '/integrations')\n }\n}\n"],"mappings":";;;;AAIA,IAAa,kBAAb,cAAqCA,qCAInC;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,gBAAgB"}
1
+ {"version":3,"file":"IntegrationsApi.cjs","names":["BaseCrudApi"],"sources":["../../../src/apis/integrations/IntegrationsApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport type { ListQuery } from '../../core/types'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type {\n Integration,\n CreateIntegrationPayload,\n UpdateIntegrationPayload,\n IntegrationWriteResponse,\n} from './types'\n\n/** Integrations of the account (buttons and events of the UI). `getById` answers `null` for an unknown id. */\nexport class IntegrationsApi extends BaseCrudApi<\n Integration,\n CreateIntegrationPayload,\n UpdateIntegrationPayload,\n ListQuery<Integration>,\n 'OK',\n IntegrationWriteResponse,\n IntegrationWriteResponse\n> {\n constructor(client: ApiClient) {\n super(client, '/integrations')\n }\n\n /**\n * Creates an integration. Resolves `{}` — also when the type is unique (`event_ticket_transfer`,\n * `event_ticket_closed`), already exists in the account and nothing is created. Find the integration with\n * `getMany` (e.g. by `text`).\n * @permissions integrations.create\n */\n override create(\n body: CreateIntegrationPayload,\n headers?: Record<string, string>,\n ): Promise<IntegrationWriteResponse> {\n return super.create(body, headers)\n }\n\n /**\n * Updates an integration. Resolves `{}`; read it again with `getById`. An unknown id answers 500.\n * @permissions integrations.view OR integrations.update\n */\n override updateById(\n id: string,\n body: UpdateIntegrationPayload,\n headers?: Record<string, string>,\n ): Promise<IntegrationWriteResponse> {\n return super.updateById(id, body, headers)\n }\n\n /**\n * Deletes an integration. Resolves the text `'OK'`; an unknown id answers 500.\n * @permissions integrations.view OR integrations.destroy\n */\n override deleteById(id: string, headers?: Record<string, string>): Promise<'OK'> {\n return super.deleteById(id, headers)\n }\n}\n"],"mappings":";;;;;AAWA,IAAa,kBAAb,cAAqCA,qCAQnC;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,gBAAgB;;;;;;;;CAShC,AAAS,OACP,MACA,SACmC;AACnC,SAAO,MAAM,OAAO,MAAM,QAAQ;;;;;;CAOpC,AAAS,WACP,IACA,MACA,SACmC;AACnC,SAAO,MAAM,WAAW,IAAI,MAAM,QAAQ;;;;;;CAO5C,AAAS,WAAW,IAAY,SAAiD;AAC/E,SAAO,MAAM,WAAW,IAAI,QAAQ"}
@@ -1,7 +1,26 @@
1
1
  import type { ApiClient } from '../../core/ApiClient';
2
+ import type { ListQuery } from '../../core/types';
2
3
  import { BaseCrudApi } from '../../core/BaseCrudApi';
3
- import type { Integration, CreateIntegrationPayload, UpdateIntegrationPayload } from './types';
4
- export declare class IntegrationsApi extends BaseCrudApi<Integration, CreateIntegrationPayload, UpdateIntegrationPayload> {
4
+ import type { Integration, CreateIntegrationPayload, UpdateIntegrationPayload, IntegrationWriteResponse } from './types';
5
+ /** Integrations of the account (buttons and events of the UI). `getById` answers `null` for an unknown id. */
6
+ export declare class IntegrationsApi extends BaseCrudApi<Integration, CreateIntegrationPayload, UpdateIntegrationPayload, ListQuery<Integration>, 'OK', IntegrationWriteResponse, IntegrationWriteResponse> {
5
7
  constructor(client: ApiClient);
8
+ /**
9
+ * Creates an integration. Resolves `{}` — also when the type is unique (`event_ticket_transfer`,
10
+ * `event_ticket_closed`), already exists in the account and nothing is created. Find the integration with
11
+ * `getMany` (e.g. by `text`).
12
+ * @permissions integrations.create
13
+ */
14
+ create(body: CreateIntegrationPayload, headers?: Record<string, string>): Promise<IntegrationWriteResponse>;
15
+ /**
16
+ * Updates an integration. Resolves `{}`; read it again with `getById`. An unknown id answers 500.
17
+ * @permissions integrations.view OR integrations.update
18
+ */
19
+ updateById(id: string, body: UpdateIntegrationPayload, headers?: Record<string, string>): Promise<IntegrationWriteResponse>;
20
+ /**
21
+ * Deletes an integration. Resolves the text `'OK'`; an unknown id answers 500.
22
+ * @permissions integrations.view OR integrations.destroy
23
+ */
24
+ deleteById(id: string, headers?: Record<string, string>): Promise<'OK'>;
6
25
  }
7
26
  //# sourceMappingURL=IntegrationsApi.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IntegrationsApi.d.ts","sourceRoot":"","sources":["../../../src/apis/integrations/IntegrationsApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAE9F,qBAAa,eAAgB,SAAQ,WAAW,CAC9C,WAAW,EACX,wBAAwB,EACxB,wBAAwB,CACzB;gBACa,MAAM,EAAE,SAAS;CAG9B"}
1
+ {"version":3,"file":"IntegrationsApi.d.ts","sourceRoot":"","sources":["../../../src/apis/integrations/IntegrationsApi.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,EACV,WAAW,EACX,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,SAAS,CAAA;AAEhB,8GAA8G;AAC9G,qBAAa,eAAgB,SAAQ,WAAW,CAC9C,WAAW,EACX,wBAAwB,EACxB,wBAAwB,EACxB,SAAS,CAAC,WAAW,CAAC,EACtB,IAAI,EACJ,wBAAwB,EACxB,wBAAwB,CACzB;gBACa,MAAM,EAAE,SAAS;IAI7B;;;;;OAKG;IACM,MAAM,CACb,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAAC,wBAAwB,CAAC;IAIpC;;;OAGG;IACM,UAAU,CACjB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAAC,wBAAwB,CAAC;IAIpC;;;OAGG;IACM,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAGjF"}
@@ -1,10 +1,34 @@
1
1
  import { BaseCrudApi } from "../../core/BaseCrudApi.mjs";
2
2
 
3
3
  //#region src/apis/integrations/IntegrationsApi.ts
4
+ /** Integrations of the account (buttons and events of the UI). `getById` answers `null` for an unknown id. */
4
5
  var IntegrationsApi = class extends BaseCrudApi {
5
6
  constructor(client) {
6
7
  super(client, "/integrations");
7
8
  }
9
+ /**
10
+ * Creates an integration. Resolves `{}` — also when the type is unique (`event_ticket_transfer`,
11
+ * `event_ticket_closed`), already exists in the account and nothing is created. Find the integration with
12
+ * `getMany` (e.g. by `text`).
13
+ * @permissions integrations.create
14
+ */
15
+ create(body, headers) {
16
+ return super.create(body, headers);
17
+ }
18
+ /**
19
+ * Updates an integration. Resolves `{}`; read it again with `getById`. An unknown id answers 500.
20
+ * @permissions integrations.view OR integrations.update
21
+ */
22
+ updateById(id, body, headers) {
23
+ return super.updateById(id, body, headers);
24
+ }
25
+ /**
26
+ * Deletes an integration. Resolves the text `'OK'`; an unknown id answers 500.
27
+ * @permissions integrations.view OR integrations.destroy
28
+ */
29
+ deleteById(id, headers) {
30
+ return super.deleteById(id, headers);
31
+ }
8
32
  };
9
33
 
10
34
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"IntegrationsApi.mjs","names":[],"sources":["../../../src/apis/integrations/IntegrationsApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { Integration, CreateIntegrationPayload, UpdateIntegrationPayload } from './types'\n\nexport class IntegrationsApi extends BaseCrudApi<\n Integration,\n CreateIntegrationPayload,\n UpdateIntegrationPayload\n> {\n constructor(client: ApiClient) {\n super(client, '/integrations')\n }\n}\n"],"mappings":";;;AAIA,IAAa,kBAAb,cAAqC,YAInC;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,gBAAgB"}
1
+ {"version":3,"file":"IntegrationsApi.mjs","names":[],"sources":["../../../src/apis/integrations/IntegrationsApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport type { ListQuery } from '../../core/types'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type {\n Integration,\n CreateIntegrationPayload,\n UpdateIntegrationPayload,\n IntegrationWriteResponse,\n} from './types'\n\n/** Integrations of the account (buttons and events of the UI). `getById` answers `null` for an unknown id. */\nexport class IntegrationsApi extends BaseCrudApi<\n Integration,\n CreateIntegrationPayload,\n UpdateIntegrationPayload,\n ListQuery<Integration>,\n 'OK',\n IntegrationWriteResponse,\n IntegrationWriteResponse\n> {\n constructor(client: ApiClient) {\n super(client, '/integrations')\n }\n\n /**\n * Creates an integration. Resolves `{}` — also when the type is unique (`event_ticket_transfer`,\n * `event_ticket_closed`), already exists in the account and nothing is created. Find the integration with\n * `getMany` (e.g. by `text`).\n * @permissions integrations.create\n */\n override create(\n body: CreateIntegrationPayload,\n headers?: Record<string, string>,\n ): Promise<IntegrationWriteResponse> {\n return super.create(body, headers)\n }\n\n /**\n * Updates an integration. Resolves `{}`; read it again with `getById`. An unknown id answers 500.\n * @permissions integrations.view OR integrations.update\n */\n override updateById(\n id: string,\n body: UpdateIntegrationPayload,\n headers?: Record<string, string>,\n ): Promise<IntegrationWriteResponse> {\n return super.updateById(id, body, headers)\n }\n\n /**\n * Deletes an integration. Resolves the text `'OK'`; an unknown id answers 500.\n * @permissions integrations.view OR integrations.destroy\n */\n override deleteById(id: string, headers?: Record<string, string>): Promise<'OK'> {\n return super.deleteById(id, headers)\n }\n}\n"],"mappings":";;;;AAWA,IAAa,kBAAb,cAAqC,YAQnC;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,gBAAgB;;;;;;;;CAShC,AAAS,OACP,MACA,SACmC;AACnC,SAAO,MAAM,OAAO,MAAM,QAAQ;;;;;;CAOpC,AAAS,WACP,IACA,MACA,SACmC;AACnC,SAAO,MAAM,WAAW,IAAI,MAAM,QAAQ;;;;;;CAO5C,AAAS,WAAW,IAAY,SAAiD;AAC/E,SAAO,MAAM,WAAW,IAAI,QAAQ"}
@@ -1,26 +1,35 @@
1
+ /**
2
+ * The types the UI shows: buttons (`menu_button` in the header, `context_menu_button_*` in the contact and
3
+ * message menus) and events that open the integration when a ticket is transferred or closed (unique per
4
+ * account). The backend accepts any string.
5
+ */
6
+ export type IntegrationType = 'menu_button' | 'context_menu_button_contact_modal' | 'context_menu_button_contact_side_list' | 'context_menu_button_message' | 'event_ticket_transfer' | 'event_ticket_closed' | (string & {});
7
+ export type IntegrationSize = 'sm' | 'md' | 'lg' | (string & {});
1
8
  export type Integration = {
2
9
  id: string;
3
- type: string;
10
+ type: IntegrationType;
4
11
  url: string | null;
5
12
  icon: string | null;
6
13
  text: string | null;
7
- size: string | null;
14
+ size: IntegrationSize | null;
8
15
  accountId: string;
9
16
  createdAt: string;
10
17
  updatedAt: string;
11
18
  };
19
+ /** What `create` and `updateById` resolve to: an empty object. */
20
+ export type IntegrationWriteResponse = Record<string, never>;
12
21
  export type CreateIntegrationPayload = {
13
- type: string;
22
+ type: IntegrationType;
14
23
  url?: string;
15
24
  icon?: string;
16
25
  text?: string;
17
- size?: string;
26
+ size?: IntegrationSize;
18
27
  };
19
28
  export type UpdateIntegrationPayload = {
20
- type?: string;
29
+ type?: IntegrationType;
21
30
  url?: string | null;
22
31
  icon?: string | null;
23
32
  text?: string | null;
24
- size?: string | null;
33
+ size?: IntegrationSize | null;
25
34
  };
26
35
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/apis/integrations/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/apis/integrations/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