@ikatec/digisac-api-sdk 4.9.0 → 4.10.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 (283) 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 +8 -0
  41. package/dist/apis/contactBlockLists/ContactBlockListsApi.cjs.map +1 -1
  42. package/dist/apis/contactBlockLists/ContactBlockListsApi.d.ts +8 -1
  43. package/dist/apis/contactBlockLists/ContactBlockListsApi.d.ts.map +1 -1
  44. package/dist/apis/contactBlockLists/ContactBlockListsApi.mjs +8 -0
  45. package/dist/apis/contactBlockLists/ContactBlockListsApi.mjs.map +1 -1
  46. package/dist/apis/contactBlockListsControls/ContactBlockListsControlsApi.cjs +7 -0
  47. package/dist/apis/contactBlockListsControls/ContactBlockListsControlsApi.cjs.map +1 -1
  48. package/dist/apis/contactBlockListsControls/ContactBlockListsControlsApi.d.ts +7 -1
  49. package/dist/apis/contactBlockListsControls/ContactBlockListsControlsApi.d.ts.map +1 -1
  50. package/dist/apis/contactBlockListsControls/ContactBlockListsControlsApi.mjs +7 -0
  51. package/dist/apis/contactBlockListsControls/ContactBlockListsControlsApi.mjs.map +1 -1
  52. package/dist/apis/contacts/ContactsApi.cjs +16 -3
  53. package/dist/apis/contacts/ContactsApi.cjs.map +1 -1
  54. package/dist/apis/contacts/ContactsApi.d.ts +16 -5
  55. package/dist/apis/contacts/ContactsApi.d.ts.map +1 -1
  56. package/dist/apis/contacts/ContactsApi.mjs +16 -3
  57. package/dist/apis/contacts/ContactsApi.mjs.map +1 -1
  58. package/dist/apis/contacts/types.d.ts +6 -1
  59. package/dist/apis/contacts/types.d.ts.map +1 -1
  60. package/dist/apis/creditMovements/CreditMovementsApi.cjs +17 -0
  61. package/dist/apis/creditMovements/CreditMovementsApi.cjs.map +1 -1
  62. package/dist/apis/creditMovements/CreditMovementsApi.d.ts +11 -0
  63. package/dist/apis/creditMovements/CreditMovementsApi.d.ts.map +1 -1
  64. package/dist/apis/creditMovements/CreditMovementsApi.mjs +17 -0
  65. package/dist/apis/creditMovements/CreditMovementsApi.mjs.map +1 -1
  66. package/dist/apis/customFields/CustomFieldsApi.cjs +7 -0
  67. package/dist/apis/customFields/CustomFieldsApi.cjs.map +1 -1
  68. package/dist/apis/customFields/CustomFieldsApi.d.ts +7 -1
  69. package/dist/apis/customFields/CustomFieldsApi.d.ts.map +1 -1
  70. package/dist/apis/customFields/CustomFieldsApi.mjs +7 -0
  71. package/dist/apis/customFields/CustomFieldsApi.mjs.map +1 -1
  72. package/dist/apis/departments/DepartmentsApi.cjs +21 -0
  73. package/dist/apis/departments/DepartmentsApi.cjs.map +1 -1
  74. package/dist/apis/departments/DepartmentsApi.d.ts +20 -2
  75. package/dist/apis/departments/DepartmentsApi.d.ts.map +1 -1
  76. package/dist/apis/departments/DepartmentsApi.mjs +21 -0
  77. package/dist/apis/departments/DepartmentsApi.mjs.map +1 -1
  78. package/dist/apis/departments/types.d.ts +5 -0
  79. package/dist/apis/departments/types.d.ts.map +1 -1
  80. package/dist/apis/distribution/DistributionApi.cjs +7 -0
  81. package/dist/apis/distribution/DistributionApi.cjs.map +1 -1
  82. package/dist/apis/distribution/DistributionApi.d.ts +7 -1
  83. package/dist/apis/distribution/DistributionApi.d.ts.map +1 -1
  84. package/dist/apis/distribution/DistributionApi.mjs +7 -0
  85. package/dist/apis/distribution/DistributionApi.mjs.map +1 -1
  86. package/dist/apis/files/FilesApi.cjs +49 -0
  87. package/dist/apis/files/FilesApi.cjs.map +1 -1
  88. package/dist/apis/files/FilesApi.d.ts +45 -2
  89. package/dist/apis/files/FilesApi.d.ts.map +1 -1
  90. package/dist/apis/files/FilesApi.mjs +49 -0
  91. package/dist/apis/files/FilesApi.mjs.map +1 -1
  92. package/dist/apis/files/types.d.ts +45 -7
  93. package/dist/apis/files/types.d.ts.map +1 -1
  94. package/dist/apis/holiday/HolidayApi.cjs +7 -0
  95. package/dist/apis/holiday/HolidayApi.cjs.map +1 -1
  96. package/dist/apis/holiday/HolidayApi.d.ts +7 -1
  97. package/dist/apis/holiday/HolidayApi.d.ts.map +1 -1
  98. package/dist/apis/holiday/HolidayApi.mjs +7 -0
  99. package/dist/apis/holiday/HolidayApi.mjs.map +1 -1
  100. package/dist/apis/integrations/IntegrationsApi.cjs +7 -0
  101. package/dist/apis/integrations/IntegrationsApi.cjs.map +1 -1
  102. package/dist/apis/integrations/IntegrationsApi.d.ts +7 -1
  103. package/dist/apis/integrations/IntegrationsApi.d.ts.map +1 -1
  104. package/dist/apis/integrations/IntegrationsApi.mjs +7 -0
  105. package/dist/apis/integrations/IntegrationsApi.mjs.map +1 -1
  106. package/dist/apis/interactiveMessages/InteractiveMessagesApi.cjs +7 -0
  107. package/dist/apis/interactiveMessages/InteractiveMessagesApi.cjs.map +1 -1
  108. package/dist/apis/interactiveMessages/InteractiveMessagesApi.d.ts +7 -1
  109. package/dist/apis/interactiveMessages/InteractiveMessagesApi.d.ts.map +1 -1
  110. package/dist/apis/interactiveMessages/InteractiveMessagesApi.mjs +7 -0
  111. package/dist/apis/interactiveMessages/InteractiveMessagesApi.mjs.map +1 -1
  112. package/dist/apis/kanbanBoards/KanbanBoardsApi.cjs +7 -0
  113. package/dist/apis/kanbanBoards/KanbanBoardsApi.cjs.map +1 -1
  114. package/dist/apis/kanbanBoards/KanbanBoardsApi.d.ts +7 -1
  115. package/dist/apis/kanbanBoards/KanbanBoardsApi.d.ts.map +1 -1
  116. package/dist/apis/kanbanBoards/KanbanBoardsApi.mjs +7 -0
  117. package/dist/apis/kanbanBoards/KanbanBoardsApi.mjs.map +1 -1
  118. package/dist/apis/kanbanCards/KanbanCardsApi.cjs +7 -0
  119. package/dist/apis/kanbanCards/KanbanCardsApi.cjs.map +1 -1
  120. package/dist/apis/kanbanCards/KanbanCardsApi.d.ts +7 -1
  121. package/dist/apis/kanbanCards/KanbanCardsApi.d.ts.map +1 -1
  122. package/dist/apis/kanbanCards/KanbanCardsApi.mjs +7 -0
  123. package/dist/apis/kanbanCards/KanbanCardsApi.mjs.map +1 -1
  124. package/dist/apis/knowledgeBase/KnowledgeBaseApi.cjs +8 -0
  125. package/dist/apis/knowledgeBase/KnowledgeBaseApi.cjs.map +1 -1
  126. package/dist/apis/knowledgeBase/KnowledgeBaseApi.d.ts +8 -1
  127. package/dist/apis/knowledgeBase/KnowledgeBaseApi.d.ts.map +1 -1
  128. package/dist/apis/knowledgeBase/KnowledgeBaseApi.mjs +8 -0
  129. package/dist/apis/knowledgeBase/KnowledgeBaseApi.mjs.map +1 -1
  130. package/dist/apis/knowledgeBaseItem/KnowledgeBaseItemApi.cjs +8 -0
  131. package/dist/apis/knowledgeBaseItem/KnowledgeBaseItemApi.cjs.map +1 -1
  132. package/dist/apis/knowledgeBaseItem/KnowledgeBaseItemApi.d.ts +8 -1
  133. package/dist/apis/knowledgeBaseItem/KnowledgeBaseItemApi.d.ts.map +1 -1
  134. package/dist/apis/knowledgeBaseItem/KnowledgeBaseItemApi.mjs +8 -0
  135. package/dist/apis/knowledgeBaseItem/KnowledgeBaseItemApi.mjs.map +1 -1
  136. package/dist/apis/messages/MessagesApi.cjs +23 -3
  137. package/dist/apis/messages/MessagesApi.cjs.map +1 -1
  138. package/dist/apis/messages/MessagesApi.d.ts +19 -3
  139. package/dist/apis/messages/MessagesApi.d.ts.map +1 -1
  140. package/dist/apis/messages/MessagesApi.mjs +23 -3
  141. package/dist/apis/messages/MessagesApi.mjs.map +1 -1
  142. package/dist/apis/messages/types.d.ts +3 -0
  143. package/dist/apis/messages/types.d.ts.map +1 -1
  144. package/dist/apis/notifications/NotificationsApi.cjs +7 -0
  145. package/dist/apis/notifications/NotificationsApi.cjs.map +1 -1
  146. package/dist/apis/notifications/NotificationsApi.d.ts +7 -1
  147. package/dist/apis/notifications/NotificationsApi.d.ts.map +1 -1
  148. package/dist/apis/notifications/NotificationsApi.mjs +7 -0
  149. package/dist/apis/notifications/NotificationsApi.mjs.map +1 -1
  150. package/dist/apis/organizations/OrganizationsApi.cjs +7 -0
  151. package/dist/apis/organizations/OrganizationsApi.cjs.map +1 -1
  152. package/dist/apis/organizations/OrganizationsApi.d.ts +7 -1
  153. package/dist/apis/organizations/OrganizationsApi.d.ts.map +1 -1
  154. package/dist/apis/organizations/OrganizationsApi.mjs +7 -0
  155. package/dist/apis/organizations/OrganizationsApi.mjs.map +1 -1
  156. package/dist/apis/people/PeopleApi.cjs +7 -0
  157. package/dist/apis/people/PeopleApi.cjs.map +1 -1
  158. package/dist/apis/people/PeopleApi.d.ts +7 -1
  159. package/dist/apis/people/PeopleApi.d.ts.map +1 -1
  160. package/dist/apis/people/PeopleApi.mjs +7 -0
  161. package/dist/apis/people/PeopleApi.mjs.map +1 -1
  162. package/dist/apis/planAiHistory/PlanAiHistoryApi.cjs +16 -0
  163. package/dist/apis/planAiHistory/PlanAiHistoryApi.cjs.map +1 -1
  164. package/dist/apis/planAiHistory/PlanAiHistoryApi.d.ts +10 -0
  165. package/dist/apis/planAiHistory/PlanAiHistoryApi.d.ts.map +1 -1
  166. package/dist/apis/planAiHistory/PlanAiHistoryApi.mjs +16 -0
  167. package/dist/apis/planAiHistory/PlanAiHistoryApi.mjs.map +1 -1
  168. package/dist/apis/roles/RolesApi.cjs +7 -0
  169. package/dist/apis/roles/RolesApi.cjs.map +1 -1
  170. package/dist/apis/roles/RolesApi.d.ts +6 -1
  171. package/dist/apis/roles/RolesApi.d.ts.map +1 -1
  172. package/dist/apis/roles/RolesApi.mjs +7 -0
  173. package/dist/apis/roles/RolesApi.mjs.map +1 -1
  174. package/dist/apis/services/ServicesApi.cjs +68 -0
  175. package/dist/apis/services/ServicesApi.cjs.map +1 -1
  176. package/dist/apis/services/ServicesApi.d.ts +53 -1
  177. package/dist/apis/services/ServicesApi.d.ts.map +1 -1
  178. package/dist/apis/services/ServicesApi.mjs +68 -0
  179. package/dist/apis/services/ServicesApi.mjs.map +1 -1
  180. package/dist/apis/services/types.d.ts +15 -0
  181. package/dist/apis/services/types.d.ts.map +1 -1
  182. package/dist/apis/stickers/StickersApi.cjs +20 -0
  183. package/dist/apis/stickers/StickersApi.cjs.map +1 -1
  184. package/dist/apis/stickers/StickersApi.d.ts +15 -0
  185. package/dist/apis/stickers/StickersApi.d.ts.map +1 -1
  186. package/dist/apis/stickers/StickersApi.mjs +20 -0
  187. package/dist/apis/stickers/StickersApi.mjs.map +1 -1
  188. package/dist/apis/tags/TagsApi.cjs +7 -0
  189. package/dist/apis/tags/TagsApi.cjs.map +1 -1
  190. package/dist/apis/tags/TagsApi.d.ts +7 -1
  191. package/dist/apis/tags/TagsApi.d.ts.map +1 -1
  192. package/dist/apis/tags/TagsApi.mjs +7 -0
  193. package/dist/apis/tags/TagsApi.mjs.map +1 -1
  194. package/dist/apis/timetable/TimetableApi.cjs +7 -0
  195. package/dist/apis/timetable/TimetableApi.cjs.map +1 -1
  196. package/dist/apis/timetable/TimetableApi.d.ts +7 -1
  197. package/dist/apis/timetable/TimetableApi.d.ts.map +1 -1
  198. package/dist/apis/timetable/TimetableApi.mjs +7 -0
  199. package/dist/apis/timetable/TimetableApi.mjs.map +1 -1
  200. package/dist/apis/users/UsersApi.cjs +8 -0
  201. package/dist/apis/users/UsersApi.cjs.map +1 -1
  202. package/dist/apis/users/UsersApi.d.ts +8 -1
  203. package/dist/apis/users/UsersApi.d.ts.map +1 -1
  204. package/dist/apis/users/UsersApi.mjs +8 -0
  205. package/dist/apis/users/UsersApi.mjs.map +1 -1
  206. package/dist/apis/users/types.d.ts +15 -0
  207. package/dist/apis/users/types.d.ts.map +1 -1
  208. package/dist/apis/webhooks/WebhooksApi.cjs +7 -0
  209. package/dist/apis/webhooks/WebhooksApi.cjs.map +1 -1
  210. package/dist/apis/webhooks/WebhooksApi.d.ts +7 -1
  211. package/dist/apis/webhooks/WebhooksApi.d.ts.map +1 -1
  212. package/dist/apis/webhooks/WebhooksApi.mjs +7 -0
  213. package/dist/apis/webhooks/WebhooksApi.mjs.map +1 -1
  214. package/dist/core/ApiClient.d.ts +14 -0
  215. package/dist/core/ApiClient.d.ts.map +1 -1
  216. package/dist/core/ArchivableCrudApi.cjs.map +1 -1
  217. package/dist/core/ArchivableCrudApi.d.ts +1 -1
  218. package/dist/core/ArchivableCrudApi.d.ts.map +1 -1
  219. package/dist/core/ArchivableCrudApi.mjs.map +1 -1
  220. package/dist/core/BaseApiClient.cjs +24 -3
  221. package/dist/core/BaseApiClient.cjs.map +1 -1
  222. package/dist/core/BaseApiClient.d.ts +14 -0
  223. package/dist/core/BaseApiClient.d.ts.map +1 -1
  224. package/dist/core/BaseApiClient.mjs +24 -3
  225. package/dist/core/BaseApiClient.mjs.map +1 -1
  226. package/dist/core/requestExternal.cjs +33 -0
  227. package/dist/core/requestExternal.cjs.map +1 -0
  228. package/dist/core/requestExternal.d.ts +9 -0
  229. package/dist/core/requestExternal.d.ts.map +1 -0
  230. package/dist/core/requestExternal.mjs +32 -0
  231. package/dist/core/requestExternal.mjs.map +1 -0
  232. package/package.json +1 -1
  233. package/src/apis/absence/AbsenceApi.ts +19 -0
  234. package/src/apis/acceptanceTerms/AcceptanceTermsApi.ts +13 -1
  235. package/src/apis/accounts/AccountsApi.ts +5 -0
  236. package/src/apis/accounts/types.ts +2 -0
  237. package/src/apis/activityLog/ActivityLogApi.ts +18 -0
  238. package/src/apis/categories/CategoriesApi.ts +12 -1
  239. package/src/apis/clientFeedback/ClientFeedbackApi.ts +5 -1
  240. package/src/apis/contactBlockLists/ContactBlockListsApi.ts +13 -1
  241. package/src/apis/contactBlockListsControls/ContactBlockListsControlsApi.ts +12 -1
  242. package/src/apis/contacts/ContactsApi.test.ts +20 -4
  243. package/src/apis/contacts/ContactsApi.ts +24 -5
  244. package/src/apis/contacts/types.ts +7 -1
  245. package/src/apis/creditMovements/CreditMovementsApi.ts +27 -0
  246. package/src/apis/customFields/CustomFieldsApi.ts +12 -1
  247. package/src/apis/departments/DepartmentsApi.test.ts +88 -0
  248. package/src/apis/departments/DepartmentsApi.ts +41 -2
  249. package/src/apis/departments/types.ts +6 -0
  250. package/src/apis/distribution/DistributionApi.ts +12 -1
  251. package/src/apis/files/FilesApi.test.ts +122 -0
  252. package/src/apis/files/FilesApi.ts +107 -2
  253. package/src/apis/files/types.ts +48 -7
  254. package/src/apis/holiday/HolidayApi.ts +16 -1
  255. package/src/apis/integrations/IntegrationsApi.ts +12 -1
  256. package/src/apis/interactiveMessages/InteractiveMessagesApi.ts +12 -1
  257. package/src/apis/kanbanBoards/KanbanBoardsApi.ts +12 -1
  258. package/src/apis/kanbanCards/KanbanCardsApi.ts +12 -1
  259. package/src/apis/knowledgeBase/KnowledgeBaseApi.ts +13 -1
  260. package/src/apis/knowledgeBaseItem/KnowledgeBaseItemApi.ts +13 -1
  261. package/src/apis/messages/MessagesApi.test.ts +13 -7
  262. package/src/apis/messages/MessagesApi.ts +29 -3
  263. package/src/apis/messages/types.ts +3 -0
  264. package/src/apis/notifications/NotificationsApi.ts +12 -1
  265. package/src/apis/organizations/OrganizationsApi.ts +12 -1
  266. package/src/apis/payloads.test-d.ts +114 -0
  267. package/src/apis/people/PeopleApi.ts +16 -1
  268. package/src/apis/planAiHistory/PlanAiHistoryApi.ts +26 -0
  269. package/src/apis/roles/RolesApi.ts +10 -1
  270. package/src/apis/services/ServicesApi.test.ts +45 -0
  271. package/src/apis/services/ServicesApi.ts +91 -1
  272. package/src/apis/services/types.ts +16 -0
  273. package/src/apis/stickers/StickersApi.ts +32 -0
  274. package/src/apis/tags/TagsApi.ts +16 -1
  275. package/src/apis/timetable/TimetableApi.ts +12 -1
  276. package/src/apis/users/UsersApi.ts +17 -1
  277. package/src/apis/users/types.ts +11 -0
  278. package/src/apis/webhooks/WebhooksApi.ts +16 -1
  279. package/src/core/ApiClient.ts +24 -0
  280. package/src/core/ArchivableCrudApi.ts +2 -1
  281. package/src/core/BaseApiClient.test.ts +98 -0
  282. package/src/core/BaseApiClient.ts +49 -4
  283. package/src/core/requestExternal.ts +43 -0
