@voyant-travel/distribution-react 0.109.8

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 (312) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +82 -0
  3. package/dist/admin/index.d.ts +30 -0
  4. package/dist/admin/index.d.ts.map +1 -0
  5. package/dist/admin/index.js +65 -0
  6. package/dist/client.d.ts +14 -0
  7. package/dist/client.d.ts.map +1 -0
  8. package/dist/client.js +59 -0
  9. package/dist/components/booking-link-detail-page.d.ts +10 -0
  10. package/dist/components/booking-link-detail-page.d.ts.map +1 -0
  11. package/dist/components/booking-link-detail-page.js +51 -0
  12. package/dist/components/channel-detail-page.d.ts +12 -0
  13. package/dist/components/channel-detail-page.d.ts.map +1 -0
  14. package/dist/components/channel-detail-page.js +41 -0
  15. package/dist/components/channel-sync-controls.d.ts +15 -0
  16. package/dist/components/channel-sync-controls.d.ts.map +1 -0
  17. package/dist/components/channel-sync-controls.js +29 -0
  18. package/dist/components/channel-sync-deliveries-drawer.d.ts +12 -0
  19. package/dist/components/channel-sync-deliveries-drawer.d.ts.map +1 -0
  20. package/dist/components/channel-sync-deliveries-drawer.js +18 -0
  21. package/dist/components/channel-sync-page-utils.d.ts +99 -0
  22. package/dist/components/channel-sync-page-utils.d.ts.map +1 -0
  23. package/dist/components/channel-sync-page-utils.js +85 -0
  24. package/dist/components/channel-sync-page.d.ts +4 -0
  25. package/dist/components/channel-sync-page.d.ts.map +1 -0
  26. package/dist/components/channel-sync-page.js +141 -0
  27. package/dist/components/channels-page.d.ts +6 -0
  28. package/dist/components/channels-page.d.ts.map +1 -0
  29. package/dist/components/channels-page.js +132 -0
  30. package/dist/components/commission-rule-detail-page.d.ts +10 -0
  31. package/dist/components/commission-rule-detail-page.d.ts.map +1 -0
  32. package/dist/components/commission-rule-detail-page.js +57 -0
  33. package/dist/components/contract-detail-page.d.ts +10 -0
  34. package/dist/components/contract-detail-page.d.ts.map +1 -0
  35. package/dist/components/contract-detail-page.js +64 -0
  36. package/dist/components/distribution-overview.d.ts +19 -0
  37. package/dist/components/distribution-overview.d.ts.map +1 -0
  38. package/dist/components/distribution-overview.js +13 -0
  39. package/dist/components/distribution-page.d.ts +26 -0
  40. package/dist/components/distribution-page.d.ts.map +1 -0
  41. package/dist/components/distribution-page.js +190 -0
  42. package/dist/components/distribution-section-header.d.ts +7 -0
  43. package/dist/components/distribution-section-header.d.ts.map +1 -0
  44. package/dist/components/distribution-section-header.js +6 -0
  45. package/dist/components/distribution-shared.d.ts +32 -0
  46. package/dist/components/distribution-shared.d.ts.map +1 -0
  47. package/dist/components/distribution-shared.js +246 -0
  48. package/dist/components/distribution-tabs-primary.d.ts +57 -0
  49. package/dist/components/distribution-tabs-primary.d.ts.map +1 -0
  50. package/dist/components/distribution-tabs-primary.js +89 -0
  51. package/dist/components/distribution-tabs-secondary.d.ts +58 -0
  52. package/dist/components/distribution-tabs-secondary.d.ts.map +1 -0
  53. package/dist/components/distribution-tabs-secondary.js +89 -0
  54. package/dist/components/mapping-detail-page.d.ts +10 -0
  55. package/dist/components/mapping-detail-page.d.ts.map +1 -0
  56. package/dist/components/mapping-detail-page.js +51 -0
  57. package/dist/components/webhook-event-detail-page.d.ts +9 -0
  58. package/dist/components/webhook-event-detail-page.d.ts.map +1 -0
  59. package/dist/components/webhook-event-detail-page.js +46 -0
  60. package/dist/constants.d.ts +103 -0
  61. package/dist/constants.d.ts.map +1 -0
  62. package/dist/constants.js +48 -0
  63. package/dist/external-refs/client.d.ts +14 -0
  64. package/dist/external-refs/client.d.ts.map +1 -0
  65. package/dist/external-refs/client.js +58 -0
  66. package/dist/external-refs/components/entity-ref-picker.d.ts +21 -0
  67. package/dist/external-refs/components/entity-ref-picker.d.ts.map +1 -0
  68. package/dist/external-refs/components/entity-ref-picker.js +38 -0
  69. package/dist/external-refs/components/external-ref-dialog.d.ts +11 -0
  70. package/dist/external-refs/components/external-ref-dialog.d.ts.map +1 -0
  71. package/dist/external-refs/components/external-ref-dialog.js +120 -0
  72. package/dist/external-refs/components/external-refs-page.d.ts +16 -0
  73. package/dist/external-refs/components/external-refs-page.d.ts.map +1 -0
  74. package/dist/external-refs/components/external-refs-page.js +109 -0
  75. package/dist/external-refs/hooks/index.d.ts +3 -0
  76. package/dist/external-refs/hooks/index.d.ts.map +1 -0
  77. package/dist/external-refs/hooks/index.js +2 -0
  78. package/dist/external-refs/hooks/use-external-ref-mutation.d.ts +57 -0
  79. package/dist/external-refs/hooks/use-external-ref-mutation.d.ts.map +1 -0
  80. package/dist/external-refs/hooks/use-external-ref-mutation.js +40 -0
  81. package/dist/external-refs/hooks/use-external-refs.d.ts +26 -0
  82. package/dist/external-refs/hooks/use-external-refs.d.ts.map +1 -0
  83. package/dist/external-refs/hooks/use-external-refs.js +12 -0
  84. package/dist/external-refs/i18n/en.d.ts +3 -0
  85. package/dist/external-refs/i18n/en.d.ts.map +1 -0
  86. package/dist/external-refs/i18n/en.js +92 -0
  87. package/dist/external-refs/i18n/index.d.ts +5 -0
  88. package/dist/external-refs/i18n/index.d.ts.map +1 -0
  89. package/dist/external-refs/i18n/index.js +3 -0
  90. package/dist/external-refs/i18n/messages.d.ts +85 -0
  91. package/dist/external-refs/i18n/messages.d.ts.map +1 -0
  92. package/dist/external-refs/i18n/messages.js +1 -0
  93. package/dist/external-refs/i18n/provider.d.ts +26 -0
  94. package/dist/external-refs/i18n/provider.d.ts.map +1 -0
  95. package/dist/external-refs/i18n/provider.js +44 -0
  96. package/dist/external-refs/i18n/ro.d.ts +3 -0
  97. package/dist/external-refs/i18n/ro.d.ts.map +1 -0
  98. package/dist/external-refs/i18n/ro.js +92 -0
  99. package/dist/external-refs/index.d.ts +7 -0
  100. package/dist/external-refs/index.d.ts.map +1 -0
  101. package/dist/external-refs/index.js +6 -0
  102. package/dist/external-refs/provider.d.ts +2 -0
  103. package/dist/external-refs/provider.d.ts.map +1 -0
  104. package/dist/external-refs/provider.js +1 -0
  105. package/dist/external-refs/query-keys.d.ts +18 -0
  106. package/dist/external-refs/query-keys.d.ts.map +1 -0
  107. package/dist/external-refs/query-keys.js +6 -0
  108. package/dist/external-refs/query-options.d.ts +159 -0
  109. package/dist/external-refs/query-options.d.ts.map +1 -0
  110. package/dist/external-refs/query-options.js +31 -0
  111. package/dist/external-refs/schemas.d.ts +82 -0
  112. package/dist/external-refs/schemas.d.ts.map +1 -0
  113. package/dist/external-refs/schemas.js +20 -0
  114. package/dist/external-refs/ui.d.ts +5 -0
  115. package/dist/external-refs/ui.d.ts.map +1 -0
  116. package/dist/external-refs/ui.js +4 -0
  117. package/dist/hooks/index.d.ts +12 -0
  118. package/dist/hooks/index.d.ts.map +1 -0
  119. package/dist/hooks/index.js +12 -0
  120. package/dist/hooks/use-booking-links.d.ts +20 -0
  121. package/dist/hooks/use-booking-links.d.ts.map +1 -0
  122. package/dist/hooks/use-booking-links.js +9 -0
  123. package/dist/hooks/use-bookings.d.ts +14 -0
  124. package/dist/hooks/use-bookings.d.ts.map +1 -0
  125. package/dist/hooks/use-bookings.js +9 -0
  126. package/dist/hooks/use-channel-mutation.d.ts +69 -0
  127. package/dist/hooks/use-channel-mutation.d.ts.map +1 -0
  128. package/dist/hooks/use-channel-mutation.js +49 -0
  129. package/dist/hooks/use-channel.d.ts +16 -0
  130. package/dist/hooks/use-channel.d.ts.map +1 -0
  131. package/dist/hooks/use-channel.js +13 -0
  132. package/dist/hooks/use-channels.d.ts +20 -0
  133. package/dist/hooks/use-channels.d.ts.map +1 -0
  134. package/dist/hooks/use-channels.js +9 -0
  135. package/dist/hooks/use-commission-rules.d.ts +23 -0
  136. package/dist/hooks/use-commission-rules.d.ts.map +1 -0
  137. package/dist/hooks/use-commission-rules.js +9 -0
  138. package/dist/hooks/use-contracts.d.ts +22 -0
  139. package/dist/hooks/use-contracts.d.ts.map +1 -0
  140. package/dist/hooks/use-contracts.js +9 -0
  141. package/dist/hooks/use-mappings.d.ts +19 -0
  142. package/dist/hooks/use-mappings.d.ts.map +1 -0
  143. package/dist/hooks/use-mappings.js +9 -0
  144. package/dist/hooks/use-products.d.ts +14 -0
  145. package/dist/hooks/use-products.d.ts.map +1 -0
  146. package/dist/hooks/use-products.js +9 -0
  147. package/dist/hooks/use-suppliers.d.ts +14 -0
  148. package/dist/hooks/use-suppliers.d.ts.map +1 -0
  149. package/dist/hooks/use-suppliers.js +9 -0
  150. package/dist/hooks/use-webhook-events.d.ts +21 -0
  151. package/dist/hooks/use-webhook-events.d.ts.map +1 -0
  152. package/dist/hooks/use-webhook-events.js +9 -0
  153. package/dist/i18n/en.d.ts +592 -0
  154. package/dist/i18n/en.d.ts.map +1 -0
  155. package/dist/i18n/en.js +561 -0
  156. package/dist/i18n/index.d.ts +5 -0
  157. package/dist/i18n/index.d.ts.map +1 -0
  158. package/dist/i18n/index.js +3 -0
  159. package/dist/i18n/messages.d.ts +409 -0
  160. package/dist/i18n/messages.d.ts.map +1 -0
  161. package/dist/i18n/messages.js +1 -0
  162. package/dist/i18n/provider.d.ts +1207 -0
  163. package/dist/i18n/provider.d.ts.map +1 -0
  164. package/dist/i18n/provider.js +44 -0
  165. package/dist/i18n/ro.d.ts +592 -0
  166. package/dist/i18n/ro.d.ts.map +1 -0
  167. package/dist/i18n/ro.js +561 -0
  168. package/dist/i18n/utils.d.ts +4 -0
  169. package/dist/i18n/utils.d.ts.map +1 -0
  170. package/dist/i18n/utils.js +8 -0
  171. package/dist/index.d.ts +9 -0
  172. package/dist/index.d.ts.map +1 -0
  173. package/dist/index.js +8 -0
  174. package/dist/provider.d.ts +2 -0
  175. package/dist/provider.d.ts.map +1 -0
  176. package/dist/provider.js +1 -0
  177. package/dist/query-keys.d.ts +61 -0
  178. package/dist/query-keys.d.ts.map +1 -0
  179. package/dist/query-keys.js +30 -0
  180. package/dist/query-options.d.ts +999 -0
  181. package/dist/query-options.d.ts.map +1 -0
  182. package/dist/query-options.js +219 -0
  183. package/dist/schemas.d.ts +615 -0
  184. package/dist/schemas.d.ts.map +1 -0
  185. package/dist/schemas.js +144 -0
  186. package/dist/suppliers/admin/index.d.ts +69 -0
  187. package/dist/suppliers/admin/index.d.ts.map +1 -0
  188. package/dist/suppliers/admin/index.js +111 -0
  189. package/dist/suppliers/admin/pages/supplier-detail-page.d.ts +9 -0
  190. package/dist/suppliers/admin/pages/supplier-detail-page.d.ts.map +1 -0
  191. package/dist/suppliers/admin/pages/supplier-detail-page.js +11 -0
  192. package/dist/suppliers/admin/slots.d.ts +19 -0
  193. package/dist/suppliers/admin/slots.d.ts.map +1 -0
  194. package/dist/suppliers/admin/slots.js +18 -0
  195. package/dist/suppliers/admin/supplier-detail-host.d.ts +30 -0
  196. package/dist/suppliers/admin/supplier-detail-host.d.ts.map +1 -0
  197. package/dist/suppliers/admin/supplier-detail-host.js +34 -0
  198. package/dist/suppliers/admin/supplier-detail-skeleton.d.ts +9 -0
  199. package/dist/suppliers/admin/supplier-detail-skeleton.d.ts.map +1 -0
  200. package/dist/suppliers/admin/supplier-detail-skeleton.js +20 -0
  201. package/dist/suppliers/admin/suppliers-host.d.ts +11 -0
  202. package/dist/suppliers/admin/suppliers-host.d.ts.map +1 -0
  203. package/dist/suppliers/admin/suppliers-host.js +17 -0
  204. package/dist/suppliers/admin/suppliers-list-skeleton.d.ts +9 -0
  205. package/dist/suppliers/admin/suppliers-list-skeleton.d.ts.map +1 -0
  206. package/dist/suppliers/admin/suppliers-list-skeleton.js +24 -0
  207. package/dist/suppliers/client.d.ts +14 -0
  208. package/dist/suppliers/client.d.ts.map +1 -0
  209. package/dist/suppliers/client.js +59 -0
  210. package/dist/suppliers/components/message-format.d.ts +2 -0
  211. package/dist/suppliers/components/message-format.d.ts.map +1 -0
  212. package/dist/suppliers/components/message-format.js +3 -0
  213. package/dist/suppliers/components/rate-dialog.d.ts +11 -0
  214. package/dist/suppliers/components/rate-dialog.d.ts.map +1 -0
  215. package/dist/suppliers/components/rate-dialog.js +93 -0
  216. package/dist/suppliers/components/service-dialog.d.ts +10 -0
  217. package/dist/suppliers/components/service-dialog.d.ts.map +1 -0
  218. package/dist/suppliers/components/service-dialog.js +69 -0
  219. package/dist/suppliers/components/supplier-combobox.d.ts +13 -0
  220. package/dist/suppliers/components/supplier-combobox.d.ts.map +1 -0
  221. package/dist/suppliers/components/supplier-combobox.js +23 -0
  222. package/dist/suppliers/components/supplier-detail-page.d.ts +17 -0
  223. package/dist/suppliers/components/supplier-detail-page.d.ts.map +1 -0
  224. package/dist/suppliers/components/supplier-detail-page.js +105 -0
  225. package/dist/suppliers/components/supplier-dialog.d.ts +9 -0
  226. package/dist/suppliers/components/supplier-dialog.d.ts.map +1 -0
  227. package/dist/suppliers/components/supplier-dialog.js +118 -0
  228. package/dist/suppliers/components/supplier-service-row.d.ts +22 -0
  229. package/dist/suppliers/components/supplier-service-row.d.ts.map +1 -0
  230. package/dist/suppliers/components/supplier-service-row.js +18 -0
  231. package/dist/suppliers/components/suppliers-page.d.ts +10 -0
  232. package/dist/suppliers/components/suppliers-page.d.ts.map +1 -0
  233. package/dist/suppliers/components/suppliers-page.js +94 -0
  234. package/dist/suppliers/constants.d.ts +69 -0
  235. package/dist/suppliers/constants.d.ts.map +1 -0
  236. package/dist/suppliers/constants.js +34 -0
  237. package/dist/suppliers/hooks/index.d.ts +10 -0
  238. package/dist/suppliers/hooks/index.d.ts.map +1 -0
  239. package/dist/suppliers/hooks/index.js +10 -0
  240. package/dist/suppliers/hooks/use-supplier-mutation.d.ts +95 -0
  241. package/dist/suppliers/hooks/use-supplier-mutation.d.ts.map +1 -0
  242. package/dist/suppliers/hooks/use-supplier-mutation.js +41 -0
  243. package/dist/suppliers/hooks/use-supplier-note-mutation.d.ts +13 -0
  244. package/dist/suppliers/hooks/use-supplier-note-mutation.d.ts.map +1 -0
  245. package/dist/suppliers/hooks/use-supplier-note-mutation.js +20 -0
  246. package/dist/suppliers/hooks/use-supplier-notes.d.ts +13 -0
  247. package/dist/suppliers/hooks/use-supplier-notes.d.ts.map +1 -0
  248. package/dist/suppliers/hooks/use-supplier-notes.js +12 -0
  249. package/dist/suppliers/hooks/use-supplier-rate-mutation.d.ts +56 -0
  250. package/dist/suppliers/hooks/use-supplier-rate-mutation.d.ts.map +1 -0
  251. package/dist/suppliers/hooks/use-supplier-rate-mutation.js +41 -0
  252. package/dist/suppliers/hooks/use-supplier-service-mutation.d.ts +45 -0
  253. package/dist/suppliers/hooks/use-supplier-service-mutation.d.ts.map +1 -0
  254. package/dist/suppliers/hooks/use-supplier-service-mutation.js +44 -0
  255. package/dist/suppliers/hooks/use-supplier-service-rates.d.ts +20 -0
  256. package/dist/suppliers/hooks/use-supplier-service-rates.d.ts.map +1 -0
  257. package/dist/suppliers/hooks/use-supplier-service-rates.js +12 -0
  258. package/dist/suppliers/hooks/use-supplier-services.d.ts +19 -0
  259. package/dist/suppliers/hooks/use-supplier-services.d.ts.map +1 -0
  260. package/dist/suppliers/hooks/use-supplier-services.js +12 -0
  261. package/dist/suppliers/hooks/use-supplier.d.ts +38 -0
  262. package/dist/suppliers/hooks/use-supplier.d.ts.map +1 -0
  263. package/dist/suppliers/hooks/use-supplier.js +9 -0
  264. package/dist/suppliers/hooks/use-suppliers.d.ts +42 -0
  265. package/dist/suppliers/hooks/use-suppliers.d.ts.map +1 -0
  266. package/dist/suppliers/hooks/use-suppliers.js +9 -0
  267. package/dist/suppliers/i18n/en.d.ts +204 -0
  268. package/dist/suppliers/i18n/en.d.ts.map +1 -0
  269. package/dist/suppliers/i18n/en.js +203 -0
  270. package/dist/suppliers/i18n/index.d.ts +5 -0
  271. package/dist/suppliers/i18n/index.d.ts.map +1 -0
  272. package/dist/suppliers/i18n/index.js +3 -0
  273. package/dist/suppliers/i18n/messages.d.ts +187 -0
  274. package/dist/suppliers/i18n/messages.d.ts.map +1 -0
  275. package/dist/suppliers/i18n/messages.js +1 -0
  276. package/dist/suppliers/i18n/provider.d.ts +430 -0
  277. package/dist/suppliers/i18n/provider.d.ts.map +1 -0
  278. package/dist/suppliers/i18n/provider.js +44 -0
  279. package/dist/suppliers/i18n/ro.d.ts +204 -0
  280. package/dist/suppliers/i18n/ro.d.ts.map +1 -0
  281. package/dist/suppliers/i18n/ro.js +203 -0
  282. package/dist/suppliers/index.d.ts +9 -0
  283. package/dist/suppliers/index.d.ts.map +1 -0
  284. package/dist/suppliers/index.js +8 -0
  285. package/dist/suppliers/provider.d.ts +2 -0
  286. package/dist/suppliers/provider.d.ts.map +1 -0
  287. package/dist/suppliers/provider.js +1 -0
  288. package/dist/suppliers/query-keys.d.ts +29 -0
  289. package/dist/suppliers/query-keys.d.ts.map +1 -0
  290. package/dist/suppliers/query-keys.js +12 -0
  291. package/dist/suppliers/query-options.d.ts +467 -0
  292. package/dist/suppliers/query-options.d.ts.map +1 -0
  293. package/dist/suppliers/query-options.js +63 -0
  294. package/dist/suppliers/schemas.d.ts +363 -0
  295. package/dist/suppliers/schemas.d.ts.map +1 -0
  296. package/dist/suppliers/schemas.js +109 -0
  297. package/dist/suppliers/ui.d.ts +9 -0
  298. package/dist/suppliers/ui.d.ts.map +1 -0
  299. package/dist/suppliers/ui.js +8 -0
  300. package/dist/suppliers/utils.d.ts +4 -0
  301. package/dist/suppliers/utils.d.ts.map +1 -0
  302. package/dist/suppliers/utils.js +10 -0
  303. package/dist/ui.d.ts +16 -0
  304. package/dist/ui.d.ts.map +1 -0
  305. package/dist/ui.js +14 -0
  306. package/dist/utils.d.ts +10 -0
  307. package/dist/utils.d.ts.map +1 -0
  308. package/dist/utils.js +44 -0
  309. package/package.json +263 -0
  310. package/src/external-refs/styles.css +11 -0
  311. package/src/styles.css +11 -0
  312. package/src/suppliers/styles.css +11 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-options.d.ts","sourceRoot":"","sources":["../src/query-options.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,0BAA0B,EAAuB,MAAM,aAAa,CAAA;AAClF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,y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C,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa9B;AAED,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,0BAA0B,EAClC,OAAO,GAAE,sBAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBrC;AAED,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,0BAA0B,EAClC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa9B;AAED,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,0BAA0B,EAClC,OAAO,GAAE,uBAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBtC;AAED,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,0BAA0B,EAClC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa9B"}
