@voyant-travel/commerce 0.1.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 (210) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +145 -0
  3. package/dist/accepted-quote-version-reservation-golden-flow.test.d.ts +2 -0
  4. package/dist/accepted-quote-version-reservation-golden-flow.test.d.ts.map +1 -0
  5. package/dist/accepted-quote-version-reservation-golden-flow.test.js +398 -0
  6. package/dist/index.d.ts +15 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +14 -0
  9. package/dist/interface.d.ts +18 -0
  10. package/dist/interface.d.ts.map +1 -0
  11. package/dist/interface.js +246 -0
  12. package/dist/interface.test.d.ts +2 -0
  13. package/dist/interface.test.d.ts.map +1 -0
  14. package/dist/interface.test.js +357 -0
  15. package/dist/markets/index.d.ts +11 -0
  16. package/dist/markets/index.d.ts.map +1 -0
  17. package/dist/markets/index.js +12 -0
  18. package/dist/markets/routes.d.ts +1182 -0
  19. package/dist/markets/routes.d.ts.map +1 -0
  20. package/dist/markets/routes.js +209 -0
  21. package/dist/markets/schema.d.ts +1527 -0
  22. package/dist/markets/schema.d.ts.map +1 -0
  23. package/dist/markets/schema.js +240 -0
  24. package/dist/markets/service-core.d.ts +253 -0
  25. package/dist/markets/service-core.d.ts.map +1 -0
  26. package/dist/markets/service-core.js +242 -0
  27. package/dist/markets/service-rules.d.ts +191 -0
  28. package/dist/markets/service-rules.d.ts.map +1 -0
  29. package/dist/markets/service-rules.js +155 -0
  30. package/dist/markets/service-shared.d.ts +36 -0
  31. package/dist/markets/service-shared.d.ts.map +1 -0
  32. package/dist/markets/service-shared.js +7 -0
  33. package/dist/markets/service.d.ts +43 -0
  34. package/dist/markets/service.d.ts.map +1 -0
  35. package/dist/markets/service.js +42 -0
  36. package/dist/markets/validation.d.ts +451 -0
  37. package/dist/markets/validation.d.ts.map +1 -0
  38. package/dist/markets/validation.js +160 -0
  39. package/dist/pricing/events.d.ts +53 -0
  40. package/dist/pricing/events.d.ts.map +1 -0
  41. package/dist/pricing/events.js +28 -0
  42. package/dist/pricing/index.d.ts +15 -0
  43. package/dist/pricing/index.d.ts.map +1 -0
  44. package/dist/pricing/index.js +18 -0
  45. package/dist/pricing/routes-core.d.ts +981 -0
  46. package/dist/pricing/routes-core.d.ts.map +1 -0
  47. package/dist/pricing/routes-core.js +102 -0
  48. package/dist/pricing/routes-public.d.ts +136 -0
  49. package/dist/pricing/routes-public.d.ts.map +1 -0
  50. package/dist/pricing/routes-public.js +14 -0
  51. package/dist/pricing/routes-rules.d.ts +1339 -0
  52. package/dist/pricing/routes-rules.d.ts.map +1 -0
  53. package/dist/pricing/routes-rules.js +138 -0
  54. package/dist/pricing/routes-shared.d.ts +14 -0
  55. package/dist/pricing/routes-shared.d.ts.map +1 -0
  56. package/dist/pricing/routes-shared.js +3 -0
  57. package/dist/pricing/routes.d.ts +7 -0
  58. package/dist/pricing/routes.d.ts.map +1 -0
  59. package/dist/pricing/routes.js +6 -0
  60. package/dist/pricing/schema-catalogs.d.ts +467 -0
  61. package/dist/pricing/schema-catalogs.d.ts.map +1 -0
  62. package/dist/pricing/schema-catalogs.js +47 -0
  63. package/dist/pricing/schema-categories.d.ts +497 -0
  64. package/dist/pricing/schema-categories.d.ts.map +1 -0
  65. package/dist/pricing/schema-categories.js +54 -0
  66. package/dist/pricing/schema-departure-overrides.d.ts +228 -0
  67. package/dist/pricing/schema-departure-overrides.d.ts.map +1 -0
  68. package/dist/pricing/schema-departure-overrides.js +36 -0
  69. package/dist/pricing/schema-option-rules.d.ts +1770 -0
  70. package/dist/pricing/schema-option-rules.d.ts.map +1 -0
  71. package/dist/pricing/schema-option-rules.js +181 -0
  72. package/dist/pricing/schema-policies.d.ts +395 -0
  73. package/dist/pricing/schema-policies.d.ts.map +1 -0
  74. package/dist/pricing/schema-policies.js +41 -0
  75. package/dist/pricing/schema-relations.d.ts +59 -0
  76. package/dist/pricing/schema-relations.d.ts.map +1 -0
  77. package/dist/pricing/schema-relations.js +111 -0
  78. package/dist/pricing/schema-shared.d.ts +11 -0
  79. package/dist/pricing/schema-shared.d.ts.map +1 -0
  80. package/dist/pricing/schema-shared.js +67 -0
  81. package/dist/pricing/schema.d.ts +8 -0
  82. package/dist/pricing/schema.d.ts.map +1 -0
  83. package/dist/pricing/schema.js +7 -0
  84. package/dist/pricing/service-catalog-plane-pricing.d.ts +95 -0
  85. package/dist/pricing/service-catalog-plane-pricing.d.ts.map +1 -0
  86. package/dist/pricing/service-catalog-plane-pricing.js +382 -0
  87. package/dist/pricing/service-catalogs.d.ts +139 -0
  88. package/dist/pricing/service-catalogs.d.ts.map +1 -0
  89. package/dist/pricing/service-catalogs.js +89 -0
  90. package/dist/pricing/service-categories.d.ts +147 -0
  91. package/dist/pricing/service-categories.d.ts.map +1 -0
  92. package/dist/pricing/service-categories.js +105 -0
  93. package/dist/pricing/service-departure-overrides.d.ts +67 -0
  94. package/dist/pricing/service-departure-overrides.d.ts.map +1 -0
  95. package/dist/pricing/service-departure-overrides.js +54 -0
  96. package/dist/pricing/service-option-rules.d.ts +321 -0
  97. package/dist/pricing/service-option-rules.d.ts.map +1 -0
  98. package/dist/pricing/service-option-rules.js +340 -0
  99. package/dist/pricing/service-policies.d.ts +123 -0
  100. package/dist/pricing/service-policies.d.ts.map +1 -0
  101. package/dist/pricing/service-policies.js +95 -0
  102. package/dist/pricing/service-public.d.ts +89 -0
  103. package/dist/pricing/service-public.d.ts.map +1 -0
  104. package/dist/pricing/service-public.js +473 -0
  105. package/dist/pricing/service-rule-resolver.d.ts +67 -0
  106. package/dist/pricing/service-rule-resolver.d.ts.map +1 -0
  107. package/dist/pricing/service-rule-resolver.js +204 -0
  108. package/dist/pricing/service-shared.d.ts +53 -0
  109. package/dist/pricing/service-shared.d.ts.map +1 -0
  110. package/dist/pricing/service-shared.js +4 -0
  111. package/dist/pricing/service-transfer-rules.d.ts +211 -0
  112. package/dist/pricing/service-transfer-rules.d.ts.map +1 -0
  113. package/dist/pricing/service-transfer-rules.js +139 -0
  114. package/dist/pricing/service.d.ts +79 -0
  115. package/dist/pricing/service.d.ts.map +1 -0
  116. package/dist/pricing/service.js +78 -0
  117. package/dist/pricing/validation-public.d.ts +412 -0
  118. package/dist/pricing/validation-public.d.ts.map +1 -0
  119. package/dist/pricing/validation-public.js +111 -0
  120. package/dist/pricing/validation-shared.d.ts +71 -0
  121. package/dist/pricing/validation-shared.d.ts.map +1 -0
  122. package/dist/pricing/validation-shared.js +63 -0
  123. package/dist/pricing/validation.d.ts +987 -0
  124. package/dist/pricing/validation.d.ts.map +1 -0
  125. package/dist/pricing/validation.js +307 -0
  126. package/dist/promotions/events.d.ts +38 -0
  127. package/dist/promotions/events.d.ts.map +1 -0
  128. package/dist/promotions/events.js +25 -0
  129. package/dist/promotions/index.d.ts +12 -0
  130. package/dist/promotions/index.d.ts.map +1 -0
  131. package/dist/promotions/index.js +17 -0
  132. package/dist/promotions/routes-shared.d.ts +14 -0
  133. package/dist/promotions/routes-shared.d.ts.map +1 -0
  134. package/dist/promotions/routes-shared.js +3 -0
  135. package/dist/promotions/routes.d.ts +395 -0
  136. package/dist/promotions/routes.d.ts.map +1 -0
  137. package/dist/promotions/routes.js +55 -0
  138. package/dist/promotions/schema.d.ts +675 -0
  139. package/dist/promotions/schema.d.ts.map +1 -0
  140. package/dist/promotions/schema.js +126 -0
  141. package/dist/promotions/service-booking-confirmed.d.ts +77 -0
  142. package/dist/promotions/service-booking-confirmed.d.ts.map +1 -0
  143. package/dist/promotions/service-booking-confirmed.js +134 -0
  144. package/dist/promotions/service-boundary-scheduler.d.ts +85 -0
  145. package/dist/promotions/service-boundary-scheduler.d.ts.map +1 -0
  146. package/dist/promotions/service-boundary-scheduler.js +141 -0
  147. package/dist/promotions/service-catalog-evaluator.d.ts +22 -0
  148. package/dist/promotions/service-catalog-evaluator.d.ts.map +1 -0
  149. package/dist/promotions/service-catalog-evaluator.js +33 -0
  150. package/dist/promotions/service-catalog-plane-promotions.d.ts +73 -0
  151. package/dist/promotions/service-catalog-plane-promotions.d.ts.map +1 -0
  152. package/dist/promotions/service-catalog-plane-promotions.js +118 -0
  153. package/dist/promotions/service-evaluator.d.ts +134 -0
  154. package/dist/promotions/service-evaluator.d.ts.map +1 -0
  155. package/dist/promotions/service-evaluator.js +302 -0
  156. package/dist/promotions/service-storefront.d.ts +147 -0
  157. package/dist/promotions/service-storefront.d.ts.map +1 -0
  158. package/dist/promotions/service-storefront.js +326 -0
  159. package/dist/promotions/service.d.ts +143 -0
  160. package/dist/promotions/service.d.ts.map +1 -0
  161. package/dist/promotions/service.js +359 -0
  162. package/dist/promotions/validation.d.ts +195 -0
  163. package/dist/promotions/validation.d.ts.map +1 -0
  164. package/dist/promotions/validation.js +167 -0
  165. package/dist/promotions/workflow-bulk-reindex.d.ts +36 -0
  166. package/dist/promotions/workflow-bulk-reindex.d.ts.map +1 -0
  167. package/dist/promotions/workflow-bulk-reindex.js +53 -0
  168. package/dist/promotions/workflow-runtime.d.ts +17 -0
  169. package/dist/promotions/workflow-runtime.d.ts.map +1 -0
  170. package/dist/promotions/workflow-runtime.js +9 -0
  171. package/dist/runtime.d.ts +18 -0
  172. package/dist/runtime.d.ts.map +1 -0
  173. package/dist/runtime.js +27 -0
  174. package/dist/runtime.test.d.ts +2 -0
  175. package/dist/runtime.test.d.ts.map +1 -0
  176. package/dist/runtime.test.js +25 -0
  177. package/dist/schema.d.ts +5 -0
  178. package/dist/schema.d.ts.map +1 -0
  179. package/dist/schema.js +4 -0
  180. package/dist/sellability/index.d.ts +13 -0
  181. package/dist/sellability/index.d.ts.map +1 -0
  182. package/dist/sellability/index.js +17 -0
  183. package/dist/sellability/routes.d.ts +2332 -0
  184. package/dist/sellability/routes.d.ts.map +1 -0
  185. package/dist/sellability/routes.js +166 -0
  186. package/dist/sellability/schema.d.ts +1716 -0
  187. package/dist/sellability/schema.d.ts.map +1 -0
  188. package/dist/sellability/schema.js +278 -0
  189. package/dist/sellability/service-records.d.ts +316 -0
  190. package/dist/sellability/service-records.d.ts.map +1 -0
  191. package/dist/sellability/service-records.js +253 -0
  192. package/dist/sellability/service-resolve.d.ts +72 -0
  193. package/dist/sellability/service-resolve.d.ts.map +1 -0
  194. package/dist/sellability/service-resolve.js +580 -0
  195. package/dist/sellability/service-shared.d.ts +124 -0
  196. package/dist/sellability/service-shared.d.ts.map +1 -0
  197. package/dist/sellability/service-shared.js +96 -0
  198. package/dist/sellability/service-snapshots.d.ts +191 -0
  199. package/dist/sellability/service-snapshots.d.ts.map +1 -0
  200. package/dist/sellability/service-snapshots.js +153 -0
  201. package/dist/sellability/service.d.ts +1038 -0
  202. package/dist/sellability/service.d.ts.map +1 -0
  203. package/dist/sellability/service.js +17 -0
  204. package/dist/sellability/validation.d.ts +477 -0
  205. package/dist/sellability/validation.d.ts.map +1 -0
  206. package/dist/sellability/validation.js +192 -0
  207. package/dist/types.d.ts +239 -0
  208. package/dist/types.d.ts.map +1 -0
  209. package/dist/types.js +1 -0
  210. package/package.json +62 -0