@@ -6,6 +6,13 @@ var CustomFieldsApi = class extends require_core_BaseCrudApi.BaseCrudApi {
6
6
  constructor(client) {
7
7
  super(client, "/custom-fields");
8
8
  }
9
+ /**
10
+ * Deletes a custom field. Resolves the text `'OK'`.
11
+ * @permissions customFields.view OR customFields.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":"CustomFieldsApi.cjs","names":["BaseCrudApi"],"sources":["../../../src/apis/customFields/CustomFieldsApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { CustomField, CreateCustomFieldPayload, UpdateCustomFieldPayload } from './types'\n\nexport class CustomFieldsApi extends BaseCrudApi<\n CustomField,\n CreateCustomFieldPayload,\n UpdateCustomFieldPayload\n> {\n constructor(client: ApiClient) {\n super(client, '/custom-fields')\n }\n}\n"],"mappings":";;;;AAIA,IAAa,kBAAb,cAAqCA,qCAInC;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,iBAAiB"}
1
+ {"version":3,"file":"CustomFieldsApi.cjs","names":["BaseCrudApi"],"sources":["../../../src/apis/customFields/CustomFieldsApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport type { ListQuery } from '../../core/types'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { CustomField, CreateCustomFieldPayload, UpdateCustomFieldPayload } from './types'\n\nexport class CustomFieldsApi extends BaseCrudApi<\n CustomField,\n CreateCustomFieldPayload,\n UpdateCustomFieldPayload,\n ListQuery<CustomField>,\n 'OK'\n> {\n constructor(client: ApiClient) {\n super(client, '/custom-fields')\n }\n\n /**\n * Deletes a custom field. Resolves the text `'OK'`.\n * @permissions customFields.view OR customFields.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,kBAAb,cAAqCA,qCAMnC;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,iBAAiB;;;;;;CAOjC,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 { CustomField, CreateCustomFieldPayload, UpdateCustomFieldPayload } from './types';
4
- export declare class CustomFieldsApi extends BaseCrudApi<CustomField, CreateCustomFieldPayload, UpdateCustomFieldPayload> {
5
+ export declare class CustomFieldsApi extends BaseCrudApi<CustomField, CreateCustomFieldPayload, UpdateCustomFieldPayload, ListQuery<CustomField>, 'OK'> {
5
6
  constructor(client: ApiClient);
7
+ /**
8
+ * Deletes a custom field. Resolves the text `'OK'`.
9
+ * @permissions customFields.view OR customFields.destroy
10
+ */
11
+ deleteById(id: string, headers?: Record<string, string>): Promise<'OK'>;
6
12
  }
