@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,467 @@
1
+ import { type FetchWithValidationOptions } from "./client.js";
2
+ import type { UseSuppliersOptions } from "./hooks/use-suppliers.js";
3
+ export declare function getSuppliersQueryOptions(client: FetchWithValidationOptions, options?: UseSuppliersOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
4
+ data: {
5
+ id: string;
6
+ name: string;
7
+ type: "other" | "guide" | "hotel" | "transfer" | "experience" | "airline" | "restaurant";
8
+ status: "active" | "inactive" | "pending";
9
+ description: string | null;
10
+ email: string | null;
11
+ phone: string | null;
12
+ website: string | null;
13
+ address: string | null;
14
+ city: string | null;
15
+ country: string | null;
16
+ defaultCurrency: string | null;
17
+ contactName: string | null;
18
+ contactEmail: string | null;
19
+ contactPhone: string | null;
20
+ tags: string[];
21
+ createdAt: string;
22
+ updatedAt: string;
23
+ paymentTermsDays?: number | null | undefined;
24
+ reservationTimeoutMinutes?: number | null | undefined;
25
+ customerPaymentPolicy?: {
26
+ deposit: {
27
+ kind: "none" | "percent" | "fixed_cents";
28
+ percent?: number | undefined;
29
+ amountCents?: number | undefined;
30
+ };
31
+ minDaysBeforeDepartureForDeposit: number;
32
+ balanceDueDaysBeforeDeparture: number;
33
+ balanceDueMinDaysFromNow: number;
34
+ } | null | undefined;
35
+ }[];
36
+ total: number;
37
+ limit: number;
38
+ offset: number;
39
+ }, Error, {
40
+ data: {
41
+ id: string;
42
+ name: string;
43
+ type: "other" | "guide" | "hotel" | "transfer" | "experience" | "airline" | "restaurant";
44
+ status: "active" | "inactive" | "pending";
45
+ description: string | null;
46
+ email: string | null;
47
+ phone: string | null;
48
+ website: string | null;
49
+ address: string | null;
50
+ city: string | null;
51
+ country: string | null;
52
+ defaultCurrency: string | null;
53
+ contactName: string | null;
54
+ contactEmail: string | null;
55
+ contactPhone: string | null;
56
+ tags: string[];
57
+ createdAt: string;
58
+ updatedAt: string;
59
+ paymentTermsDays?: number | null | undefined;
60
+ reservationTimeoutMinutes?: number | null | undefined;
61
+ customerPaymentPolicy?: {
62
+ deposit: {
63
+ kind: "none" | "percent" | "fixed_cents";
64
+ percent?: number | undefined;
65
+ amountCents?: number | undefined;
66
+ };
67
+ minDaysBeforeDepartureForDeposit: number;
68
+ balanceDueDaysBeforeDeparture: number;
69
+ balanceDueMinDaysFromNow: number;
70
+ } | null | undefined;
71
+ }[];
72
+ total: number;
73
+ limit: number;
74
+ offset: number;
75
+ }, readonly ["voyant", "suppliers", "suppliers", "list", import("./query-keys.js").SuppliersListFilters]>, "queryFn"> & {
76
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
77
+ data: {
78
+ id: string;
79
+ name: string;
80
+ type: "other" | "guide" | "hotel" | "transfer" | "experience" | "airline" | "restaurant";
81
+ status: "active" | "inactive" | "pending";
82
+ description: string | null;
83
+ email: string | null;
84
+ phone: string | null;
85
+ website: string | null;
86
+ address: string | null;
87
+ city: string | null;
88
+ country: string | null;
89
+ defaultCurrency: string | null;
90
+ contactName: string | null;
91
+ contactEmail: string | null;
92
+ contactPhone: string | null;
93
+ tags: string[];
94
+ createdAt: string;
95
+ updatedAt: string;
96
+ paymentTermsDays?: number | null | undefined;
97
+ reservationTimeoutMinutes?: number | null | undefined;
98
+ customerPaymentPolicy?: {
99
+ deposit: {
100
+ kind: "none" | "percent" | "fixed_cents";
101
+ percent?: number | undefined;
102
+ amountCents?: number | undefined;
103
+ };
104
+ minDaysBeforeDepartureForDeposit: number;
105
+ balanceDueDaysBeforeDeparture: number;
106
+ balanceDueMinDaysFromNow: number;
107
+ } | null | undefined;
108
+ }[];
109
+ total: number;
110
+ limit: number;
111
+ offset: number;
112
+ }, readonly ["voyant", "suppliers", "suppliers", "list", import("./query-keys.js").SuppliersListFilters], never> | undefined;
113
+ } & {
114
+ queryKey: readonly ["voyant", "suppliers", "suppliers", "list", import("./query-keys.js").SuppliersListFilters] & {
115
+ [dataTagSymbol]: {
116
+ data: {
117
+ id: string;
118
+ name: string;
119
+ type: "other" | "guide" | "hotel" | "transfer" | "experience" | "airline" | "restaurant";
120
+ status: "active" | "inactive" | "pending";
121
+ description: string | null;
122
+ email: string | null;
123
+ phone: string | null;
124
+ website: string | null;
125
+ address: string | null;
126
+ city: string | null;
127
+ country: string | null;
128
+ defaultCurrency: string | null;
129
+ contactName: string | null;
130
+ contactEmail: string | null;
131
+ contactPhone: string | null;
132
+ tags: string[];
133
+ createdAt: string;
134
+ updatedAt: string;
135
+ paymentTermsDays?: number | null | undefined;
136
+ reservationTimeoutMinutes?: number | null | undefined;
137
+ customerPaymentPolicy?: {
138
+ deposit: {
139
+ kind: "none" | "percent" | "fixed_cents";
140
+ percent?: number | undefined;
141
+ amountCents?: number | undefined;
142
+ };
143
+ minDaysBeforeDepartureForDeposit: number;
144
+ balanceDueDaysBeforeDeparture: number;
145
+ balanceDueMinDaysFromNow: number;
146
+ } | null | undefined;
147
+ }[];
148
+ total: number;
149
+ limit: number;
150
+ offset: number;
151
+ };
152
+ [dataTagErrorSymbol]: Error;
153
+ };
154
+ };
155
+ export declare function getSupplierQueryOptions(client: FetchWithValidationOptions, id: string): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
156
+ data: {
157
+ id: string;
158
+ name: string;
159
+ type: "other" | "guide" | "hotel" | "transfer" | "experience" | "airline" | "restaurant";
160
+ status: "active" | "inactive" | "pending";
161
+ description: string | null;
162
+ email: string | null;
163
+ phone: string | null;
164
+ website: string | null;
165
+ address: string | null;
166
+ city: string | null;
167
+ country: string | null;
168
+ defaultCurrency: string | null;
169
+ contactName: string | null;
170
+ contactEmail: string | null;
171
+ contactPhone: string | null;
172
+ tags: string[];
173
+ createdAt: string;
174
+ updatedAt: string;
175
+ paymentTermsDays?: number | null | undefined;
176
+ reservationTimeoutMinutes?: number | null | undefined;
177
+ customerPaymentPolicy?: {
178
+ deposit: {
179
+ kind: "none" | "percent" | "fixed_cents";
180
+ percent?: number | undefined;
181
+ amountCents?: number | undefined;
182
+ };
183
+ minDaysBeforeDepartureForDeposit: number;
184
+ balanceDueDaysBeforeDeparture: number;
185
+ balanceDueMinDaysFromNow: number;
186
+ } | null | undefined;
187
+ };
188
+ }, Error, {
189
+ data: {
190
+ id: string;
191
+ name: string;
192
+ type: "other" | "guide" | "hotel" | "transfer" | "experience" | "airline" | "restaurant";
193
+ status: "active" | "inactive" | "pending";
194
+ description: string | null;
195
+ email: string | null;
196
+ phone: string | null;
197
+ website: string | null;
198
+ address: string | null;
199
+ city: string | null;
200
+ country: string | null;
201
+ defaultCurrency: string | null;
202
+ contactName: string | null;
203
+ contactEmail: string | null;
204
+ contactPhone: string | null;
205
+ tags: string[];
206
+ createdAt: string;
207
+ updatedAt: string;
208
+ paymentTermsDays?: number | null | undefined;
209
+ reservationTimeoutMinutes?: number | null | undefined;
210
+ customerPaymentPolicy?: {
211
+ deposit: {
212
+ kind: "none" | "percent" | "fixed_cents";
213
+ percent?: number | undefined;
214
+ amountCents?: number | undefined;
215
+ };
216
+ minDaysBeforeDepartureForDeposit: number;
217
+ balanceDueDaysBeforeDeparture: number;
218
+ balanceDueMinDaysFromNow: number;
219
+ } | null | undefined;
220
+ };
221
+ }, readonly ["voyant", "suppliers", "suppliers", "detail", string]>, "queryFn"> & {
222
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
223
+ data: {
224
+ id: string;
225
+ name: string;
226
+ type: "other" | "guide" | "hotel" | "transfer" | "experience" | "airline" | "restaurant";
227
+ status: "active" | "inactive" | "pending";
228
+ description: string | null;
229
+ email: string | null;
230
+ phone: string | null;
231
+ website: string | null;
232
+ address: string | null;
233
+ city: string | null;
234
+ country: string | null;
235
+ defaultCurrency: string | null;
236
+ contactName: string | null;
237
+ contactEmail: string | null;
238
+ contactPhone: string | null;
239
+ tags: string[];
240
+ createdAt: string;
241
+ updatedAt: string;
242
+ paymentTermsDays?: number | null | undefined;
243
+ reservationTimeoutMinutes?: number | null | undefined;
244
+ customerPaymentPolicy?: {
245
+ deposit: {
246
+ kind: "none" | "percent" | "fixed_cents";
247
+ percent?: number | undefined;
248
+ amountCents?: number | undefined;
249
+ };
250
+ minDaysBeforeDepartureForDeposit: number;
251
+ balanceDueDaysBeforeDeparture: number;
252
+ balanceDueMinDaysFromNow: number;
253
+ } | null | undefined;
254
+ };
255
+ }, readonly ["voyant", "suppliers", "suppliers", "detail", string], never> | undefined;
256
+ } & {
257
+ queryKey: readonly ["voyant", "suppliers", "suppliers", "detail", string] & {
258
+ [dataTagSymbol]: {
259
+ data: {
260
+ id: string;
261
+ name: string;
262
+ type: "other" | "guide" | "hotel" | "transfer" | "experience" | "airline" | "restaurant";
263
+ status: "active" | "inactive" | "pending";
264
+ description: string | null;
265
+ email: string | null;
266
+ phone: string | null;
267
+ website: string | null;
268
+ address: string | null;
269
+ city: string | null;
270
+ country: string | null;
271
+ defaultCurrency: string | null;
272
+ contactName: string | null;
273
+ contactEmail: string | null;
274
+ contactPhone: string | null;
275
+ tags: string[];
276
+ createdAt: string;
277
+ updatedAt: string;
278
+ paymentTermsDays?: number | null | undefined;
279
+ reservationTimeoutMinutes?: number | null | undefined;
280
+ customerPaymentPolicy?: {
281
+ deposit: {
282
+ kind: "none" | "percent" | "fixed_cents";
283
+ percent?: number | undefined;
284
+ amountCents?: number | undefined;
285
+ };
286
+ minDaysBeforeDepartureForDeposit: number;
287
+ balanceDueDaysBeforeDeparture: number;
288
+ balanceDueMinDaysFromNow: number;
289
+ } | null | undefined;
290
+ };
291
+ };
292
+ [dataTagErrorSymbol]: Error;
293
+ };
294
+ };
295
+ export declare function getSupplierServicesQueryOptions(client: FetchWithValidationOptions, supplierId: string): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
296
+ data: {
297
+ id: string;
298
+ supplierId: string;
299
+ serviceType: "other" | "guide" | "transfer" | "experience" | "accommodation" | "meal";
300
+ name: string;
301
+ description: string | null;
302
+ duration: string | null;
303
+ capacity: number | null;
304
+ active: boolean;
305
+ tags: string[];
306
+ createdAt: string;
307
+ updatedAt: string;
308
+ }[];
309
+ }, Error, {
310
+ data: {
311
+ id: string;
312
+ supplierId: string;
313
+ serviceType: "other" | "guide" | "transfer" | "experience" | "accommodation" | "meal";
314
+ name: string;
315
+ description: string | null;
316
+ duration: string | null;
317
+ capacity: number | null;
318
+ active: boolean;
319
+ tags: string[];
320
+ createdAt: string;
321
+ updatedAt: string;
322
+ }[];
323
+ }, readonly ["voyant", "suppliers", "services", "list", string]>, "queryFn"> & {
324
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
325
+ data: {
326
+ id: string;
327
+ supplierId: string;
328
+ serviceType: "other" | "guide" | "transfer" | "experience" | "accommodation" | "meal";
329
+ name: string;
330
+ description: string | null;
331
+ duration: string | null;
332
+ capacity: number | null;
333
+ active: boolean;
334
+ tags: string[];
335
+ createdAt: string;
336
+ updatedAt: string;
337
+ }[];
338
+ }, readonly ["voyant", "suppliers", "services", "list", string], never> | undefined;
339
+ } & {
340
+ queryKey: readonly ["voyant", "suppliers", "services", "list", string] & {
341
+ [dataTagSymbol]: {
342
+ data: {
343
+ id: string;
344
+ supplierId: string;
345
+ serviceType: "other" | "guide" | "transfer" | "experience" | "accommodation" | "meal";
346
+ name: string;
347
+ description: string | null;
348
+ duration: string | null;
349
+ capacity: number | null;
350
+ active: boolean;
351
+ tags: string[];
352
+ createdAt: string;
353
+ updatedAt: string;
354
+ }[];
355
+ };
356
+ [dataTagErrorSymbol]: Error;
357
+ };
358
+ };
359
+ export declare function getSupplierNotesQueryOptions(client: FetchWithValidationOptions, supplierId: string): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
360
+ data: {
361
+ id: string;
362
+ supplierId: string;
363
+ authorId: string;
364
+ content: string;
365
+ createdAt: string;
366
+ }[];
367
+ }, Error, {
368
+ data: {
369
+ id: string;
370
+ supplierId: string;
371
+ authorId: string;
372
+ content: string;
373
+ createdAt: string;
374
+ }[];
375
+ }, readonly ["voyant", "suppliers", "notes", "list", string]>, "queryFn"> & {
376
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
377
+ data: {
378
+ id: string;
379
+ supplierId: string;
380
+ authorId: string;
381
+ content: string;
382
+ createdAt: string;
383
+ }[];
384
+ }, readonly ["voyant", "suppliers", "notes", "list", string], never> | undefined;
385
+ } & {
386
+ queryKey: readonly ["voyant", "suppliers", "notes", "list", string] & {
387
+ [dataTagSymbol]: {
388
+ data: {
389
+ id: string;
390
+ supplierId: string;
391
+ authorId: string;
392
+ content: string;
393
+ createdAt: string;
394
+ }[];
395
+ };
396
+ [dataTagErrorSymbol]: Error;
397
+ };
398
+ };
399
+ export declare function getSupplierServiceRatesQueryOptions(client: FetchWithValidationOptions, supplierId: string, serviceId: string): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
400
+ data: {
401
+ id: string;
402
+ serviceId: string;
403
+ name: string;
404
+ currency: string;
405
+ amountCents: number;
406
+ unit: "flat" | "per_person" | "per_group" | "per_night" | "per_vehicle";
407
+ validFrom: string | null;
408
+ validTo: string | null;
409
+ minPax: number | null;
410
+ maxPax: number | null;
411
+ notes: string | null;
412
+ createdAt: string;
413
+ }[];
414
+ }, Error, {
415
+ data: {
416
+ id: string;
417
+ serviceId: string;
418
+ name: string;
419
+ currency: string;
420
+ amountCents: number;
421
+ unit: "flat" | "per_person" | "per_group" | "per_night" | "per_vehicle";
422
+ validFrom: string | null;
423
+ validTo: string | null;
424
+ minPax: number | null;
425
+ maxPax: number | null;
426
+ notes: string | null;
427
+ createdAt: string;
428
+ }[];
429
+ }, readonly ["voyant", "suppliers", "rates", "list", string, string]>, "queryFn"> & {
430
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
431
+ data: {
432
+ id: string;
433
+ serviceId: string;
434
+ name: string;
435
+ currency: string;
436
+ amountCents: number;
437
+ unit: "flat" | "per_person" | "per_group" | "per_night" | "per_vehicle";
438
+ validFrom: string | null;
439
+ validTo: string | null;
440
+ minPax: number | null;
441
+ maxPax: number | null;
442
+ notes: string | null;
443
+ createdAt: string;
444
+ }[];
445
+ }, readonly ["voyant", "suppliers", "rates", "list", string, string], never> | undefined;
446
+ } & {
447
+ queryKey: readonly ["voyant", "suppliers", "rates", "list", string, string] & {
448
+ [dataTagSymbol]: {
449
+ data: {
450
+ id: string;
451
+ serviceId: string;
452
+ name: string;
453
+ currency: string;
454
+ amountCents: number;
455
+ unit: "flat" | "per_person" | "per_group" | "per_night" | "per_vehicle";
456
+ validFrom: string | null;
457
+ validTo: string | null;
458
+ minPax: number | null;
459
+ maxPax: number | null;
460
+ notes: string | null;
461
+ createdAt: string;
462
+ }[];
463
+ };
464
+ [dataTagErrorSymbol]: Error;
465
+ };
466
+ };
467
+ //# sourceMappingURL=query-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-options.d.ts","sourceRoot":"","sources":["../../src/suppliers/query-options.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,0BAA0B,EAAuB,MAAM,aAAa,CAAA;AAClF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAenE,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,0BAA0B,EAClC,OAAO,GAAE,mBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBlC;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,0BAA0B,EAAE,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKrF;AAED,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,0BAA0B,EAClC,UAAU,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOnB;AAED,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,0BAA0B,EAClC,UAAU,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOnB;AAED,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,0BAA0B,EAClC,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWlB"}
@@ -0,0 +1,63 @@
1
+ "use client";
2
+ import { queryOptions } from "@tanstack/react-query";
3
+ import { fetchWithValidation } from "./client.js";
4
+ import { suppliersQueryKeys } from "./query-keys.js";
5
+ import { supplierDetailResponse, supplierListResponse, supplierNotesResponse, supplierRatesResponse, supplierServicesResponse, } 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: suppliersQueryKeys.suppliersList(filters),
16
+ queryFn: () => {
17
+ const params = new URLSearchParams();
18
+ if (filters.search)
19
+ params.set("search", filters.search);
20
+ if (filters.type)
21
+ params.set("type", filters.type);
22
+ if (filters.status)
23
+ params.set("status", filters.status);
24
+ if (filters.country)
25
+ params.set("country", filters.country);
26
+ if (filters.defaultCurrency)
27
+ params.set("defaultCurrency", filters.defaultCurrency);
28
+ if (filters.primaryFacilityId)
29
+ params.set("primaryFacilityId", filters.primaryFacilityId);
30
+ if (filters.sortBy)
31
+ params.set("sortBy", filters.sortBy);
32
+ if (filters.sortDir)
33
+ params.set("sortDir", filters.sortDir);
34
+ appendPagination(params, filters);
35
+ const qs = params.toString();
36
+ return fetchWithValidation(`/v1/suppliers${qs ? `?${qs}` : ""}`, supplierListResponse, client);
37
+ },
38
+ });
39
+ }
40
+ export function getSupplierQueryOptions(client, id) {
41
+ return queryOptions({
42
+ queryKey: suppliersQueryKeys.supplierDetail(id),
43
+ queryFn: () => fetchWithValidation(`/v1/suppliers/${id}`, supplierDetailResponse, client),
44
+ });
45
+ }
46
+ export function getSupplierServicesQueryOptions(client, supplierId) {
47
+ return queryOptions({
48
+ queryKey: suppliersQueryKeys.supplierServices(supplierId),
49
+ queryFn: () => fetchWithValidation(`/v1/suppliers/${supplierId}/services`, supplierServicesResponse, client),
50
+ });
51
+ }
52
+ export function getSupplierNotesQueryOptions(client, supplierId) {
53
+ return queryOptions({
54
+ queryKey: suppliersQueryKeys.supplierNotes(supplierId),
55
+ queryFn: () => fetchWithValidation(`/v1/suppliers/${supplierId}/notes`, supplierNotesResponse, client),
56
+ });
57
+ }
58
+ export function getSupplierServiceRatesQueryOptions(client, supplierId, serviceId) {
59
+ return queryOptions({
60
+ queryKey: suppliersQueryKeys.supplierServiceRates(supplierId, serviceId),
61
+ queryFn: () => fetchWithValidation(`/v1/suppliers/${supplierId}/services/${serviceId}/rates`, supplierRatesResponse, client),
62
+ });
63
+ }