@@ -0,0 +1,219 @@
1
+ "use client";
2
+ import { queryOptions } from "@tanstack/react-query";
3
+ import { fetchWithValidation } from "./client.js";
4
+ import { distributionQueryKeys } from "./query-keys.js";
5
+ import { bookingListResponse, bookingSingleResponse, channelBookingLinkListResponse, channelBookingLinkSingleResponse, channelCommissionRuleListResponse, channelCommissionRuleSingleResponse, channelContractListResponse, channelContractSingleResponse, channelListResponse, channelProductMappingListResponse, channelProductMappingSingleResponse, channelSingleResponse, channelWebhookEventListResponse, channelWebhookEventSingleResponse, productListResponse, productSingleResponse, supplierListResponse, supplierSingleResponse, } from "./schemas.js";
6
+ function appendPagination(params, filters) {
7
+ if (filters.limit !== undefined)
8
+ params.set("limit", String(filters.limit));
9
+ if (filters.offset !== undefined)
10
+ params.set("offset", String(filters.offset));
11
+ }
12
+ export function getSuppliersQueryOptions(client, options = {}) {
13
+ const { enabled: _enabled = true, ...filters } = options;
14
+ return queryOptions({
15
+ queryKey: distributionQueryKeys.suppliersList(filters),
16
+ queryFn: () => {
17
+ const params = new URLSearchParams();
18
+ appendPagination(params, filters);
19
+ const qs = params.toString();
20
+ return fetchWithValidation(`/v1/suppliers${qs ? `?${qs}` : ""}`, supplierListResponse, client);
21
+ },
22
+ });
23
+ }
24
+ export function getSupplierQueryOptions(client, id) {
25
+ return queryOptions({
26
+ queryKey: distributionQueryKeys.supplier(id ?? ""),
27
+ queryFn: async () => {
28
+ if (!id)
29
+ throw new Error("getSupplierQueryOptions requires an id");
30
+ return fetchWithValidation(`/v1/suppliers/${id}`, supplierSingleResponse, client);
31
+ },
32
+ });
33
+ }
34
+ export function getProductsQueryOptions(client, options = {}) {
35
+ const { enabled: _enabled = true, ...filters } = options;
36
+ return queryOptions({
37
+ queryKey: distributionQueryKeys.productsList(filters),
38
+ queryFn: () => {
39
+ const params = new URLSearchParams();
40
+ appendPagination(params, filters);
41
+ const qs = params.toString();
42
+ return fetchWithValidation(`/v1/products${qs ? `?${qs}` : ""}`, productListResponse, client);
43
+ },
44
+ });
45
+ }
46
+ export function getProductQueryOptions(client, id) {
47
+ return queryOptions({
48
+ queryKey: distributionQueryKeys.product(id ?? ""),
49
+ queryFn: async () => {
50
+ if (!id)
51
+ throw new Error("getProductQueryOptions requires an id");
52
+ return fetchWithValidation(`/v1/products/${id}`, productSingleResponse, client);
53
+ },
54
+ });
55
+ }
56
+ export function getBookingsQueryOptions(client, options = {}) {
57
+ const { enabled: _enabled = true, ...filters } = options;
58
+ return queryOptions({
59
+ queryKey: distributionQueryKeys.bookingsList(filters),
60
+ queryFn: () => {
61
+ const params = new URLSearchParams();
62
+ appendPagination(params, filters);
63
+ const qs = params.toString();
64
+ return fetchWithValidation(`/v1/bookings${qs ? `?${qs}` : ""}`, bookingListResponse, client);
65
+ },
66
+ });
67
+ }
68
+ export function getBookingQueryOptions(client, id) {
69
+ return queryOptions({
70
+ queryKey: distributionQueryKeys.booking(id ?? ""),
71
+ queryFn: async () => {
72
+ if (!id)
73
+ throw new Error("getBookingQueryOptions requires an id");
74
+ return fetchWithValidation(`/v1/bookings/${id}`, bookingSingleResponse, client);
75
+ },
76
+ });
77
+ }
78
+ export function getChannelsQueryOptions(client, options = {}) {
79
+ const { enabled: _enabled = true, ...filters } = options;
80
+ return queryOptions({
81
+ queryKey: distributionQueryKeys.channelsList(filters),
82
+ queryFn: () => {
83
+ const params = new URLSearchParams();
84
+ appendPagination(params, filters);
85
+ const qs = params.toString();
86
+ return fetchWithValidation(`/v1/distribution/channels${qs ? `?${qs}` : ""}`, channelListResponse, client);
87
+ },
88
+ });
89
+ }
90
+ export function getChannelQueryOptions(client, id) {
91
+ return queryOptions({
92
+ queryKey: distributionQueryKeys.channel(id ?? ""),
93
+ queryFn: async () => {
94
+ if (!id)
95
+ throw new Error("getChannelQueryOptions requires an id");
96
+ return fetchWithValidation(`/v1/distribution/channels/${id}`, channelSingleResponse, client);
97
+ },
98
+ });
99
+ }
100
+ export function getContractsQueryOptions(client, options = {}) {
101
+ const { enabled: _enabled = true, ...filters } = options;
102
+ return queryOptions({
103
+ queryKey: distributionQueryKeys.contractsList(filters),
104
+ queryFn: () => {
105
+ const params = new URLSearchParams();
106
+ if ("channelId" in filters && filters.channelId)
107
+ params.set("channelId", filters.channelId);
108
+ appendPagination(params, filters);
109
+ const qs = params.toString();
110
+ return fetchWithValidation(`/v1/distribution/contracts${qs ? `?${qs}` : ""}`, channelContractListResponse, client);
111
+ },
112
+ });
113
+ }
114
+ export function getContractQueryOptions(client, id) {
115
+ return queryOptions({
116
+ queryKey: distributionQueryKeys.contract(id ?? ""),
117
+ queryFn: async () => {
118
+ if (!id)
119
+ throw new Error("getContractQueryOptions requires an id");
120
+ return fetchWithValidation(`/v1/distribution/contracts/${id}`, channelContractSingleResponse, client);
121
+ },
122
+ });
123
+ }
124
+ export function getCommissionRulesQueryOptions(client, options = {}) {
125
+ const { enabled: _enabled = true, ...filters } = options;
126
+ return queryOptions({
127
+ queryKey: distributionQueryKeys.commissionRulesList(filters),
128
+ queryFn: () => {
129
+ const params = new URLSearchParams();
130
+ if (filters.contractId)
131
+ params.set("contractId", filters.contractId);
132
+ appendPagination(params, filters);
133
+ const qs = params.toString();
134
+ return fetchWithValidation(`/v1/distribution/commission-rules${qs ? `?${qs}` : ""}`, channelCommissionRuleListResponse, client);
135
+ },
136
+ });
137
+ }
138
+ export function getCommissionRuleQueryOptions(client, id) {
139
+ return queryOptions({
140
+ queryKey: distributionQueryKeys.commissionRule(id ?? ""),
141
+ queryFn: async () => {
142
+ if (!id)
143
+ throw new Error("getCommissionRuleQueryOptions requires an id");
144
+ return fetchWithValidation(`/v1/distribution/commission-rules/${id}`, channelCommissionRuleSingleResponse, client);
145
+ },
146
+ });
147
+ }
148
+ export function getMappingsQueryOptions(client, options = {}) {
149
+ const { enabled: _enabled = true, ...filters } = options;
150
+ return queryOptions({
151
+ queryKey: distributionQueryKeys.mappingsList(filters),
152
+ queryFn: () => {
153
+ const params = new URLSearchParams();
154
+ if (filters.channelId)
155
+ params.set("channelId", filters.channelId);
156
+ appendPagination(params, filters);
157
+ const qs = params.toString();
158
+ return fetchWithValidation(`/v1/distribution/product-mappings${qs ? `?${qs}` : ""}`, channelProductMappingListResponse, client);
159
+ },
160
+ });
161
+ }
162
+ export function getMappingQueryOptions(client, id) {
163
+ return queryOptions({
164
+ queryKey: distributionQueryKeys.mapping(id ?? ""),
165
+ queryFn: async () => {
166
+ if (!id)
167
+ throw new Error("getMappingQueryOptions requires an id");
168
+ return fetchWithValidation(`/v1/distribution/product-mappings/${id}`, channelProductMappingSingleResponse, client);
169
+ },
170
+ });
171
+ }
172
+ export function getBookingLinksQueryOptions(client, options = {}) {
173
+ const { enabled: _enabled = true, ...filters } = options;
174
+ return queryOptions({
175
+ queryKey: distributionQueryKeys.bookingLinksList(filters),
176
+ queryFn: () => {
177
+ const params = new URLSearchParams();
178
+ if (filters.channelId)
179
+ params.set("channelId", filters.channelId);
180
+ appendPagination(params, filters);
181
+ const qs = params.toString();
182
+ return fetchWithValidation(`/v1/distribution/booking-links${qs ? `?${qs}` : ""}`, channelBookingLinkListResponse, client);
183
+ },
184
+ });
185
+ }
186
+ export function getBookingLinkQueryOptions(client, id) {
187
+ return queryOptions({
188
+ queryKey: distributionQueryKeys.bookingLink(id ?? ""),
189
+ queryFn: async () => {
190
+ if (!id)
191
+ throw new Error("getBookingLinkQueryOptions requires an id");
192
+ return fetchWithValidation(`/v1/distribution/booking-links/${id}`, channelBookingLinkSingleResponse, client);
193
+ },
194
+ });
195
+ }
196
+ export function getWebhookEventsQueryOptions(client, options = {}) {
197
+ const { enabled: _enabled = true, ...filters } = options;
198
+ return queryOptions({
199
+ queryKey: distributionQueryKeys.webhookEventsList(filters),
200
+ queryFn: () => {
201
+ const params = new URLSearchParams();
202
+ if (filters.channelId)
203
+ params.set("channelId", filters.channelId);
204
+ appendPagination(params, filters);
205
+ const qs = params.toString();
206
+ return fetchWithValidation(`/v1/distribution/webhook-events${qs ? `?${qs}` : ""}`, channelWebhookEventListResponse, client);
207
+ },
208
+ });
209
+ }
210
+ export function getWebhookEventQueryOptions(client, id) {
211
+ return queryOptions({
212
+ queryKey: distributionQueryKeys.webhookEvent(id ?? ""),
213
+ queryFn: async () => {
214
+ if (!id)
215
+ throw new Error("getWebhookEventQueryOptions requires an id");
216
+ return fetchWithValidation(`/v1/distribution/webhook-events/${id}`, channelWebhookEventSingleResponse, client);
217
+ },
218
+ });
219
+ }