7
13
  //# sourceMappingURL=CustomFieldsApi.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CustomFieldsApi.d.ts","sourceRoot":"","sources":["../../../src/apis/customFields/CustomFieldsApi.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":"CustomFieldsApi.d.ts","sourceRoot":"","sources":["../../../src/apis/customFields/CustomFieldsApi.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,WAAW,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAE9F,qBAAa,eAAgB,SAAQ,WAAW,CAC9C,WAAW,EACX,wBAAwB,EACxB,wBAAwB,EACxB,SAAS,CAAC,WAAW,CAAC,EACtB,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 CustomFieldsApi = class extends BaseCrudApi {
5
5
  constructor(client) {
6
6
  super(client, "/custom-fields");
7
7
  }
8
+ /**
9
+ * Deletes a custom field. Resolves the text `'OK'`.
10
+ * @permissions customFields.view OR customFields.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":"CustomFieldsApi.mjs","names":[],"sources":["../../../src/apis/customFields/CustomFieldsApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { CustomField, CreateCustomFieldPayload, UpdateCustomFieldPayload } from './types'\n\nexport class CustomFieldsApi extends BaseCrudApi<\n CustomField,\n CreateCustomFieldPayload,\n UpdateCustomFieldPayload\n> {\n constructor(client: ApiClient) {\n super(client, '/custom-fields')\n }\n}\n"],"mappings":";;;AAIA,IAAa,kBAAb,cAAqC,YAInC;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,iBAAiB"}
1
+ {"version":3,"file":"CustomFieldsApi.mjs","names":[],"sources":["../../../src/apis/customFields/CustomFieldsApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport type { ListQuery } from '../../core/types'\nimport { BaseCrudApi } from '../../core/BaseCrudApi'\nimport type { CustomField, CreateCustomFieldPayload, UpdateCustomFieldPayload } from './types'\n\nexport class CustomFieldsApi extends BaseCrudApi<\n CustomField,\n CreateCustomFieldPayload,\n UpdateCustomFieldPayload,\n ListQuery<CustomField>,\n 'OK'\n> {\n constructor(client: ApiClient) {\n super(client, '/custom-fields')\n }\n\n /**\n * Deletes a custom field. Resolves the text `'OK'`.\n * @permissions customFields.view OR customFields.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,kBAAb,cAAqC,YAMnC;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,iBAAiB;;;;;;CAOjC,AAAS,WAAW,IAAY,SAAiD;AAC/E,SAAO,MAAM,WAAW,IAAI,QAAQ"}
@@ -6,6 +6,27 @@ var DepartmentsApi = class extends require_core_ArchivableCrudApi.ArchivableCrud
6
6
  constructor(client) {
7
7
  super(client, "/departments");
8
8
  }
9
+ /**
10
+ * Archives (`archive: true`) or restores (`archive: false`) a department through the route used
11
+ * by the UI, which enforces what {@link archive}/{@link unarchive} (a plain `PUT { archivedAt }`)
12
+ * skip: archiving refuses (403 `Cannot archive department.`, with the reasons and the open
13
+ * tickets count) a department in use, and clears it as the default department of contacts and
14
+ * connections, marks its schedules as done and unlinks its users and quick replies. Resolves the
15
+ * stored department (not transformed); an unknown id answers 500.
16
+ * @permissions departments.view OR departments.archive
17
+ */
18
+ archiveWithValidation(id, body, headers) {
19
+ return this.client.post(`${this.basePath}/${id}/archive`, body, headers);
20
+ }
21
+ /**
22
+ * Deletes a department. Resolves the text `'OK'`; a department that is the default of the account
23
+ * or that is referenced in the attendant name visibility settings is refused, and an unknown id
24
+ * answers 500.
25
+ * @permissions departments.view OR departments.archive
26
+ */
27
+ deleteById(id, headers) {
28
+ return super.deleteById(id, headers);
29
+ }
9
30
  };