@@ -0,0 +1,2332 @@
1
+ import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
2
+ import { sellabilityService } from "./service.js";
3
+ type Env = {
4
+ Variables: {
5
+ db: PostgresJsDatabase;
6
+ userId?: string;
7
+ };
8
+ };
9
+ export interface SellabilityRoutesOptions {
10
+ service?: typeof sellabilityService;
11
+ }
12
+ export declare function createSellabilityRoutes(options?: SellabilityRoutesOptions): import("hono/hono-base").HonoBase<Env, {
13
+ "/resolve": {
14
+ $post: {
15
+ input: {};
16
+ output: {
17
+ data: {
18
+ product: {
19
+ id: string;
20
+ name: string;
21
+ };
22
+ option: {
23
+ id: string;
24
+ name: string;
25
+ code: string | null;
26
+ };
27
+ slot: {
28
+ id: string;
29
+ productId: string;
30
+ optionId: string | null;
31
+ startTimeId: string | null;
32
+ dateLocal: string;
33
+ startsAt: string;
34
+ timezone: string;
35
+ unlimited: boolean;
36
+ remainingPax: number | null;
37
+ remainingPickups: number | null;
38
+ pastCutoff: boolean;
39
+ tooEarly: boolean;
40
+ };
41
+ market: {
42
+ id: string;
43
+ code: string;
44
+ name: string;
45
+ } | null;
46
+ channel: {
47
+ id: string;
48
+ kind: "direct" | "reseller" | "affiliate" | "ota" | "marketplace" | "api_partner" | "connect";
49
+ } | null;
50
+ sellability: {
51
+ mode: "unavailable" | "sellable" | "on_request";
52
+ onRequest: boolean;
53
+ allotmentStatus: "sellable" | "not_applicable";
54
+ };
55
+ pricing: {
56
+ currencyCode: string;
57
+ sellAmountCents: number;
58
+ costAmountCents: number;
59
+ marginAmountCents: number;
60
+ breakdown: {
61
+ requestRef: string | null;
62
+ unitId: string | null;
63
+ unitName: string | null;
64
+ unitType: string | null;
65
+ pricingCategoryId: string | null;
66
+ pricingCategoryName: string | null;
67
+ quantity: number;
68
+ pricingMode: string;
69
+ sellAmountCents: number;
70
+ costAmountCents: number;
71
+ sourceRuleId: string | null;
72
+ tierId: string | null;
73
+ }[];
74
+ components: {
75
+ kind: "base" | "unit" | "pickup" | "start_time_adjustment";
76
+ title: string;
77
+ quantity: number;
78
+ pricingMode: string;
79
+ sellAmountCents: number;
80
+ costAmountCents: number;
81
+ unitId: string | null;
82
+ unitName: string | null;
83
+ unitType: string | null;
84
+ pricingCategoryId: string | null;
85
+ pricingCategoryName: string | null;
86
+ requestRef: string | null;
87
+ sourceRuleId: string | null;
88
+ tierId: string | null;
89
+ }[];
90
+ fx: {
91
+ fxRateSetId: string;
92
+ baseCurrency: string;
93
+ quoteCurrency: string;
94
+ rateDecimal: number;
95
+ } | null;
96
+ };
97
+ sources: {
98
+ marketProductRuleId: string | null;
99
+ marketChannelRuleId: string | null;
100
+ marketPriceCatalogId: string | null;
101
+ optionPriceRuleId: string;
102
+ optionStartTimeRuleId: string | null;
103
+ channelInventoryAllotmentIds: string[];
104
+ channelInventoryReleaseRuleId: string | null;
105
+ };
106
+ }[];
107
+ meta: {
108
+ total: number;
109
+ };
110
+ };
111
+ outputFormat: "json";
112
+ status: import("hono/utils/http-status").ContentfulStatusCode;
113
+ };
114
+ };
115
+ } & {
116
+ "/resolve-and-persist": {
117
+ $post: {
118
+ input: {};
119
+ output: {
120
+ snapshot: {
121
+ id: string;
122
+ status: "expired" | "resolved" | "offer_constructed";
123
+ createdAt: string;
124
+ updatedAt: string;
125
+ marketId: string | null;
126
+ fxRateSetId: string | null;
127
+ productId: string | null;
128
+ optionId: string | null;
129
+ channelId: string | null;
130
+ offerId: string | null;
131
+ slotId: string | null;
132
+ expiresAt: string | null;
133
+ requestedCurrencyCode: string | null;
134
+ sourceCurrencyCode: string | null;
135
+ queryPayload: {
136
+ [x: string]: import("hono/utils/types").JSONValue;
137
+ };
138
+ pricingSummary: {
139
+ [x: string]: import("hono/utils/types").JSONValue;
140
+ };
141
+ };
142
+ resolved: {
143
+ data: {
144
+ product: {
145
+ id: string;
146
+ name: string;
147
+ };
148
+ option: {
149
+ id: string;
150
+ name: string;
151
+ code: string | null;
152
+ };
153
+ slot: {
154
+ id: string;
155
+ productId: string;
156
+ optionId: string | null;
157
+ startTimeId: string | null;
158
+ dateLocal: string;
159
+ startsAt: string;
160
+ timezone: string;
161
+ unlimited: boolean;
162
+ remainingPax: number | null;
163
+ remainingPickups: number | null;
164
+ pastCutoff: boolean;
165
+ tooEarly: boolean;
166
+ };
167
+ market: {
168
+ id: string;
169
+ code: string;
170
+ name: string;
171
+ } | null;
172
+ channel: {
173
+ id: string;
174
+ kind: "direct" | "reseller" | "affiliate" | "ota" | "marketplace" | "api_partner" | "connect";
175
+ } | null;
176
+ sellability: {
177
+ mode: "unavailable" | "sellable" | "on_request";
178
+ onRequest: boolean;
179
+ allotmentStatus: "sellable" | "not_applicable";
180
+ };
181
+ pricing: {
182
+ currencyCode: string;
183
+ sellAmountCents: number;
184
+ costAmountCents: number;
185
+ marginAmountCents: number;
186
+ breakdown: {
187
+ requestRef: string | null;
188
+ unitId: string | null;
189
+ unitName: string | null;
190
+ unitType: string | null;
191
+ pricingCategoryId: string | null;
192
+ pricingCategoryName: string | null;
193
+ quantity: number;
194
+ pricingMode: string;
195
+ sellAmountCents: number;
196
+ costAmountCents: number;
197
+ sourceRuleId: string | null;
198
+ tierId: string | null;
199
+ }[];
200
+ components: {
201
+ kind: "base" | "unit" | "pickup" | "start_time_adjustment";
202
+ title: string;
203
+ quantity: number;
204
+ pricingMode: string;
205
+ sellAmountCents: number;
206
+ costAmountCents: number;
207
+ unitId: string | null;
208
+ unitName: string | null;
209
+ unitType: string | null;
210
+ pricingCategoryId: string | null;
211
+ pricingCategoryName: string | null;
212
+ requestRef: string | null;
213
+ sourceRuleId: string | null;
214
+ tierId: string | null;
215
+ }[];
216
+ fx: {
217
+ fxRateSetId: string;
218
+ baseCurrency: string;
219
+ quoteCurrency: string;
220
+ rateDecimal: number;
221
+ } | null;
222
+ };
223
+ sources: {
224
+ marketProductRuleId: string | null;
225
+ marketChannelRuleId: string | null;
226
+ marketPriceCatalogId: string | null;
227
+ optionPriceRuleId: string;
228
+ optionStartTimeRuleId: string | null;
229
+ channelInventoryAllotmentIds: string[];
230
+ channelInventoryReleaseRuleId: string | null;
231
+ };
232
+ }[];
233
+ meta: {
234
+ total: number;
235
+ };
236
+ };
237
+ };
238
+ outputFormat: "json";
239
+ status: 201;
240
+ };
241
+ };
242
+ } & {
243
+ "/snapshots": {
244
+ $get: {
245
+ input: {};
246
+ output: {
247
+ data: {
248
+ id: string;
249
+ offerId: string | null;
250
+ marketId: string | null;
251
+ channelId: string | null;
252
+ productId: string | null;
253
+ optionId: string | null;
254
+ slotId: string | null;
255
+ requestedCurrencyCode: string | null;
256
+ sourceCurrencyCode: string | null;
257
+ fxRateSetId: string | null;
258
+ status: "expired" | "resolved" | "offer_constructed";
259
+ queryPayload: {
260
+ [x: string]: import("hono/utils/types").JSONValue;
261
+ };
262
+ pricingSummary: {
263
+ [x: string]: import("hono/utils/types").JSONValue;
264
+ };
265
+ expiresAt: string | null;
266
+ createdAt: string;
267
+ updatedAt: string;
268
+ }[];
269
+ total: number;
270
+ limit: number;
271
+ offset: number;
272
+ };
273
+ outputFormat: "json";
274
+ status: import("hono/utils/http-status").ContentfulStatusCode;
275
+ };
276
+ };
277
+ } & {
278
+ "/snapshots/:id": {
279
+ $get: {
280
+ input: {
281
+ param: {
282
+ id: string;
283
+ };
284
+ };
285
+ output: {
286
+ error: string;
287
+ };
288
+ outputFormat: "json";
289
+ status: 404;
290
+ } | {
291
+ input: {
292
+ param: {
293
+ id: string;
294
+ };
295
+ };
296
+ output: {
297
+ data: {
298
+ id: string;
299
+ offerId: string | null;
300
+ marketId: string | null;
301
+ channelId: string | null;
302
+ productId: string | null;
303
+ optionId: string | null;
304
+ slotId: string | null;
305
+ requestedCurrencyCode: string | null;
306
+ sourceCurrencyCode: string | null;
307
+ fxRateSetId: string | null;
308
+ status: "expired" | "resolved" | "offer_constructed";
309
+ queryPayload: {
310
+ [x: string]: import("hono/utils/types").JSONValue;
311
+ };
312
+ pricingSummary: {
313
+ [x: string]: import("hono/utils/types").JSONValue;
314
+ };
315
+ expiresAt: string | null;
316
+ createdAt: string;
317
+ updatedAt: string;
318
+ };
319
+ };
320
+ outputFormat: "json";
321
+ status: import("hono/utils/http-status").ContentfulStatusCode;
322
+ };
323
+ };
324
+ } & {
325
+ "/snapshot-items": {
326
+ $get: {
327
+ input: {};
328
+ output: {
329
+ data: {
330
+ id: string;
331
+ snapshotId: string;
332
+ candidateIndex: number;
333
+ componentIndex: number;
334
+ productId: string | null;
335
+ optionId: string | null;
336
+ slotId: string | null;
337
+ unitId: string | null;
338
+ requestRef: string | null;
339
+ componentKind: "base" | "unit" | "pickup" | "start_time_adjustment";
340
+ title: string;
341
+ quantity: number;
342
+ pricingMode: string;
343
+ pricingCategoryId: string | null;
344
+ pricingCategoryName: string | null;
345
+ unitName: string | null;
346
+ unitType: string | null;
347
+ currencyCode: string;
348
+ sellAmountCents: number;
349
+ costAmountCents: number;
350
+ sourceRuleId: string | null;
351
+ tierId: string | null;
352
+ isSelected: boolean;
353
+ createdAt: string;
354
+ }[];
355
+ total: number;
356
+ limit: number;
357
+ offset: number;
358
+ };
359
+ outputFormat: "json";
360
+ status: import("hono/utils/http-status").ContentfulStatusCode;
361
+ };
362
+ };
363
+ } & {
364
+ "/policies": {
365
+ $get: {
366
+ input: {};
367
+ output: {
368
+ data: {
369
+ id: string;
370
+ name: string;
371
+ scope: "market" | "channel" | "global" | "product" | "option";
372
+ policyType: "currency" | "custom" | "pickup" | "capability" | "occupancy" | "question" | "allotment" | "availability_window";
373
+ productId: string | null;
374
+ optionId: string | null;
375
+ marketId: string | null;
376
+ channelId: string | null;
377
+ priority: number;
378
+ active: boolean;
379
+ conditions: {
380
+ [x: string]: import("hono/utils/types").JSONValue;
381
+ };
382
+ effects: {
383
+ [x: string]: import("hono/utils/types").JSONValue;
384
+ };
385
+ notes: string | null;
386
+ metadata: {
387
+ [x: string]: import("hono/utils/types").JSONValue;
388
+ } | null;
389
+ createdAt: string;
390
+ updatedAt: string;
391
+ }[];
392
+ total: number;
393
+ limit: number;
394
+ offset: number;
395
+ };
396
+ outputFormat: "json";
397
+ status: import("hono/utils/http-status").ContentfulStatusCode;
398
+ };
399
+ };
400
+ } & {
401
+ "/policies": {
402
+ $post: {
403
+ input: {};
404
+ output: {
405
+ data: {
406
+ id: string;
407
+ active: boolean;
408
+ metadata: {
409
+ [x: string]: import("hono/utils/types").JSONValue;
410
+ } | null;
411
+ name: string;
412
+ createdAt: string;
413
+ updatedAt: string;
414
+ marketId: string | null;
415
+ notes: string | null;
416
+ priority: number;
417
+ productId: string | null;
418
+ optionId: string | null;
419
+ channelId: string | null;
420
+ policyType: "currency" | "custom" | "pickup" | "capability" | "occupancy" | "question" | "allotment" | "availability_window";
421
+ scope: "market" | "channel" | "global" | "product" | "option";
422
+ conditions: {
423
+ [x: string]: import("hono/utils/types").JSONValue;
424
+ };
425
+ effects: {
426
+ [x: string]: import("hono/utils/types").JSONValue;
427
+ };
428
+ } | null;
429
+ };
430
+ outputFormat: "json";
431
+ status: 201;
432
+ };
433
+ };
434
+ } & {
435
+ "/policies/:id": {
436
+ $get: {
437
+ input: {
438
+ param: {
439
+ id: string;
440
+ };
441
+ };
442
+ output: {
443
+ error: string;
444
+ };
445
+ outputFormat: "json";
446
+ status: 404;
447
+ } | {
448
+ input: {
449
+ param: {
450
+ id: string;
451
+ };
452
+ };
453
+ output: {
454
+ data: {
455
+ id: string;
456
+ name: string;
457
+ scope: "market" | "channel" | "global" | "product" | "option";
458
+ policyType: "currency" | "custom" | "pickup" | "capability" | "occupancy" | "question" | "allotment" | "availability_window";
459
+ productId: string | null;
460
+ optionId: string | null;
461
+ marketId: string | null;
462
+ channelId: string | null;
463
+ priority: number;
464
+ active: boolean;
465
+ conditions: {
466
+ [x: string]: import("hono/utils/types").JSONValue;
467
+ };
468
+ effects: {
469
+ [x: string]: import("hono/utils/types").JSONValue;
470
+ };
471
+ notes: string | null;
472
+ metadata: {
473
+ [x: string]: import("hono/utils/types").JSONValue;
474
+ } | null;
475
+ createdAt: string;
476
+ updatedAt: string;
477
+ };
478
+ };
479
+ outputFormat: "json";
480
+ status: import("hono/utils/http-status").ContentfulStatusCode;
481
+ };
482
+ };
483
+ } & {
484
+ "/policies/:id": {
485
+ $patch: {
486
+ input: {
487
+ param: {
488
+ id: string;
489
+ };
490
+ };
491
+ output: {
492
+ error: string;
493
+ };
494
+ outputFormat: "json";
495
+ status: 404;
496
+ } | {
497
+ input: {
498
+ param: {
499
+ id: string;
500
+ };
501
+ };
502
+ output: {
503
+ data: {
504
+ id: string;
505
+ name: string;
506
+ scope: "market" | "channel" | "global" | "product" | "option";
507
+ policyType: "currency" | "custom" | "pickup" | "capability" | "occupancy" | "question" | "allotment" | "availability_window";
508
+ productId: string | null;
509
+ optionId: string | null;
510
+ marketId: string | null;
511
+ channelId: string | null;
512
+ priority: number;
513
+ active: boolean;
514
+ conditions: {
515
+ [x: string]: import("hono/utils/types").JSONValue;
516
+ };
517
+ effects: {
518
+ [x: string]: import("hono/utils/types").JSONValue;
519
+ };
520
+ notes: string | null;
521
+ metadata: {
522
+ [x: string]: import("hono/utils/types").JSONValue;
523
+ } | null;
524
+ createdAt: string;
525
+ updatedAt: string;
526
+ };
527
+ };
528
+ outputFormat: "json";
529
+ status: import("hono/utils/http-status").ContentfulStatusCode;
530
+ };
531
+ };
532
+ } & {
533
+ "/policies/:id": {
534
+ $delete: {
535
+ input: {
536
+ param: {
537
+ id: string;
538
+ };
539
+ };
540
+ output: {
541
+ error: string;
542
+ };
543
+ outputFormat: "json";
544
+ status: 404;
545
+ } | {
546
+ input: {
547
+ param: {
548
+ id: string;
549
+ };
550
+ };
551
+ output: {
552
+ success: true;
553
+ };
554
+ outputFormat: "json";
555
+ status: import("hono/utils/http-status").ContentfulStatusCode;
556
+ };
557
+ };
558
+ } & {
559
+ "/policy-results": {
560
+ $get: {
561
+ input: {};
562
+ output: {
563
+ data: {
564
+ id: string;
565
+ snapshotId: string;
566
+ snapshotItemId: string | null;
567
+ policyId: string | null;
568
+ candidateIndex: number;
569
+ status: "blocked" | "passed" | "warning" | "adjusted";
570
+ message: string | null;
571
+ details: {
572
+ [x: string]: import("hono/utils/types").JSONValue;
573
+ } | null;
574
+ createdAt: string;
575
+ }[];
576
+ total: number;
577
+ limit: number;
578
+ offset: number;
579
+ };
580
+ outputFormat: "json";
581
+ status: import("hono/utils/http-status").ContentfulStatusCode;
582
+ };
583
+ };
584
+ } & {
585
+ "/policy-results": {
586
+ $post: {
587
+ input: {};
588
+ output: {
589
+ data: {
590
+ id: string;
591
+ status: "blocked" | "passed" | "warning" | "adjusted";
592
+ snapshotId: string;
593
+ message: string | null;
594
+ createdAt: string;
595
+ candidateIndex: number;
596
+ snapshotItemId: string | null;
597
+ policyId: string | null;
598
+ details: {
599
+ [x: string]: import("hono/utils/types").JSONValue;
600
+ } | null;
601
+ } | null;
602
+ };
603
+ outputFormat: "json";
604
+ status: 201;
605
+ };
606
+ };
607
+ } & {
608
+ "/policy-results/:id": {
609
+ $get: {
610
+ input: {
611
+ param: {
612
+ id: string;
613
+ };
614
+ };
615
+ output: {
616
+ error: string;
617
+ };
618
+ outputFormat: "json";
619
+ status: 404;
620
+ } | {
621
+ input: {
622
+ param: {
623
+ id: string;
624
+ };
625
+ };
626
+ output: {
627
+ data: {
628
+ id: string;
629
+ snapshotId: string;
630
+ snapshotItemId: string | null;
631
+ policyId: string | null;
632
+ candidateIndex: number;
633
+ status: "blocked" | "passed" | "warning" | "adjusted";
634
+ message: string | null;
635
+ details: {
636
+ [x: string]: import("hono/utils/types").JSONValue;
637
+ } | null;
638
+ createdAt: string;
639
+ };
640
+ };
641
+ outputFormat: "json";
642
+ status: import("hono/utils/http-status").ContentfulStatusCode;
643
+ };
644
+ };
645
+ } & {
646
+ "/policy-results/:id": {
647
+ $patch: {
648
+ input: {
649
+ param: {
650
+ id: string;
651
+ };
652
+ };
653
+ output: {
654
+ error: string;
655
+ };
656
+ outputFormat: "json";
657
+ status: 404;
658
+ } | {
659
+ input: {
660
+ param: {
661
+ id: string;
662
+ };
663
+ };
664
+ output: {
665
+ data: {
666
+ id: string;
667
+ snapshotId: string;
668
+ snapshotItemId: string | null;
669
+ policyId: string | null;
670
+ candidateIndex: number;
671
+ status: "blocked" | "passed" | "warning" | "adjusted";
672
+ message: string | null;
673
+ details: {
674
+ [x: string]: import("hono/utils/types").JSONValue;
675
+ } | null;
676
+ createdAt: string;
677
+ };
678
+ };
679
+ outputFormat: "json";
680
+ status: import("hono/utils/http-status").ContentfulStatusCode;
681
+ };
682
+ };
683
+ } & {
684
+ "/policy-results/:id": {
685
+ $delete: {
686
+ input: {
687
+ param: {
688
+ id: string;
689
+ };
690
+ };
691
+ output: {
692
+ error: string;
693
+ };
694
+ outputFormat: "json";
695
+ status: 404;
696
+ } | {
697
+ input: {
698
+ param: {
699
+ id: string;
700
+ };
701
+ };
702
+ output: {
703
+ success: true;
704
+ };
705
+ outputFormat: "json";
706
+ status: import("hono/utils/http-status").ContentfulStatusCode;
707
+ };
708
+ };
709
+ } & {
710
+ "/offer-refresh-runs": {
711
+ $get: {
712
+ input: {};
713
+ output: {
714
+ data: {
715
+ id: string;
716
+ offerId: string;
717
+ snapshotId: string | null;
718
+ status: "expired" | "pending" | "running" | "completed" | "failed";
719
+ startedAt: string;
720
+ completedAt: string | null;
721
+ notes: string | null;
722
+ metadata: {
723
+ [x: string]: import("hono/utils/types").JSONValue;
724
+ } | null;
725
+ createdAt: string;
726
+ updatedAt: string;
727
+ }[];
728
+ total: number;
729
+ limit: number;
730
+ offset: number;
731
+ };
732
+ outputFormat: "json";
733
+ status: import("hono/utils/http-status").ContentfulStatusCode;
734
+ };
735
+ };
736
+ } & {
737
+ "/offer-refresh-runs": {
738
+ $post: {
739
+ input: {};
740
+ output: {
741
+ data: {
742
+ id: string;
743
+ status: "expired" | "pending" | "running" | "completed" | "failed";
744
+ snapshotId: string | null;
745
+ metadata: {
746
+ [x: string]: import("hono/utils/types").JSONValue;
747
+ } | null;
748
+ createdAt: string;
749
+ updatedAt: string;
750
+ notes: string | null;
751
+ offerId: string;
752
+ startedAt: string;
753
+ completedAt: string | null;
754
+ } | null;
755
+ };
756
+ outputFormat: "json";
757
+ status: 201;
758
+ };
759
+ };
760
+ } & {
761
+ "/offer-refresh-runs/:id": {
762
+ $get: {
763
+ input: {
764
+ param: {
765
+ id: string;
766
+ };
767
+ };
768
+ output: {
769
+ error: string;
770
+ };
771
+ outputFormat: "json";
772
+ status: 404;
773
+ } | {
774
+ input: {
775
+ param: {
776
+ id: string;
777
+ };
778
+ };
779
+ output: {
780
+ data: {
781
+ id: string;
782
+ offerId: string;
783
+ snapshotId: string | null;
784
+ status: "expired" | "pending" | "running" | "completed" | "failed";
785
+ startedAt: string;
786
+ completedAt: string | null;
787
+ notes: string | null;
788
+ metadata: {
789
+ [x: string]: import("hono/utils/types").JSONValue;
790
+ } | null;
791
+ createdAt: string;
792
+ updatedAt: string;
793
+ };
794
+ };
795
+ outputFormat: "json";
796
+ status: import("hono/utils/http-status").ContentfulStatusCode;
797
+ };
798
+ };
799
+ } & {
800
+ "/offer-refresh-runs/:id": {
801
+ $patch: {
802
+ input: {
803
+ param: {
804
+ id: string;
805
+ };
806
+ };
807
+ output: {
808
+ error: string;
809
+ };
810
+ outputFormat: "json";
811
+ status: 404;
812
+ } | {
813
+ input: {
814
+ param: {
815
+ id: string;
816
+ };
817
+ };
818
+ output: {
819
+ data: {
820
+ id: string;
821
+ offerId: string;
822
+ snapshotId: string | null;
823
+ status: "expired" | "pending" | "running" | "completed" | "failed";
824
+ startedAt: string;
825
+ completedAt: string | null;
826
+ notes: string | null;
827
+ metadata: {
828
+ [x: string]: import("hono/utils/types").JSONValue;
829
+ } | null;
830
+ createdAt: string;
831
+ updatedAt: string;
832
+ };
833
+ };
834
+ outputFormat: "json";
835
+ status: import("hono/utils/http-status").ContentfulStatusCode;
836
+ };
837
+ };
838
+ } & {
839
+ "/offer-refresh-runs/:id": {
840
+ $delete: {
841
+ input: {
842
+ param: {
843
+ id: string;
844
+ };
845
+ };
846
+ output: {
847
+ error: string;
848
+ };
849
+ outputFormat: "json";
850
+ status: 404;
851
+ } | {
852
+ input: {
853
+ param: {
854
+ id: string;
855
+ };
856
+ };
857
+ output: {
858
+ success: true;
859
+ };
860
+ outputFormat: "json";
861
+ status: import("hono/utils/http-status").ContentfulStatusCode;
862
+ };
863
+ };
864
+ } & {
865
+ "/offer-expiration-events": {
866
+ $get: {
867
+ input: {};
868
+ output: {
869
+ data: {
870
+ id: string;
871
+ offerId: string;
872
+ snapshotId: string | null;
873
+ expiresAt: string;
874
+ expiredAt: string | null;
875
+ status: "superseded" | "cancelled" | "scheduled" | "expired";
876
+ reason: string | null;
877
+ metadata: {
878
+ [x: string]: import("hono/utils/types").JSONValue;
879
+ } | null;
880
+ createdAt: string;
881
+ updatedAt: string;
882
+ }[];
883
+ total: number;
884
+ limit: number;
885
+ offset: number;
886
+ };
887
+ outputFormat: "json";
888
+ status: import("hono/utils/http-status").ContentfulStatusCode;
889
+ };
890
+ };
891
+ } & {
892
+ "/offer-expiration-events": {
893
+ $post: {
894
+ input: {};
895
+ output: {
896
+ data: {
897
+ id: string;
898
+ status: "superseded" | "cancelled" | "scheduled" | "expired";
899
+ reason: string | null;
900
+ snapshotId: string | null;
901
+ metadata: {
902
+ [x: string]: import("hono/utils/types").JSONValue;
903
+ } | null;
904
+ createdAt: string;
905
+ updatedAt: string;
906
+ offerId: string;
907
+ expiresAt: string;
908
+ expiredAt: string | null;
909
+ } | null;
910
+ };
911
+ outputFormat: "json";
912
+ status: 201;
913
+ };
914
+ };
915
+ } & {
916
+ "/offer-expiration-events/:id": {
917
+ $get: {
918
+ input: {
919
+ param: {
920
+ id: string;
921
+ };
922
+ };
923
+ output: {
924
+ error: string;
925
+ };
926
+ outputFormat: "json";
927
+ status: 404;
928
+ } | {
929
+ input: {
930
+ param: {
931
+ id: string;
932
+ };
933
+ };
934
+ output: {
935
+ data: {
936
+ id: string;
937
+ offerId: string;
938
+ snapshotId: string | null;
939
+ expiresAt: string;
940
+ expiredAt: string | null;
941
+ status: "superseded" | "cancelled" | "scheduled" | "expired";
942
+ reason: string | null;
943
+ metadata: {
944
+ [x: string]: import("hono/utils/types").JSONValue;
945
+ } | null;
946
+ createdAt: string;
947
+ updatedAt: string;
948
+ };
949
+ };
950
+ outputFormat: "json";
951
+ status: import("hono/utils/http-status").ContentfulStatusCode;
952
+ };
953
+ };
954
+ } & {
955
+ "/offer-expiration-events/:id": {
956
+ $patch: {
957
+ input: {
958
+ param: {
959
+ id: string;
960
+ };
961
+ };
962
+ output: {
963
+ error: string;
964
+ };
965
+ outputFormat: "json";
966
+ status: 404;
967
+ } | {
968
+ input: {
969
+ param: {
970
+ id: string;
971
+ };
972
+ };
973
+ output: {
974
+ data: {
975
+ id: string;
976
+ offerId: string;
977
+ snapshotId: string | null;
978
+ expiresAt: string;
979
+ expiredAt: string | null;
980
+ status: "superseded" | "cancelled" | "scheduled" | "expired";
981
+ reason: string | null;
982
+ metadata: {
983
+ [x: string]: import("hono/utils/types").JSONValue;
984
+ } | null;
985
+ createdAt: string;
986
+ updatedAt: string;
987
+ };
988
+ };
989
+ outputFormat: "json";
990
+ status: import("hono/utils/http-status").ContentfulStatusCode;
991
+ };
992
+ };
993
+ } & {
994
+ "/offer-expiration-events/:id": {
995
+ $delete: {
996
+ input: {
997
+ param: {
998
+ id: string;
999
+ };
1000
+ };
1001
+ output: {
1002
+ error: string;
1003
+ };
1004
+ outputFormat: "json";
1005
+ status: 404;
1006
+ } | {
1007
+ input: {
1008
+ param: {
1009
+ id: string;
1010
+ };
1011
+ };
1012
+ output: {
1013
+ success: true;
1014
+ };
1015
+ outputFormat: "json";
1016
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1017
+ };
1018
+ };
1019
+ } & {
1020
+ "/explanations": {
1021
+ $get: {
1022
+ input: {};
1023
+ output: {
1024
+ data: {
1025
+ id: string;
1026
+ snapshotId: string;
1027
+ snapshotItemId: string | null;
1028
+ candidateIndex: number;
1029
+ explanationType: "pricing" | "blocked" | "sellable" | "policy" | "pickup" | "allotment" | "warning";
1030
+ code: string | null;
1031
+ message: string;
1032
+ details: {
1033
+ [x: string]: import("hono/utils/types").JSONValue;
1034
+ } | null;
1035
+ createdAt: string;
1036
+ }[];
1037
+ total: number;
1038
+ limit: number;
1039
+ offset: number;
1040
+ };
1041
+ outputFormat: "json";
1042
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1043
+ };
1044
+ };
1045
+ } & {
1046
+ "/explanations": {
1047
+ $post: {
1048
+ input: {};
1049
+ output: {
1050
+ data: {
1051
+ id: string;
1052
+ code: string | null;
1053
+ snapshotId: string;
1054
+ message: string;
1055
+ createdAt: string;
1056
+ candidateIndex: number;
1057
+ snapshotItemId: string | null;
1058
+ details: {
1059
+ [x: string]: import("hono/utils/types").JSONValue;
1060
+ } | null;
1061
+ explanationType: "pricing" | "blocked" | "sellable" | "policy" | "pickup" | "allotment" | "warning";
1062
+ } | null;
1063
+ };
1064
+ outputFormat: "json";
1065
+ status: 201;
1066
+ };
1067
+ };
1068
+ } & {
1069
+ "/explanations/:id": {
1070
+ $get: {
1071
+ input: {
1072
+ param: {
1073
+ id: string;
1074
+ };
1075
+ };
1076
+ output: {
1077
+ error: string;
1078
+ };
1079
+ outputFormat: "json";
1080
+ status: 404;
1081
+ } | {
1082
+ input: {
1083
+ param: {
1084
+ id: string;
1085
+ };
1086
+ };
1087
+ output: {
1088
+ data: {
1089
+ id: string;
1090
+ snapshotId: string;
1091
+ snapshotItemId: string | null;
1092
+ candidateIndex: number;
1093
+ explanationType: "pricing" | "blocked" | "sellable" | "policy" | "pickup" | "allotment" | "warning";
1094
+ code: string | null;
1095
+ message: string;
1096
+ details: {
1097
+ [x: string]: import("hono/utils/types").JSONValue;
1098
+ } | null;
1099
+ createdAt: string;
1100
+ };
1101
+ };
1102
+ outputFormat: "json";
1103
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1104
+ };
1105
+ };
1106
+ } & {
1107
+ "/explanations/:id": {
1108
+ $patch: {
1109
+ input: {
1110
+ param: {
1111
+ id: string;
1112
+ };
1113
+ };
1114
+ output: {
1115
+ error: string;
1116
+ };
1117
+ outputFormat: "json";
1118
+ status: 404;
1119
+ } | {
1120
+ input: {
1121
+ param: {
1122
+ id: string;
1123
+ };
1124
+ };
1125
+ output: {
1126
+ data: {
1127
+ id: string;
1128
+ snapshotId: string;
1129
+ snapshotItemId: string | null;
1130
+ candidateIndex: number;
1131
+ explanationType: "pricing" | "blocked" | "sellable" | "policy" | "pickup" | "allotment" | "warning";
1132
+ code: string | null;
1133
+ message: string;
1134
+ details: {
1135
+ [x: string]: import("hono/utils/types").JSONValue;
1136
+ } | null;
1137
+ createdAt: string;
1138
+ };
1139
+ };
1140
+ outputFormat: "json";
1141
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1142
+ };
1143
+ };
1144
+ } & {
1145
+ "/explanations/:id": {
1146
+ $delete: {
1147
+ input: {
1148
+ param: {
1149
+ id: string;
1150
+ };
1151
+ };
1152
+ output: {
1153
+ error: string;
1154
+ };
1155
+ outputFormat: "json";
1156
+ status: 404;
1157
+ } | {
1158
+ input: {
1159
+ param: {
1160
+ id: string;
1161
+ };
1162
+ };
1163
+ output: {
1164
+ success: true;
1165
+ };
1166
+ outputFormat: "json";
1167
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1168
+ };
1169
+ };
1170
+ }, "/", "/explanations/:id">;
1171
+ export declare const sellabilityRoutes: import("hono/hono-base").HonoBase<Env, {
1172
+ "/resolve": {
1173
+ $post: {
1174
+ input: {};
1175
+ output: {
1176
+ data: {
1177
+ product: {
1178
+ id: string;
1179
+ name: string;
1180
+ };
1181
+ option: {
1182
+ id: string;
1183
+ name: string;
1184
+ code: string | null;
1185
+ };
1186
+ slot: {
1187
+ id: string;
1188
+ productId: string;
1189
+ optionId: string | null;
1190
+ startTimeId: string | null;
1191
+ dateLocal: string;
1192
+ startsAt: string;
1193
+ timezone: string;
1194
+ unlimited: boolean;
1195
+ remainingPax: number | null;
1196
+ remainingPickups: number | null;
1197
+ pastCutoff: boolean;
1198
+ tooEarly: boolean;
1199
+ };
1200
+ market: {
1201
+ id: string;
1202
+ code: string;
1203
+ name: string;
1204
+ } | null;
1205
+ channel: {
1206
+ id: string;
1207
+ kind: "direct" | "reseller" | "affiliate" | "ota" | "marketplace" | "api_partner" | "connect";
1208
+ } | null;
1209
+ sellability: {
1210
+ mode: "unavailable" | "sellable" | "on_request";
1211
+ onRequest: boolean;
1212
+ allotmentStatus: "sellable" | "not_applicable";
1213
+ };
1214
+ pricing: {
1215
+ currencyCode: string;
1216
+ sellAmountCents: number;
1217
+ costAmountCents: number;
1218
+ marginAmountCents: number;
1219
+ breakdown: {
1220
+ requestRef: string | null;
1221
+ unitId: string | null;
1222
+ unitName: string | null;
1223
+ unitType: string | null;
1224
+ pricingCategoryId: string | null;
1225
+ pricingCategoryName: string | null;
1226
+ quantity: number;
1227
+ pricingMode: string;
1228
+ sellAmountCents: number;
1229
+ costAmountCents: number;
1230
+ sourceRuleId: string | null;
1231
+ tierId: string | null;
1232
+ }[];
1233
+ components: {
1234
+ kind: "base" | "unit" | "pickup" | "start_time_adjustment";
1235
+ title: string;
1236
+ quantity: number;
1237
+ pricingMode: string;
1238
+ sellAmountCents: number;
1239
+ costAmountCents: number;
1240
+ unitId: string | null;
1241
+ unitName: string | null;
1242
+ unitType: string | null;
1243
+ pricingCategoryId: string | null;
1244
+ pricingCategoryName: string | null;
1245
+ requestRef: string | null;
1246
+ sourceRuleId: string | null;
1247
+ tierId: string | null;
1248
+ }[];
1249
+ fx: {
1250
+ fxRateSetId: string;
1251
+ baseCurrency: string;
1252
+ quoteCurrency: string;
1253
+ rateDecimal: number;
1254
+ } | null;
1255
+ };
1256
+ sources: {
1257
+ marketProductRuleId: string | null;
1258
+ marketChannelRuleId: string | null;
1259
+ marketPriceCatalogId: string | null;
1260
+ optionPriceRuleId: string;
1261
+ optionStartTimeRuleId: string | null;
1262
+ channelInventoryAllotmentIds: string[];
1263
+ channelInventoryReleaseRuleId: string | null;
1264
+ };
1265
+ }[];
1266
+ meta: {
1267
+ total: number;
1268
+ };
1269
+ };
1270
+ outputFormat: "json";
1271
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1272
+ };
1273
+ };
1274
+ } & {
1275
+ "/resolve-and-persist": {
1276
+ $post: {
1277
+ input: {};
1278
+ output: {
1279
+ snapshot: {
1280
+ id: string;
1281
+ status: "expired" | "resolved" | "offer_constructed";
1282
+ createdAt: string;
1283
+ updatedAt: string;
1284
+ marketId: string | null;
1285
+ fxRateSetId: string | null;
1286
+ productId: string | null;
1287
+ optionId: string | null;
1288
+ channelId: string | null;
1289
+ offerId: string | null;
1290
+ slotId: string | null;
1291
+ expiresAt: string | null;
1292
+ requestedCurrencyCode: string | null;
1293
+ sourceCurrencyCode: string | null;
1294
+ queryPayload: {
1295
+ [x: string]: import("hono/utils/types").JSONValue;
1296
+ };
1297
+ pricingSummary: {
1298
+ [x: string]: import("hono/utils/types").JSONValue;
1299
+ };
1300
+ };
1301
+ resolved: {
1302
+ data: {
1303
+ product: {
1304
+ id: string;
1305
+ name: string;
1306
+ };
1307
+ option: {
1308
+ id: string;
1309
+ name: string;
1310
+ code: string | null;
1311
+ };
1312
+ slot: {
1313
+ id: string;
1314
+ productId: string;
1315
+ optionId: string | null;
1316
+ startTimeId: string | null;
1317
+ dateLocal: string;
1318
+ startsAt: string;
1319
+ timezone: string;
1320
+ unlimited: boolean;
1321
+ remainingPax: number | null;
1322
+ remainingPickups: number | null;
1323
+ pastCutoff: boolean;
1324
+ tooEarly: boolean;
1325
+ };
1326
+ market: {
1327
+ id: string;
1328
+ code: string;
1329
+ name: string;
1330
+ } | null;
1331
+ channel: {
1332
+ id: string;
1333
+ kind: "direct" | "reseller" | "affiliate" | "ota" | "marketplace" | "api_partner" | "connect";
1334
+ } | null;
1335
+ sellability: {
1336
+ mode: "unavailable" | "sellable" | "on_request";
1337
+ onRequest: boolean;
1338
+ allotmentStatus: "sellable" | "not_applicable";
1339
+ };
1340
+ pricing: {
1341
+ currencyCode: string;
1342
+ sellAmountCents: number;
1343
+ costAmountCents: number;
1344
+ marginAmountCents: number;
1345
+ breakdown: {
1346
+ requestRef: string | null;
1347
+ unitId: string | null;
1348
+ unitName: string | null;
1349
+ unitType: string | null;
1350
+ pricingCategoryId: string | null;
1351
+ pricingCategoryName: string | null;
1352
+ quantity: number;
1353
+ pricingMode: string;
1354
+ sellAmountCents: number;
1355
+ costAmountCents: number;
1356
+ sourceRuleId: string | null;
1357
+ tierId: string | null;
1358
+ }[];
1359
+ components: {
1360
+ kind: "base" | "unit" | "pickup" | "start_time_adjustment";
1361
+ title: string;
1362
+ quantity: number;
1363
+ pricingMode: string;
1364
+ sellAmountCents: number;
1365
+ costAmountCents: number;
1366
+ unitId: string | null;
1367
+ unitName: string | null;
1368
+ unitType: string | null;
1369
+ pricingCategoryId: string | null;
1370
+ pricingCategoryName: string | null;
1371
+ requestRef: string | null;
1372
+ sourceRuleId: string | null;
1373
+ tierId: string | null;
1374
+ }[];
1375
+ fx: {
1376
+ fxRateSetId: string;
1377
+ baseCurrency: string;
1378
+ quoteCurrency: string;
1379
+ rateDecimal: number;
1380
+ } | null;
1381
+ };
1382
+ sources: {
1383
+ marketProductRuleId: string | null;
1384
+ marketChannelRuleId: string | null;
1385
+ marketPriceCatalogId: string | null;
1386
+ optionPriceRuleId: string;
1387
+ optionStartTimeRuleId: string | null;
1388
+ channelInventoryAllotmentIds: string[];
1389
+ channelInventoryReleaseRuleId: string | null;
1390
+ };
1391
+ }[];
1392
+ meta: {
1393
+ total: number;
1394
+ };
1395
+ };
1396
+ };
1397
+ outputFormat: "json";
1398
+ status: 201;
1399
+ };
1400
+ };
1401
+ } & {
1402
+ "/snapshots": {
1403
+ $get: {
1404
+ input: {};
1405
+ output: {
1406
+ data: {
1407
+ id: string;
1408
+ offerId: string | null;
1409
+ marketId: string | null;
1410
+ channelId: string | null;
1411
+ productId: string | null;
1412
+ optionId: string | null;
1413
+ slotId: string | null;
1414
+ requestedCurrencyCode: string | null;
1415
+ sourceCurrencyCode: string | null;
1416
+ fxRateSetId: string | null;
1417
+ status: "expired" | "resolved" | "offer_constructed";
1418
+ queryPayload: {
1419
+ [x: string]: import("hono/utils/types").JSONValue;
1420
+ };
1421
+ pricingSummary: {
1422
+ [x: string]: import("hono/utils/types").JSONValue;
1423
+ };
1424
+ expiresAt: string | null;
1425
+ createdAt: string;
1426
+ updatedAt: string;
1427
+ }[];
1428
+ total: number;
1429
+ limit: number;
1430
+ offset: number;
1431
+ };
1432
+ outputFormat: "json";
1433
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1434
+ };
1435
+ };
1436
+ } & {
1437
+ "/snapshots/:id": {
1438
+ $get: {
1439
+ input: {
1440
+ param: {
1441
+ id: string;
1442
+ };
1443
+ };
1444
+ output: {
1445
+ error: string;
1446
+ };
1447
+ outputFormat: "json";
1448
+ status: 404;
1449
+ } | {
1450
+ input: {
1451
+ param: {
1452
+ id: string;
1453
+ };
1454
+ };
1455
+ output: {
1456
+ data: {
1457
+ id: string;
1458
+ offerId: string | null;
1459
+ marketId: string | null;
1460
+ channelId: string | null;
1461
+ productId: string | null;
1462
+ optionId: string | null;
1463
+ slotId: string | null;
1464
+ requestedCurrencyCode: string | null;
1465
+ sourceCurrencyCode: string | null;
1466
+ fxRateSetId: string | null;
1467
+ status: "expired" | "resolved" | "offer_constructed";
1468
+ queryPayload: {
1469
+ [x: string]: import("hono/utils/types").JSONValue;
1470
+ };
1471
+ pricingSummary: {
1472
+ [x: string]: import("hono/utils/types").JSONValue;
1473
+ };
1474
+ expiresAt: string | null;
1475
+ createdAt: string;
1476
+ updatedAt: string;
1477
+ };
1478
+ };
1479
+ outputFormat: "json";
1480
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1481
+ };
1482
+ };
1483
+ } & {
1484
+ "/snapshot-items": {
1485
+ $get: {
1486
+ input: {};
1487
+ output: {
1488
+ data: {
1489
+ id: string;
1490
+ snapshotId: string;
1491
+ candidateIndex: number;
1492
+ componentIndex: number;
1493
+ productId: string | null;
1494
+ optionId: string | null;
1495
+ slotId: string | null;
1496
+ unitId: string | null;
1497
+ requestRef: string | null;
1498
+ componentKind: "base" | "unit" | "pickup" | "start_time_adjustment";
1499
+ title: string;
1500
+ quantity: number;
1501
+ pricingMode: string;
1502
+ pricingCategoryId: string | null;
1503
+ pricingCategoryName: string | null;
1504
+ unitName: string | null;
1505
+ unitType: string | null;
1506
+ currencyCode: string;
1507
+ sellAmountCents: number;
1508
+ costAmountCents: number;
1509
+ sourceRuleId: string | null;
1510
+ tierId: string | null;
1511
+ isSelected: boolean;
1512
+ createdAt: string;
1513
+ }[];
1514
+ total: number;
1515
+ limit: number;
1516
+ offset: number;
1517
+ };
1518
+ outputFormat: "json";
1519
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1520
+ };
1521
+ };
1522
+ } & {
1523
+ "/policies": {
1524
+ $get: {
1525
+ input: {};
1526
+ output: {
1527
+ data: {
1528
+ id: string;
1529
+ name: string;
1530
+ scope: "market" | "channel" | "global" | "product" | "option";
1531
+ policyType: "currency" | "custom" | "pickup" | "capability" | "occupancy" | "question" | "allotment" | "availability_window";
1532
+ productId: string | null;
1533
+ optionId: string | null;
1534
+ marketId: string | null;
1535
+ channelId: string | null;
1536
+ priority: number;
1537
+ active: boolean;
1538
+ conditions: {
1539
+ [x: string]: import("hono/utils/types").JSONValue;
1540
+ };
1541
+ effects: {
1542
+ [x: string]: import("hono/utils/types").JSONValue;
1543
+ };
1544
+ notes: string | null;
1545
+ metadata: {
1546
+ [x: string]: import("hono/utils/types").JSONValue;
1547
+ } | null;
1548
+ createdAt: string;
1549
+ updatedAt: string;
1550
+ }[];
1551
+ total: number;
1552
+ limit: number;
1553
+ offset: number;
1554
+ };
1555
+ outputFormat: "json";
1556
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1557
+ };
1558
+ };
1559
+ } & {
1560
+ "/policies": {
1561
+ $post: {
1562
+ input: {};
1563
+ output: {
1564
+ data: {
1565
+ id: string;
1566
+ active: boolean;
1567
+ metadata: {
1568
+ [x: string]: import("hono/utils/types").JSONValue;
1569
+ } | null;
1570
+ name: string;
1571
+ createdAt: string;
1572
+ updatedAt: string;
1573
+ marketId: string | null;
1574
+ notes: string | null;
1575
+ priority: number;
1576
+ productId: string | null;
1577
+ optionId: string | null;
1578
+ channelId: string | null;
1579
+ policyType: "currency" | "custom" | "pickup" | "capability" | "occupancy" | "question" | "allotment" | "availability_window";
1580
+ scope: "market" | "channel" | "global" | "product" | "option";
1581
+ conditions: {
1582
+ [x: string]: import("hono/utils/types").JSONValue;
1583
+ };
1584
+ effects: {
1585
+ [x: string]: import("hono/utils/types").JSONValue;
1586
+ };
1587
+ } | null;
1588
+ };
1589
+ outputFormat: "json";
1590
+ status: 201;
1591
+ };
1592
+ };
1593
+ } & {
1594
+ "/policies/:id": {
1595
+ $get: {
1596
+ input: {
1597
+ param: {
1598
+ id: string;
1599
+ };
1600
+ };
1601
+ output: {
1602
+ error: string;
1603
+ };
1604
+ outputFormat: "json";
1605
+ status: 404;
1606
+ } | {
1607
+ input: {
1608
+ param: {
1609
+ id: string;
1610
+ };
1611
+ };
1612
+ output: {
1613
+ data: {
1614
+ id: string;
1615
+ name: string;
1616
+ scope: "market" | "channel" | "global" | "product" | "option";
1617
+ policyType: "currency" | "custom" | "pickup" | "capability" | "occupancy" | "question" | "allotment" | "availability_window";
1618
+ productId: string | null;
1619
+ optionId: string | null;
1620
+ marketId: string | null;
1621
+ channelId: string | null;
1622
+ priority: number;
1623
+ active: boolean;
1624
+ conditions: {
1625
+ [x: string]: import("hono/utils/types").JSONValue;
1626
+ };
1627
+ effects: {
1628
+ [x: string]: import("hono/utils/types").JSONValue;
1629
+ };
1630
+ notes: string | null;
1631
+ metadata: {
1632
+ [x: string]: import("hono/utils/types").JSONValue;
1633
+ } | null;
1634
+ createdAt: string;
1635
+ updatedAt: string;
1636
+ };
1637
+ };
1638
+ outputFormat: "json";
1639
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1640
+ };
1641
+ };
1642
+ } & {
1643
+ "/policies/:id": {
1644
+ $patch: {
1645
+ input: {
1646
+ param: {
1647
+ id: string;
1648
+ };
1649
+ };
1650
+ output: {
1651
+ error: string;
1652
+ };
1653
+ outputFormat: "json";
1654
+ status: 404;
1655
+ } | {
1656
+ input: {
1657
+ param: {
1658
+ id: string;
1659
+ };
1660
+ };
1661
+ output: {
1662
+ data: {
1663
+ id: string;
1664
+ name: string;
1665
+ scope: "market" | "channel" | "global" | "product" | "option";
1666
+ policyType: "currency" | "custom" | "pickup" | "capability" | "occupancy" | "question" | "allotment" | "availability_window";
1667
+ productId: string | null;
1668
+ optionId: string | null;
1669
+ marketId: string | null;
1670
+ channelId: string | null;
1671
+ priority: number;
1672
+ active: boolean;
1673
+ conditions: {
1674
+ [x: string]: import("hono/utils/types").JSONValue;
1675
+ };
1676
+ effects: {
1677
+ [x: string]: import("hono/utils/types").JSONValue;
1678
+ };
1679
+ notes: string | null;
1680
+ metadata: {
1681
+ [x: string]: import("hono/utils/types").JSONValue;
1682
+ } | null;
1683
+ createdAt: string;
1684
+ updatedAt: string;
1685
+ };
1686
+ };
1687
+ outputFormat: "json";
1688
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1689
+ };
1690
+ };
1691
+ } & {
1692
+ "/policies/:id": {
1693
+ $delete: {
1694
+ input: {
1695
+ param: {
1696
+ id: string;
1697
+ };
1698
+ };
1699
+ output: {
1700
+ error: string;
1701
+ };
1702
+ outputFormat: "json";
1703
+ status: 404;
1704
+ } | {
1705
+ input: {
1706
+ param: {
1707
+ id: string;
1708
+ };
1709
+ };
1710
+ output: {
1711
+ success: true;
1712
+ };
1713
+ outputFormat: "json";
1714
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1715
+ };
1716
+ };
1717
+ } & {
1718
+ "/policy-results": {
1719
+ $get: {
1720
+ input: {};
1721
+ output: {
1722
+ data: {
1723
+ id: string;
1724
+ snapshotId: string;
1725
+ snapshotItemId: string | null;
1726
+ policyId: string | null;
1727
+ candidateIndex: number;
1728
+ status: "blocked" | "passed" | "warning" | "adjusted";
1729
+ message: string | null;
1730
+ details: {
1731
+ [x: string]: import("hono/utils/types").JSONValue;
1732
+ } | null;
1733
+ createdAt: string;
1734
+ }[];
1735
+ total: number;
1736
+ limit: number;
1737
+ offset: number;
1738
+ };
1739
+ outputFormat: "json";
1740
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1741
+ };
1742
+ };
1743
+ } & {
1744
+ "/policy-results": {
1745
+ $post: {
1746
+ input: {};
1747
+ output: {
1748
+ data: {
1749
+ id: string;
1750
+ status: "blocked" | "passed" | "warning" | "adjusted";
1751
+ snapshotId: string;
1752
+ message: string | null;
1753
+ createdAt: string;
1754
+ candidateIndex: number;
1755
+ snapshotItemId: string | null;
1756
+ policyId: string | null;
1757
+ details: {
1758
+ [x: string]: import("hono/utils/types").JSONValue;
1759
+ } | null;
1760
+ } | null;
1761
+ };
1762
+ outputFormat: "json";
1763
+ status: 201;
1764
+ };
1765
+ };
1766
+ } & {
1767
+ "/policy-results/:id": {
1768
+ $get: {
1769
+ input: {
1770
+ param: {
1771
+ id: string;
1772
+ };
1773
+ };
1774
+ output: {
1775
+ error: string;
1776
+ };
1777
+ outputFormat: "json";
1778
+ status: 404;
1779
+ } | {
1780
+ input: {
1781
+ param: {
1782
+ id: string;
1783
+ };
1784
+ };
1785
+ output: {
1786
+ data: {
1787
+ id: string;
1788
+ snapshotId: string;
1789
+ snapshotItemId: string | null;
1790
+ policyId: string | null;
1791
+ candidateIndex: number;
1792
+ status: "blocked" | "passed" | "warning" | "adjusted";
1793
+ message: string | null;
1794
+ details: {
1795
+ [x: string]: import("hono/utils/types").JSONValue;
1796
+ } | null;
1797
+ createdAt: string;
1798
+ };
1799
+ };
1800
+ outputFormat: "json";
1801
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1802
+ };
1803
+ };
1804
+ } & {
1805
+ "/policy-results/:id": {
1806
+ $patch: {
1807
+ input: {
1808
+ param: {
1809
+ id: string;
1810
+ };
1811
+ };
1812
+ output: {
1813
+ error: string;
1814
+ };
1815
+ outputFormat: "json";
1816
+ status: 404;
1817
+ } | {
1818
+ input: {
1819
+ param: {
1820
+ id: string;
1821
+ };
1822
+ };
1823
+ output: {
1824
+ data: {
1825
+ id: string;
1826
+ snapshotId: string;
1827
+ snapshotItemId: string | null;
1828
+ policyId: string | null;
1829
+ candidateIndex: number;
1830
+ status: "blocked" | "passed" | "warning" | "adjusted";
1831
+ message: string | null;
1832
+ details: {
1833
+ [x: string]: import("hono/utils/types").JSONValue;
1834
+ } | null;
1835
+ createdAt: string;
1836
+ };
1837
+ };
1838
+ outputFormat: "json";
1839
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1840
+ };
1841
+ };
1842
+ } & {
1843
+ "/policy-results/:id": {
1844
+ $delete: {
1845
+ input: {
1846
+ param: {
1847
+ id: string;
1848
+ };
1849
+ };
1850
+ output: {
1851
+ error: string;
1852
+ };
1853
+ outputFormat: "json";
1854
+ status: 404;
1855
+ } | {
1856
+ input: {
1857
+ param: {
1858
+ id: string;
1859
+ };
1860
+ };
1861
+ output: {
1862
+ success: true;
1863
+ };
1864
+ outputFormat: "json";
1865
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1866
+ };
1867
+ };
1868
+ } & {
1869
+ "/offer-refresh-runs": {
1870
+ $get: {
1871
+ input: {};
1872
+ output: {
1873
+ data: {
1874
+ id: string;
1875
+ offerId: string;
1876
+ snapshotId: string | null;
1877
+ status: "expired" | "pending" | "running" | "completed" | "failed";
1878
+ startedAt: string;
1879
+ completedAt: string | null;
1880
+ notes: string | null;
1881
+ metadata: {
1882
+ [x: string]: import("hono/utils/types").JSONValue;
1883
+ } | null;
1884
+ createdAt: string;
1885
+ updatedAt: string;
1886
+ }[];
1887
+ total: number;
1888
+ limit: number;
1889
+ offset: number;
1890
+ };
1891
+ outputFormat: "json";
1892
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1893
+ };
1894
+ };
1895
+ } & {
1896
+ "/offer-refresh-runs": {
1897
+ $post: {
1898
+ input: {};
1899
+ output: {
1900
+ data: {
1901
+ id: string;
1902
+ status: "expired" | "pending" | "running" | "completed" | "failed";
1903
+ snapshotId: string | null;
1904
+ metadata: {
1905
+ [x: string]: import("hono/utils/types").JSONValue;
1906
+ } | null;
1907
+ createdAt: string;
1908
+ updatedAt: string;
1909
+ notes: string | null;
1910
+ offerId: string;
1911
+ startedAt: string;
1912
+ completedAt: string | null;
1913
+ } | null;
1914
+ };
1915
+ outputFormat: "json";
1916
+ status: 201;
1917
+ };
1918
+ };
1919
+ } & {
1920
+ "/offer-refresh-runs/:id": {
1921
+ $get: {
1922
+ input: {
1923
+ param: {
1924
+ id: string;
1925
+ };
1926
+ };
1927
+ output: {
1928
+ error: string;
1929
+ };
1930
+ outputFormat: "json";
1931
+ status: 404;
1932
+ } | {
1933
+ input: {
1934
+ param: {
1935
+ id: string;
1936
+ };
1937
+ };
1938
+ output: {
1939
+ data: {
1940
+ id: string;
1941
+ offerId: string;
1942
+ snapshotId: string | null;
1943
+ status: "expired" | "pending" | "running" | "completed" | "failed";
1944
+ startedAt: string;
1945
+ completedAt: string | null;
1946
+ notes: string | null;
1947
+ metadata: {
1948
+ [x: string]: import("hono/utils/types").JSONValue;
1949
+ } | null;
1950
+ createdAt: string;
1951
+ updatedAt: string;
1952
+ };
1953
+ };
1954
+ outputFormat: "json";
1955
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1956
+ };
1957
+ };
1958
+ } & {
1959
+ "/offer-refresh-runs/:id": {
1960
+ $patch: {
1961
+ input: {
1962
+ param: {
1963
+ id: string;
1964
+ };
1965
+ };
1966
+ output: {
1967
+ error: string;
1968
+ };
1969
+ outputFormat: "json";
1970
+ status: 404;
1971
+ } | {
1972
+ input: {
1973
+ param: {
1974
+ id: string;
1975
+ };
1976
+ };
1977
+ output: {
1978
+ data: {
1979
+ id: string;
1980
+ offerId: string;
1981
+ snapshotId: string | null;
1982
+ status: "expired" | "pending" | "running" | "completed" | "failed";
1983
+ startedAt: string;
1984
+ completedAt: string | null;
1985
+ notes: string | null;
1986
+ metadata: {
1987
+ [x: string]: import("hono/utils/types").JSONValue;
1988
+ } | null;
1989
+ createdAt: string;
1990
+ updatedAt: string;
1991
+ };
1992
+ };
1993
+ outputFormat: "json";
1994
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1995
+ };
1996
+ };
1997
+ } & {
1998
+ "/offer-refresh-runs/:id": {
1999
+ $delete: {
2000
+ input: {
2001
+ param: {
2002
+ id: string;
2003
+ };
2004
+ };
2005
+ output: {
2006
+ error: string;
2007
+ };
2008
+ outputFormat: "json";
2009
+ status: 404;
2010
+ } | {
2011
+ input: {
2012
+ param: {
2013
+ id: string;
2014
+ };
2015
+ };
2016
+ output: {
2017
+ success: true;
2018
+ };
2019
+ outputFormat: "json";
2020
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2021
+ };
2022
+ };
2023
+ } & {
2024
+ "/offer-expiration-events": {
2025
+ $get: {
2026
+ input: {};
2027
+ output: {
2028
+ data: {
2029
+ id: string;
2030
+ offerId: string;
2031
+ snapshotId: string | null;
2032
+ expiresAt: string;
2033
+ expiredAt: string | null;
2034
+ status: "superseded" | "cancelled" | "scheduled" | "expired";
2035
+ reason: string | null;
2036
+ metadata: {
2037
+ [x: string]: import("hono/utils/types").JSONValue;
2038
+ } | null;
2039
+ createdAt: string;
2040
+ updatedAt: string;
2041
+ }[];
2042
+ total: number;
2043
+ limit: number;
2044
+ offset: number;
2045
+ };
2046
+ outputFormat: "json";
2047
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2048
+ };
2049
+ };
2050
+ } & {
2051
+ "/offer-expiration-events": {
2052
+ $post: {
2053
+ input: {};
2054
+ output: {
2055
+ data: {
2056
+ id: string;
2057
+ status: "superseded" | "cancelled" | "scheduled" | "expired";
2058
+ reason: string | null;
2059
+ snapshotId: string | null;
2060
+ metadata: {
2061
+ [x: string]: import("hono/utils/types").JSONValue;
2062
+ } | null;
2063
+ createdAt: string;
2064
+ updatedAt: string;
2065
+ offerId: string;
2066
+ expiresAt: string;
2067
+ expiredAt: string | null;
2068
+ } | null;
2069
+ };
2070
+ outputFormat: "json";
2071
+ status: 201;
2072
+ };
2073
+ };
2074
+ } & {
2075
+ "/offer-expiration-events/:id": {
2076
+ $get: {
2077
+ input: {
2078
+ param: {
2079
+ id: string;
2080
+ };
2081
+ };
2082
+ output: {
2083
+ error: string;
2084
+ };
2085
+ outputFormat: "json";
2086
+ status: 404;
2087
+ } | {
2088
+ input: {
2089
+ param: {
2090
+ id: string;
2091
+ };
2092
+ };
2093
+ output: {
2094
+ data: {
2095
+ id: string;
2096
+ offerId: string;
2097
+ snapshotId: string | null;
2098
+ expiresAt: string;
2099
+ expiredAt: string | null;
2100
+ status: "superseded" | "cancelled" | "scheduled" | "expired";
2101
+ reason: string | null;
2102
+ metadata: {
2103
+ [x: string]: import("hono/utils/types").JSONValue;
2104
+ } | null;
2105
+ createdAt: string;
2106
+ updatedAt: string;
2107
+ };
2108
+ };
2109
+ outputFormat: "json";
2110
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2111
+ };
2112
+ };
2113
+ } & {
2114
+ "/offer-expiration-events/:id": {
2115
+ $patch: {
2116
+ input: {
2117
+ param: {
2118
+ id: string;
2119
+ };
2120
+ };
2121
+ output: {
2122
+ error: string;
2123
+ };
2124
+ outputFormat: "json";
2125
+ status: 404;
2126
+ } | {
2127
+ input: {
2128
+ param: {
2129
+ id: string;
2130
+ };
2131
+ };
2132
+ output: {
2133
+ data: {
2134
+ id: string;
2135
+ offerId: string;
2136
+ snapshotId: string | null;
2137
+ expiresAt: string;
2138
+ expiredAt: string | null;
2139
+ status: "superseded" | "cancelled" | "scheduled" | "expired";
2140
+ reason: string | null;
2141
+ metadata: {
2142
+ [x: string]: import("hono/utils/types").JSONValue;
2143
+ } | null;
2144
+ createdAt: string;
2145
+ updatedAt: string;
2146
+ };
2147
+ };
2148
+ outputFormat: "json";
2149
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2150
+ };
2151
+ };
2152
+ } & {
2153
+ "/offer-expiration-events/:id": {
2154
+ $delete: {
2155
+ input: {
2156
+ param: {
2157
+ id: string;
2158
+ };
2159
+ };
2160
+ output: {
2161
+ error: string;
2162
+ };
2163
+ outputFormat: "json";
2164
+ status: 404;
2165
+ } | {
2166
+ input: {
2167
+ param: {
2168
+ id: string;
2169
+ };
2170
+ };
2171
+ output: {
2172
+ success: true;
2173
+ };
2174
+ outputFormat: "json";
2175
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2176
+ };
2177
+ };
2178
+ } & {
2179
+ "/explanations": {
2180
+ $get: {
2181
+ input: {};
2182
+ output: {
2183
+ data: {
2184
+ id: string;
2185
+ snapshotId: string;
2186
+ snapshotItemId: string | null;
2187
+ candidateIndex: number;
2188
+ explanationType: "pricing" | "blocked" | "sellable" | "policy" | "pickup" | "allotment" | "warning";
2189
+ code: string | null;
2190
+ message: string;
2191
+ details: {
2192
+ [x: string]: import("hono/utils/types").JSONValue;
2193
+ } | null;
2194
+ createdAt: string;
2195
+ }[];
2196
+ total: number;
2197
+ limit: number;
2198
+ offset: number;
2199
+ };
2200
+ outputFormat: "json";
2201
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2202
+ };
2203
+ };
2204
+ } & {
2205
+ "/explanations": {
2206
+ $post: {
2207
+ input: {};
2208
+ output: {
2209
+ data: {
2210
+ id: string;
2211
+ code: string | null;
2212
+ snapshotId: string;
2213
+ message: string;
2214
+ createdAt: string;
2215
+ candidateIndex: number;
2216
+ snapshotItemId: string | null;
2217
+ details: {
2218
+ [x: string]: import("hono/utils/types").JSONValue;
2219
+ } | null;
2220
+ explanationType: "pricing" | "blocked" | "sellable" | "policy" | "pickup" | "allotment" | "warning";
2221
+ } | null;
2222
+ };
2223
+ outputFormat: "json";
2224
+ status: 201;
2225
+ };
2226
+ };
2227
+ } & {
2228
+ "/explanations/:id": {
2229
+ $get: {
2230
+ input: {
2231
+ param: {
2232
+ id: string;
2233
+ };
2234
+ };
2235
+ output: {
2236
+ error: string;
2237
+ };
2238
+ outputFormat: "json";
2239
+ status: 404;
2240
+ } | {
2241
+ input: {
2242
+ param: {
2243
+ id: string;
2244
+ };
2245
+ };
2246
+ output: {
2247
+ data: {
2248
+ id: string;
2249
+ snapshotId: string;
2250
+ snapshotItemId: string | null;
2251
+ candidateIndex: number;
2252
+ explanationType: "pricing" | "blocked" | "sellable" | "policy" | "pickup" | "allotment" | "warning";
2253
+ code: string | null;
2254
+ message: string;
2255
+ details: {
2256
+ [x: string]: import("hono/utils/types").JSONValue;
2257
+ } | null;
2258
+ createdAt: string;
2259
+ };
2260
+ };
2261
+ outputFormat: "json";
2262
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2263
+ };
2264
+ };
2265
+ } & {
2266
+ "/explanations/:id": {
2267
+ $patch: {
2268
+ input: {
2269
+ param: {
2270
+ id: string;
2271
+ };
2272
+ };
2273
+ output: {
2274
+ error: string;
2275
+ };
2276
+ outputFormat: "json";
2277
+ status: 404;
2278
+ } | {
2279
+ input: {
2280
+ param: {
2281
+ id: string;
2282
+ };
2283
+ };
2284
+ output: {
2285
+ data: {
2286
+ id: string;
2287
+ snapshotId: string;
2288
+ snapshotItemId: string | null;
2289
+ candidateIndex: number;
2290
+ explanationType: "pricing" | "blocked" | "sellable" | "policy" | "pickup" | "allotment" | "warning";
2291
+ code: string | null;
2292
+ message: string;
2293
+ details: {
2294
+ [x: string]: import("hono/utils/types").JSONValue;
2295
+ } | null;
2296
+ createdAt: string;
2297
+ };
2298
+ };
2299
+ outputFormat: "json";
2300
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2301
+ };
2302
+ };
2303
+ } & {
2304
+ "/explanations/:id": {
2305
+ $delete: {
2306
+ input: {
2307
+ param: {
2308
+ id: string;
2309
+ };
2310
+ };
2311
+ output: {
2312
+ error: string;
2313
+ };
2314
+ outputFormat: "json";
2315
+ status: 404;
2316
+ } | {
2317
+ input: {
2318
+ param: {
2319
+ id: string;
2320
+ };
2321
+ };
2322
+ output: {
2323
+ success: true;
2324
+ };
2325
+ outputFormat: "json";
2326
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2327
+ };
2328
+ };
2329
+ }, "/", "/explanations/:id">;
2330
+ export type SellabilityRoutes = typeof sellabilityRoutes;
2331
+ export {};
2332
+ //# sourceMappingURL=routes.d.ts.map