10
31
 
11
32
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"DepartmentsApi.cjs","names":["ArchivableCrudApi"],"sources":["../../../src/apis/departments/DepartmentsApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { ArchivableCrudApi } from '../../core/ArchivableCrudApi'\nimport type { Department, CreateDepartmentPayload, UpdateDepartmentPayload } from './types'\n\nexport class DepartmentsApi extends ArchivableCrudApi<\n Department,\n CreateDepartmentPayload,\n UpdateDepartmentPayload\n> {\n constructor(client: ApiClient) {\n super(client, '/departments')\n }\n}\n"],"mappings":";;;;AAIA,IAAa,iBAAb,cAAoCA,iDAIlC;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,eAAe"}
1
+ {"version":3,"file":"DepartmentsApi.cjs","names":["ArchivableCrudApi"],"sources":["../../../src/apis/departments/DepartmentsApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport type { ListQuery } from '../../core/types'\nimport { ArchivableCrudApi } from '../../core/ArchivableCrudApi'\nimport type {\n Department,\n CreateDepartmentPayload,\n UpdateDepartmentPayload,\n ArchiveDepartmentPayload,\n} from './types'\n\nexport class DepartmentsApi extends ArchivableCrudApi<\n Department,\n CreateDepartmentPayload,\n UpdateDepartmentPayload,\n ListQuery<Department>,\n 'OK'\n> {\n constructor(client: ApiClient) {\n super(client, '/departments')\n }\n\n /**\n * Archives (`archive: true`) or restores (`archive: false`) a department through the route used\n * by the UI, which enforces what {@link archive}/{@link unarchive} (a plain `PUT { archivedAt }`)\n * skip: archiving refuses (403 `Cannot archive department.`, with the reasons and the open\n * tickets count) a department in use, and clears it as the default department of contacts and\n * connections, marks its schedules as done and unlinks its users and quick replies. Resolves the\n * stored department (not transformed); an unknown id answers 500.\n * @permissions departments.view OR departments.archive\n */\n archiveWithValidation(\n id: string,\n body: ArchiveDepartmentPayload,\n headers?: Record<string, string>,\n ): Promise<Department> {\n return this.client.post<Department, ArchiveDepartmentPayload>(\n `${this.basePath}/${id}/archive`,\n body,\n headers,\n )\n }\n\n /**\n * Deletes a department. Resolves the text `'OK'`; a department that is the default of the account\n * or that is referenced in the attendant name visibility settings is refused, and an unknown id\n * answers 500.\n * @permissions departments.view OR departments.archive\n */\n override deleteById(id: string, headers?: Record<string, string>): Promise<'OK'> {\n return super.deleteById(id, headers)\n }\n}\n"],"mappings":";;;;AAUA,IAAa,iBAAb,cAAoCA,iDAMlC;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,eAAe;;;;;;;;;;;CAY/B,sBACE,IACA,MACA,SACqB;AACrB,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,GAAG,GAAG,WACvB,MACA,QACD;;;;;;;;CASH,AAAS,WAAW,IAAY,SAAiD;AAC/E,SAAO,MAAM,WAAW,IAAI,QAAQ"}
@@ -1,7 +1,25 @@
1
1
  import type { ApiClient } from '../../core/ApiClient';
2
+ import type { ListQuery } from '../../core/types';
2
3
  import { ArchivableCrudApi } from '../../core/ArchivableCrudApi';
3
- import type { Department, CreateDepartmentPayload, UpdateDepartmentPayload } from './types';
4
- export declare class DepartmentsApi extends ArchivableCrudApi<Department, CreateDepartmentPayload, UpdateDepartmentPayload> {
4
+ import type { Department, CreateDepartmentPayload, UpdateDepartmentPayload, ArchiveDepartmentPayload } from './types';
5
+ export declare class DepartmentsApi extends ArchivableCrudApi<Department, CreateDepartmentPayload, UpdateDepartmentPayload, ListQuery<Department>, 'OK'> {
5
6
  constructor(client: ApiClient);
7
+ /**
8
+ * Archives (`archive: true`) or restores (`archive: false`) a department through the route used
9
+ * by the UI, which enforces what {@link archive}/{@link unarchive} (a plain `PUT { archivedAt }`)
10
+ * skip: archiving refuses (403 `Cannot archive department.`, with the reasons and the open
11
+ * tickets count) a department in use, and clears it as the default department of contacts and
12
+ * connections, marks its schedules as done and unlinks its users and quick replies. Resolves the
13
+ * stored department (not transformed); an unknown id answers 500.
14
+ * @permissions departments.view OR departments.archive
15
+ */
16
+ archiveWithValidation(id: string, body: ArchiveDepartmentPayload, headers?: Record<string, string>): Promise<Department>;
17
+ /**
18
+ * Deletes a department. Resolves the text `'OK'`; a department that is the default of the account
19
+ * or that is referenced in the attendant name visibility settings is refused, and an unknown id
20
+ * answers 500.
21
+ * @permissions departments.view OR departments.archive
22
+ */
23
+ deleteById(id: string, headers?: Record<string, string>): Promise<'OK'>;
6
24
  }
7
25
  //# sourceMappingURL=DepartmentsApi.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DepartmentsApi.d.ts","sourceRoot":"","sources":["../../../src/apis/departments/DepartmentsApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAE3F,qBAAa,cAAe,SAAQ,iBAAiB,CACnD,UAAU,EACV,uBAAuB,EACvB,uBAAuB,CACxB;gBACa,MAAM,EAAE,SAAS;CAG9B"}
1
+ {"version":3,"file":"DepartmentsApi.d.ts","sourceRoot":"","sources":["../../../src/apis/departments/DepartmentsApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,KAAK,EACV,UAAU,EACV,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,SAAS,CAAA;AAEhB,qBAAa,cAAe,SAAQ,iBAAiB,CACnD,UAAU,EACV,uBAAuB,EACvB,uBAAuB,EACvB,SAAS,CAAC,UAAU,CAAC,EACrB,IAAI,CACL;gBACa,MAAM,EAAE,SAAS;IAI7B;;;;;;;;OAQG;IACH,qBAAqB,CACnB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAAC,UAAU,CAAC;IAQtB;;;;;OAKG;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,27 @@ var DepartmentsApi = class extends ArchivableCrudApi {
5
5
  constructor(client) {
6
6
  super(client, "/departments");
7
7
  }
8
+ /**
9
+ * Archives (`archive: true`) or restores (`archive: false`) a department through the route used
10
+ * by the UI, which enforces what {@link archive}/{@link unarchive} (a plain `PUT { archivedAt }`)
11
+ * skip: archiving refuses (403 `Cannot archive department.`, with the reasons and the open
12
+ * tickets count) a department in use, and clears it as the default department of contacts and
13
+ * connections, marks its schedules as done and unlinks its users and quick replies. Resolves the
14
+ * stored department (not transformed); an unknown id answers 500.
15
+ * @permissions departments.view OR departments.archive
16
+ */
17
+ archiveWithValidation(id, body, headers) {
18
+ return this.client.post(`${this.basePath}/${id}/archive`, body, headers);
19
+ }
20
+ /**
21
+ * Deletes a department. Resolves the text `'OK'`; a department that is the default of the account
22
+ * or that is referenced in the attendant name visibility settings is refused, and an unknown id
23
+ * answers 500.
24
+ * @permissions departments.view OR departments.archive
25
+ */
26
+ deleteById(id, headers) {
27
+ return super.deleteById(id, headers);
28
+ }
8
29
  };
9
30
 
10
31
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"DepartmentsApi.mjs","names":[],"sources":["../../../src/apis/departments/DepartmentsApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport { ArchivableCrudApi } from '../../core/ArchivableCrudApi'\nimport type { Department, CreateDepartmentPayload, UpdateDepartmentPayload } from './types'\n\nexport class DepartmentsApi extends ArchivableCrudApi<\n Department,\n CreateDepartmentPayload,\n UpdateDepartmentPayload\n> {\n constructor(client: ApiClient) {\n super(client, '/departments')\n }\n}\n"],"mappings":";;;AAIA,IAAa,iBAAb,cAAoC,kBAIlC;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,eAAe"}
1
+ {"version":3,"file":"DepartmentsApi.mjs","names":[],"sources":["../../../src/apis/departments/DepartmentsApi.ts"],"sourcesContent":["import type { ApiClient } from '../../core/ApiClient'\nimport type { ListQuery } from '../../core/types'\nimport { ArchivableCrudApi } from '../../core/ArchivableCrudApi'\nimport type {\n Department,\n CreateDepartmentPayload,\n UpdateDepartmentPayload,\n ArchiveDepartmentPayload,\n} from './types'\n\nexport class DepartmentsApi extends ArchivableCrudApi<\n Department,\n CreateDepartmentPayload,\n UpdateDepartmentPayload,\n ListQuery<Department>,\n 'OK'\n> {\n constructor(client: ApiClient) {\n super(client, '/departments')\n }\n\n /**\n * Archives (`archive: true`) or restores (`archive: false`) a department through the route used\n * by the UI, which enforces what {@link archive}/{@link unarchive} (a plain `PUT { archivedAt }`)\n * skip: archiving refuses (403 `Cannot archive department.`, with the reasons and the open\n * tickets count) a department in use, and clears it as the default department of contacts and\n * connections, marks its schedules as done and unlinks its users and quick replies. Resolves the\n * stored department (not transformed); an unknown id answers 500.\n * @permissions departments.view OR departments.archive\n */\n archiveWithValidation(\n id: string,\n body: ArchiveDepartmentPayload,\n headers?: Record<string, string>,\n ): Promise<Department> {\n return this.client.post<Department, ArchiveDepartmentPayload>(\n `${this.basePath}/${id}/archive`,\n body,\n headers,\n )\n }\n\n /**\n * Deletes a department. Resolves the text `'OK'`; a department that is the default of the account\n * or that is referenced in the attendant name visibility settings is refused, and an unknown id\n * answers 500.\n * @permissions departments.view OR departments.archive\n */\n override deleteById(id: string, headers?: Record<string, string>): Promise<'OK'> {\n return super.deleteById(id, headers)\n }\n}\n"],"mappings":";;;AAUA,IAAa,iBAAb,cAAoC,kBAMlC;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,eAAe;;;;;;;;;;;CAY/B,sBACE,IACA,MACA,SACqB;AACrB,SAAO,KAAK,OAAO,KACjB,GAAG,KAAK,SAAS,GAAG,GAAG,WACvB,MACA,QACD;;;;;;;;CASH,AAAS,WAAW,IAAY,SAAiD;AAC/E,SAAO,MAAM,WAAW,IAAI,QAAQ"}
@@ -21,4 +21,9 @@ export type UpdateDepartmentPayload = {
21
21
  distributionId?: string | null;
22
22
  archivedAt?: string | null;
23
23
  };
24
+ /** Body of `DepartmentsApi.archiveWithValidation`. */
25
+ export type ArchiveDepartmentPayload = {
26
+ /** `true` archives, `false` restores. */
27
+ archive: boolean;
28
+ };
24
29
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/apis/departments/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAA;AAExC,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IAEjB,YAAY,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;IAClC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;CACb,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,cAAc,GAAG,MAAM,CAAA;AAE7D,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3B,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/apis/departments/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,eAAe,CAAA;AAExC,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IAEjB,YAAY,CAAC,EAAE,YAAY,GAAG,IAAI,CAAA;IAClC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;CACb,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,cAAc,GAAG,MAAM,CAAA;AAE7D,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3B,CAAA;AAED,sDAAsD;AACtD,MAAM,MAAM,wBAAwB,GAAG;IACrC,yCAAyC;IACzC,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA"}
@@ -6,6 +6,13 @@ var DistributionApi = class extends require_core_BaseCrudApi.BaseCrudApi {
6
6
  constructor(client) {
7
7
  super(client, "/distribution");
8
8
  }
9
+ /**
10
+ * Deletes a distribution. Resolves with no body, also for an unknown id (200).
11
+ * @permissions distribution.view OR distribution.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":"DistributionApi.cjs","names":["BaseCrudApi"],"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,cAAqCA,qCAInC;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,gBAAgB"}
1
+ {"version":3,"file":"DistributionApi.cjs","names":["BaseCrudApi"],"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 { Distribution, CreateDistributionPayload, UpdateDistributionPayload } from './types'\n\nexport class DistributionApi extends BaseCrudApi<\n Distribution,\n CreateDistributionPayload,\n UpdateDistributionPayload,\n ListQuery<Distribution>,\n void\n> {\n constructor(client: ApiClient) {\n super(client, '/distribution')\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":";;;;AAKA,IAAa,kBAAb,cAAqCA,qCAMnC;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,gBAAgB;;;;;;CAOhC,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 { Distribution, CreateDistributionPayload, UpdateDistributionPayload } from './types';
4
- export declare class DistributionApi extends BaseCrudApi<Distribution, CreateDistributionPayload, UpdateDistributionPayload> {
5
+ export declare class DistributionApi extends BaseCrudApi<Distribution, CreateDistributionPayload, UpdateDistributionPayload, ListQuery<Distribution>, void> {
5
6
  constructor(client: ApiClient);
7
+ /**
8
+ * Deletes a distribution. Resolves with no body, also for an unknown id (200).
9
+ * @permissions distribution.view OR distribution.destroy
10
+ */
11
+ deleteById(id: string, headers?: Record<string, string>): Promise<void>;
6
12
  }
7
13
  //# sourceMappingURL=DistributionApi.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DistributionApi.d.ts","sourceRoot":"","sources":["../../../src/apis/distribution/DistributionApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAEjG,qBAAa,eAAgB,SAAQ,WAAW,CAC9C,YAAY,EACZ,yBAAyB,EACzB,yBAAyB,CAC1B;gBACa,MAAM,EAAE,SAAS;CAG9B"}
1
+ {"version":3,"file":"DistributionApi.d.ts","sourceRoot":"","sources":["../../../src/apis/distribution/DistributionApi.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,YAAY,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAEjG,qBAAa,eAAgB,SAAQ,WAAW,CAC9C,YAAY,EACZ,yBAAyB,EACzB,yBAAyB,EACzB,SAAS,CAAC,YAAY,CAAC,EACvB,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 DistributionApi = class extends BaseCrudApi {
5
5
  constructor(client) {
6
6
  super(client, "/distribution");
7
7
  }
8
+ /**
9
+ * Deletes a distribution. Resolves with no body, also for an unknown id (200).
10
+ * @permissions distribution.view OR distribution.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":"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 { Distribution, CreateDistributionPayload, UpdateDistributionPayload } from './types'\n\nexport class DistributionApi extends BaseCrudApi<\n Distribution,\n CreateDistributionPayload,\n UpdateDistributionPayload,\n ListQuery<Distribution>,\n void\n> {\n constructor(client: ApiClient) {\n super(client, '/distribution')\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":";;;AAKA,IAAa,kBAAb,cAAqC,YAMnC;CACA,YAAY,QAAmB;AAC7B,QAAM,QAAQ,gBAAgB;;;;;;CAOhC,AAAS,WAAW,IAAY,SAAiD;AAC/E,SAAO,MAAM,WAAW,IAAI,QAAQ"}
@@ -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,SAAQ,WAAW,CACvC,IAAI,EACJ,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,CAAC,IAAI,CAAC,EACf,gBAAgB,CACjB;gBACa,MAAM,EAAE,SAAS;IAI7B,wFAAwF;IAC/E,OAAO,CACd,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,GAAG;QAAE,QAAQ,EAAE,KAAK,CAAA;KAAE,EAC5C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAAC,IAAI,EAAE,CAAC;IAClB,wFAAwF;IAC/E,OAAO,CACd,KAAK,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,GAAG;QAAE,QAAQ,CAAC,EAAE,IAAI,CAAA;KAAE,EAC7C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC3B,wFAAwF;IAC/E,OAAO,CACd,KAAK,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,EACvB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC;IAQpC,wFAAwF;IAC/E,MAAM,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAIhG,4FAA4F;IACnF,OAAO,CACd,EAAE,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,YAAY,CAAC,IAAI,CAAC,EAC1B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC/B,OAAO,CAAC,IAAI,CAAC;IAIhB,4FAA4F;IACnF,UAAU,CACjB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,iBAAiB,EACvB,OAAO,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,GAChB,QAAQ,GACR,iBAAiB,GACjB,WAAW,GACX,MAAM,CAAA;AAEV,MAAM,MAAM,IAAI,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,OAAO,CAAA;IACpB,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;IACjB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,OAAO,EAAE,WAAW,CAAA;IACpB,IAAI,EAAE,QAAQ,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,QAAQ,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC7B,CAAA"}
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,GAChB,QAAQ,GACR,iBAAiB,GACjB,WAAW,GACX,MAAM,CAAA;AAEV,MAAM,MAAM,IAAI,GAAG;IACjB,EAAE,EAAE,MAAM,CAAA;IACV,0CAA0C;IAC1C,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,4DAA4D;IAC5D,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,QAAQ,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,sEAAsE;IACtE,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,sEAAsE;IACtE,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,sEAAsE;IACtE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,sEAAsE;IACtE,OAAO,CAAC,EAAE,WAAW,CAAA;IACrB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,QAAQ,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC7B,CAAA;AAED,yCAAyC;AACzC,MAAM,MAAM,qBAAqB,GAAG;IAClC,gFAAgF;IAChF,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,6GAA6G;IAC7G,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,sDAAsD;IACtD,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,sEAAsE;IACtE,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,2CAA2C;AAC3C,MAAM,MAAM,oBAAoB,GAAG;IACjC,kGAAkG;IAClG,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,uCAAuC;AACvC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA"}
@@ -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