@voyantjs/sellability 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.
@@ -0,0 +1,1382 @@
1
+ import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
2
+ type Env = {
3
+ Variables: {
4
+ db: PostgresJsDatabase;
5
+ userId?: string;
6
+ };
7
+ };
8
+ export declare const sellabilityRoutes: import("hono/hono-base").HonoBase<Env, {
9
+ "/resolve": {
10
+ $post: {
11
+ input: {};
12
+ output: {
13
+ data: {
14
+ product: {
15
+ id: string;
16
+ name: string;
17
+ };
18
+ option: {
19
+ id: string;
20
+ name: string;
21
+ code: string | null;
22
+ };
23
+ slot: {
24
+ id: string;
25
+ productId: string;
26
+ optionId: string | null;
27
+ startTimeId: string | null;
28
+ dateLocal: string;
29
+ startsAt: string;
30
+ timezone: string;
31
+ unlimited: boolean;
32
+ remainingPax: number | null;
33
+ remainingPickups: number | null;
34
+ pastCutoff: boolean;
35
+ tooEarly: boolean;
36
+ };
37
+ market: {
38
+ id: string;
39
+ code: string;
40
+ name: string;
41
+ } | null;
42
+ channel: {
43
+ id: string;
44
+ kind: "direct" | "affiliate" | "ota" | "reseller" | "marketplace" | "api_partner";
45
+ } | null;
46
+ sellability: {
47
+ mode: "on_request" | "sellable" | "unavailable";
48
+ onRequest: boolean;
49
+ allotmentStatus: "sellable" | "not_applicable";
50
+ };
51
+ pricing: {
52
+ currencyCode: string;
53
+ sellAmountCents: number;
54
+ costAmountCents: number;
55
+ marginAmountCents: number;
56
+ breakdown: {
57
+ requestRef: string | null;
58
+ unitId: string | null;
59
+ unitName: string | null;
60
+ unitType: string | null;
61
+ pricingCategoryId: string | null;
62
+ pricingCategoryName: string | null;
63
+ quantity: number;
64
+ pricingMode: string;
65
+ sellAmountCents: number;
66
+ costAmountCents: number;
67
+ sourceRuleId: string | null;
68
+ tierId: string | null;
69
+ }[];
70
+ components: {
71
+ kind: "base" | "unit" | "pickup" | "start_time_adjustment";
72
+ title: string;
73
+ quantity: number;
74
+ pricingMode: string;
75
+ sellAmountCents: number;
76
+ costAmountCents: number;
77
+ unitId: string | null;
78
+ unitName: string | null;
79
+ unitType: string | null;
80
+ pricingCategoryId: string | null;
81
+ pricingCategoryName: string | null;
82
+ requestRef: string | null;
83
+ sourceRuleId: string | null;
84
+ tierId: string | null;
85
+ }[];
86
+ fx: {
87
+ fxRateSetId: string;
88
+ baseCurrency: string;
89
+ quoteCurrency: string;
90
+ rateDecimal: number;
91
+ } | null;
92
+ };
93
+ sources: {
94
+ marketProductRuleId: string | null;
95
+ marketChannelRuleId: string | null;
96
+ marketPriceCatalogId: string | null;
97
+ optionPriceRuleId: string;
98
+ optionStartTimeRuleId: string | null;
99
+ channelInventoryAllotmentIds: string[];
100
+ channelInventoryReleaseRuleId: string | null;
101
+ };
102
+ }[];
103
+ meta: {
104
+ total: number;
105
+ };
106
+ };
107
+ outputFormat: "json";
108
+ status: import("hono/utils/http-status").ContentfulStatusCode;
109
+ };
110
+ };
111
+ } & {
112
+ "/resolve-and-persist": {
113
+ $post: {
114
+ input: {};
115
+ output: {
116
+ snapshot: {
117
+ id: string;
118
+ productId: string | null;
119
+ optionId: string | null;
120
+ createdAt: string;
121
+ updatedAt: string;
122
+ status: "expired" | "resolved" | "offer_constructed";
123
+ slotId: string | null;
124
+ channelId: string | null;
125
+ marketId: string | null;
126
+ fxRateSetId: string | null;
127
+ offerId: string | null;
128
+ expiresAt: string | null;
129
+ requestedCurrencyCode: string | null;
130
+ sourceCurrencyCode: string | null;
131
+ queryPayload: {
132
+ [x: string]: import("hono/utils/types").JSONValue;
133
+ };
134
+ pricingSummary: {
135
+ [x: string]: import("hono/utils/types").JSONValue;
136
+ };
137
+ };
138
+ resolved: {
139
+ data: {
140
+ product: {
141
+ id: string;
142
+ name: string;
143
+ };
144
+ option: {
145
+ id: string;
146
+ name: string;
147
+ code: string | null;
148
+ };
149
+ slot: {
150
+ id: string;
151
+ productId: string;
152
+ optionId: string | null;
153
+ startTimeId: string | null;
154
+ dateLocal: string;
155
+ startsAt: string;
156
+ timezone: string;
157
+ unlimited: boolean;
158
+ remainingPax: number | null;
159
+ remainingPickups: number | null;
160
+ pastCutoff: boolean;
161
+ tooEarly: boolean;
162
+ };
163
+ market: {
164
+ id: string;
165
+ code: string;
166
+ name: string;
167
+ } | null;
168
+ channel: {
169
+ id: string;
170
+ kind: "direct" | "affiliate" | "ota" | "reseller" | "marketplace" | "api_partner";
171
+ } | null;
172
+ sellability: {
173
+ mode: "on_request" | "sellable" | "unavailable";
174
+ onRequest: boolean;
175
+ allotmentStatus: "sellable" | "not_applicable";
176
+ };
177
+ pricing: {
178
+ currencyCode: string;
179
+ sellAmountCents: number;
180
+ costAmountCents: number;
181
+ marginAmountCents: number;
182
+ breakdown: {
183
+ requestRef: string | null;
184
+ unitId: string | null;
185
+ unitName: string | null;
186
+ unitType: string | null;
187
+ pricingCategoryId: string | null;
188
+ pricingCategoryName: string | null;
189
+ quantity: number;
190
+ pricingMode: string;
191
+ sellAmountCents: number;
192
+ costAmountCents: number;
193
+ sourceRuleId: string | null;
194
+ tierId: string | null;
195
+ }[];
196
+ components: {
197
+ kind: "base" | "unit" | "pickup" | "start_time_adjustment";
198
+ title: string;
199
+ quantity: number;
200
+ pricingMode: string;
201
+ sellAmountCents: number;
202
+ costAmountCents: number;
203
+ unitId: string | null;
204
+ unitName: string | null;
205
+ unitType: string | null;
206
+ pricingCategoryId: string | null;
207
+ pricingCategoryName: string | null;
208
+ requestRef: string | null;
209
+ sourceRuleId: string | null;
210
+ tierId: string | null;
211
+ }[];
212
+ fx: {
213
+ fxRateSetId: string;
214
+ baseCurrency: string;
215
+ quoteCurrency: string;
216
+ rateDecimal: number;
217
+ } | null;
218
+ };
219
+ sources: {
220
+ marketProductRuleId: string | null;
221
+ marketChannelRuleId: string | null;
222
+ marketPriceCatalogId: string | null;
223
+ optionPriceRuleId: string;
224
+ optionStartTimeRuleId: string | null;
225
+ channelInventoryAllotmentIds: string[];
226
+ channelInventoryReleaseRuleId: string | null;
227
+ };
228
+ }[];
229
+ meta: {
230
+ total: number;
231
+ };
232
+ };
233
+ };
234
+ outputFormat: "json";
235
+ status: 201;
236
+ };
237
+ };
238
+ } & {
239
+ "/construct-offer": {
240
+ $post: {
241
+ input: {};
242
+ output: {
243
+ error: string;
244
+ };
245
+ outputFormat: "json";
246
+ status: 404;
247
+ } | {
248
+ input: {};
249
+ output: {
250
+ data: {
251
+ resolution: {
252
+ product: {
253
+ id: string;
254
+ name: string;
255
+ };
256
+ option: {
257
+ id: string;
258
+ name: string;
259
+ code: string | null;
260
+ };
261
+ slot: {
262
+ id: string;
263
+ productId: string;
264
+ optionId: string | null;
265
+ startTimeId: string | null;
266
+ dateLocal: string;
267
+ startsAt: string;
268
+ timezone: string;
269
+ unlimited: boolean;
270
+ remainingPax: number | null;
271
+ remainingPickups: number | null;
272
+ pastCutoff: boolean;
273
+ tooEarly: boolean;
274
+ };
275
+ market: {
276
+ id: string;
277
+ code: string;
278
+ name: string;
279
+ } | null;
280
+ channel: {
281
+ id: string;
282
+ kind: "direct" | "affiliate" | "ota" | "reseller" | "marketplace" | "api_partner";
283
+ } | null;
284
+ sellability: {
285
+ mode: "on_request" | "sellable" | "unavailable";
286
+ onRequest: boolean;
287
+ allotmentStatus: "sellable" | "not_applicable";
288
+ };
289
+ pricing: {
290
+ currencyCode: string;
291
+ sellAmountCents: number;
292
+ costAmountCents: number;
293
+ marginAmountCents: number;
294
+ breakdown: {
295
+ requestRef: string | null;
296
+ unitId: string | null;
297
+ unitName: string | null;
298
+ unitType: string | null;
299
+ pricingCategoryId: string | null;
300
+ pricingCategoryName: string | null;
301
+ quantity: number;
302
+ pricingMode: string;
303
+ sellAmountCents: number;
304
+ costAmountCents: number;
305
+ sourceRuleId: string | null;
306
+ tierId: string | null;
307
+ }[];
308
+ components: {
309
+ kind: "base" | "unit" | "pickup" | "start_time_adjustment";
310
+ title: string;
311
+ quantity: number;
312
+ pricingMode: string;
313
+ sellAmountCents: number;
314
+ costAmountCents: number;
315
+ unitId: string | null;
316
+ unitName: string | null;
317
+ unitType: string | null;
318
+ pricingCategoryId: string | null;
319
+ pricingCategoryName: string | null;
320
+ requestRef: string | null;
321
+ sourceRuleId: string | null;
322
+ tierId: string | null;
323
+ }[];
324
+ fx: {
325
+ fxRateSetId: string;
326
+ baseCurrency: string;
327
+ quoteCurrency: string;
328
+ rateDecimal: number;
329
+ } | null;
330
+ };
331
+ sources: {
332
+ marketProductRuleId: string | null;
333
+ marketChannelRuleId: string | null;
334
+ marketPriceCatalogId: string | null;
335
+ optionPriceRuleId: string;
336
+ optionStartTimeRuleId: string | null;
337
+ channelInventoryAllotmentIds: string[];
338
+ channelInventoryReleaseRuleId: string | null;
339
+ };
340
+ };
341
+ snapshot: {
342
+ id: string;
343
+ productId: string | null;
344
+ optionId: string | null;
345
+ createdAt: string;
346
+ updatedAt: string;
347
+ status: "expired" | "resolved" | "offer_constructed";
348
+ slotId: string | null;
349
+ channelId: string | null;
350
+ marketId: string | null;
351
+ fxRateSetId: string | null;
352
+ offerId: string | null;
353
+ expiresAt: string | null;
354
+ requestedCurrencyCode: string | null;
355
+ sourceCurrencyCode: string | null;
356
+ queryPayload: {
357
+ [x: string]: import("hono/utils/types").JSONValue;
358
+ };
359
+ pricingSummary: {
360
+ [x: string]: import("hono/utils/types").JSONValue;
361
+ };
362
+ };
363
+ offer: {
364
+ id: string;
365
+ createdAt: string;
366
+ updatedAt: string;
367
+ status: "draft" | "expired" | "published" | "sent" | "accepted" | "withdrawn" | "converted";
368
+ notes: string | null;
369
+ costAmountCents: number;
370
+ title: string;
371
+ metadata: import("hono/utils/types").JSONValue;
372
+ validFrom: string | null;
373
+ currency: string;
374
+ marketId: string | null;
375
+ baseCurrency: string | null;
376
+ fxRateSetId: string | null;
377
+ offerNumber: string;
378
+ personId: string | null;
379
+ organizationId: string | null;
380
+ opportunityId: string | null;
381
+ quoteId: string | null;
382
+ sourceChannelId: string | null;
383
+ subtotalAmountCents: number;
384
+ taxAmountCents: number;
385
+ feeAmountCents: number;
386
+ totalAmountCents: number;
387
+ validUntil: string | null;
388
+ sentAt: string | null;
389
+ acceptedAt: string | null;
390
+ convertedAt: string | null;
391
+ };
392
+ participants: {
393
+ id: string;
394
+ offerId: string;
395
+ personId: string | null;
396
+ participantType: "staff" | "other" | "traveler" | "booker" | "contact" | "occupant";
397
+ travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
398
+ firstName: string;
399
+ lastName: string;
400
+ email: string | null;
401
+ phone: string | null;
402
+ preferredLanguage: string | null;
403
+ isPrimary: boolean;
404
+ notes: string | null;
405
+ hasTravelIdentity: boolean;
406
+ createdAt: string;
407
+ updatedAt: string;
408
+ }[];
409
+ items: {
410
+ id: string;
411
+ productId: string | null;
412
+ optionId: string | null;
413
+ createdAt: string;
414
+ updatedAt: string;
415
+ startsAt: string | null;
416
+ endsAt: string | null;
417
+ status: "cancelled" | "draft" | "confirmed" | "fulfilled" | "priced";
418
+ notes: string | null;
419
+ slotId: string | null;
420
+ description: string | null;
421
+ sellCurrency: string;
422
+ title: string;
423
+ unitId: string | null;
424
+ costCurrency: string | null;
425
+ quantity: number;
426
+ metadata: import("hono/utils/types").JSONValue;
427
+ taxAmountCents: number | null;
428
+ feeAmountCents: number | null;
429
+ offerId: string;
430
+ itemType: "service" | "other" | "accommodation" | "transport" | "unit" | "adjustment" | "extra" | "fee" | "tax" | "discount";
431
+ serviceDate: string | null;
432
+ unitSellAmountCents: number | null;
433
+ totalSellAmountCents: number | null;
434
+ unitCostAmountCents: number | null;
435
+ totalCostAmountCents: number | null;
436
+ }[];
437
+ itemParticipants: {
438
+ id: string;
439
+ createdAt: string;
440
+ isPrimary: boolean;
441
+ role: "other" | "traveler" | "occupant" | "primary_contact" | "beneficiary" | "service_assignee";
442
+ offerItemId: string;
443
+ participantId: string;
444
+ }[];
445
+ };
446
+ };
447
+ outputFormat: "json";
448
+ status: 201;
449
+ };
450
+ };
451
+ } & {
452
+ "/snapshots": {
453
+ $get: {
454
+ input: {};
455
+ output: {
456
+ data: {
457
+ id: string;
458
+ offerId: string | null;
459
+ marketId: string | null;
460
+ channelId: string | null;
461
+ productId: string | null;
462
+ optionId: string | null;
463
+ slotId: string | null;
464
+ requestedCurrencyCode: string | null;
465
+ sourceCurrencyCode: string | null;
466
+ fxRateSetId: string | null;
467
+ status: "expired" | "resolved" | "offer_constructed";
468
+ queryPayload: {
469
+ [x: string]: import("hono/utils/types").JSONValue;
470
+ };
471
+ pricingSummary: {
472
+ [x: string]: import("hono/utils/types").JSONValue;
473
+ };
474
+ expiresAt: string | null;
475
+ createdAt: string;
476
+ updatedAt: string;
477
+ }[];
478
+ total: number;
479
+ limit: number;
480
+ offset: number;
481
+ };
482
+ outputFormat: "json";
483
+ status: import("hono/utils/http-status").ContentfulStatusCode;
484
+ };
485
+ };
486
+ } & {
487
+ "/snapshots/:id": {
488
+ $get: {
489
+ input: {
490
+ param: {
491
+ id: string;
492
+ };
493
+ };
494
+ output: {
495
+ error: string;
496
+ };
497
+ outputFormat: "json";
498
+ status: 404;
499
+ } | {
500
+ input: {
501
+ param: {
502
+ id: string;
503
+ };
504
+ };
505
+ output: {
506
+ data: {
507
+ id: string;
508
+ offerId: string | null;
509
+ marketId: string | null;
510
+ channelId: string | null;
511
+ productId: string | null;
512
+ optionId: string | null;
513
+ slotId: string | null;
514
+ requestedCurrencyCode: string | null;
515
+ sourceCurrencyCode: string | null;
516
+ fxRateSetId: string | null;
517
+ status: "expired" | "resolved" | "offer_constructed";
518
+ queryPayload: {
519
+ [x: string]: import("hono/utils/types").JSONValue;
520
+ };
521
+ pricingSummary: {
522
+ [x: string]: import("hono/utils/types").JSONValue;
523
+ };
524
+ expiresAt: string | null;
525
+ createdAt: string;
526
+ updatedAt: string;
527
+ };
528
+ };
529
+ outputFormat: "json";
530
+ status: import("hono/utils/http-status").ContentfulStatusCode;
531
+ };
532
+ };
533
+ } & {
534
+ "/snapshot-items": {
535
+ $get: {
536
+ input: {};
537
+ output: {
538
+ data: {
539
+ id: string;
540
+ snapshotId: string;
541
+ candidateIndex: number;
542
+ componentIndex: number;
543
+ productId: string | null;
544
+ optionId: string | null;
545
+ slotId: string | null;
546
+ unitId: string | null;
547
+ requestRef: string | null;
548
+ componentKind: "pickup" | "unit" | "base" | "start_time_adjustment";
549
+ title: string;
550
+ quantity: number;
551
+ pricingMode: string;
552
+ pricingCategoryId: string | null;
553
+ pricingCategoryName: string | null;
554
+ unitName: string | null;
555
+ unitType: string | null;
556
+ currencyCode: string;
557
+ sellAmountCents: number;
558
+ costAmountCents: number;
559
+ sourceRuleId: string | null;
560
+ tierId: string | null;
561
+ isSelected: boolean;
562
+ createdAt: string;
563
+ }[];
564
+ total: number;
565
+ limit: number;
566
+ offset: number;
567
+ };
568
+ outputFormat: "json";
569
+ status: import("hono/utils/http-status").ContentfulStatusCode;
570
+ };
571
+ };
572
+ } & {
573
+ "/policies": {
574
+ $get: {
575
+ input: {};
576
+ output: {
577
+ data: {
578
+ id: string;
579
+ name: string;
580
+ scope: "product" | "option" | "channel" | "market" | "global";
581
+ policyType: "pickup" | "custom" | "capability" | "question" | "currency" | "allotment" | "occupancy" | "availability_window";
582
+ productId: string | null;
583
+ optionId: string | null;
584
+ marketId: string | null;
585
+ channelId: string | null;
586
+ priority: number;
587
+ active: boolean;
588
+ conditions: {
589
+ [x: string]: import("hono/utils/types").JSONValue;
590
+ };
591
+ effects: {
592
+ [x: string]: import("hono/utils/types").JSONValue;
593
+ };
594
+ notes: string | null;
595
+ metadata: {
596
+ [x: string]: import("hono/utils/types").JSONValue;
597
+ } | null;
598
+ createdAt: string;
599
+ updatedAt: string;
600
+ }[];
601
+ total: number;
602
+ limit: number;
603
+ offset: number;
604
+ };
605
+ outputFormat: "json";
606
+ status: import("hono/utils/http-status").ContentfulStatusCode;
607
+ };
608
+ };
609
+ } & {
610
+ "/policies": {
611
+ $post: {
612
+ input: {};
613
+ output: {
614
+ data: {
615
+ id: string;
616
+ name: string;
617
+ productId: string | null;
618
+ optionId: string | null;
619
+ active: boolean;
620
+ createdAt: string;
621
+ updatedAt: string;
622
+ notes: string | null;
623
+ metadata: {
624
+ [x: string]: import("hono/utils/types").JSONValue;
625
+ } | null;
626
+ channelId: string | null;
627
+ scope: "product" | "option" | "channel" | "market" | "global";
628
+ marketId: string | null;
629
+ priority: number;
630
+ policyType: "pickup" | "custom" | "capability" | "question" | "currency" | "allotment" | "occupancy" | "availability_window";
631
+ conditions: {
632
+ [x: string]: import("hono/utils/types").JSONValue;
633
+ };
634
+ effects: {
635
+ [x: string]: import("hono/utils/types").JSONValue;
636
+ };
637
+ } | null;
638
+ };
639
+ outputFormat: "json";
640
+ status: 201;
641
+ };
642
+ };
643
+ } & {
644
+ "/policies/:id": {
645
+ $get: {
646
+ input: {
647
+ param: {
648
+ id: string;
649
+ };
650
+ };
651
+ output: {
652
+ error: string;
653
+ };
654
+ outputFormat: "json";
655
+ status: 404;
656
+ } | {
657
+ input: {
658
+ param: {
659
+ id: string;
660
+ };
661
+ };
662
+ output: {
663
+ data: {
664
+ id: string;
665
+ name: string;
666
+ scope: "product" | "option" | "channel" | "market" | "global";
667
+ policyType: "pickup" | "custom" | "capability" | "question" | "currency" | "allotment" | "occupancy" | "availability_window";
668
+ productId: string | null;
669
+ optionId: string | null;
670
+ marketId: string | null;
671
+ channelId: string | null;
672
+ priority: number;
673
+ active: boolean;
674
+ conditions: {
675
+ [x: string]: import("hono/utils/types").JSONValue;
676
+ };
677
+ effects: {
678
+ [x: string]: import("hono/utils/types").JSONValue;
679
+ };
680
+ notes: string | null;
681
+ metadata: {
682
+ [x: string]: import("hono/utils/types").JSONValue;
683
+ } | null;
684
+ createdAt: string;
685
+ updatedAt: string;
686
+ };
687
+ };
688
+ outputFormat: "json";
689
+ status: import("hono/utils/http-status").ContentfulStatusCode;
690
+ };
691
+ };
692
+ } & {
693
+ "/policies/:id": {
694
+ $patch: {
695
+ input: {
696
+ param: {
697
+ id: string;
698
+ };
699
+ };
700
+ output: {
701
+ error: string;
702
+ };
703
+ outputFormat: "json";
704
+ status: 404;
705
+ } | {
706
+ input: {
707
+ param: {
708
+ id: string;
709
+ };
710
+ };
711
+ output: {
712
+ data: {
713
+ id: string;
714
+ name: string;
715
+ scope: "product" | "option" | "channel" | "market" | "global";
716
+ policyType: "pickup" | "custom" | "capability" | "question" | "currency" | "allotment" | "occupancy" | "availability_window";
717
+ productId: string | null;
718
+ optionId: string | null;
719
+ marketId: string | null;
720
+ channelId: string | null;
721
+ priority: number;
722
+ active: boolean;
723
+ conditions: {
724
+ [x: string]: import("hono/utils/types").JSONValue;
725
+ };
726
+ effects: {
727
+ [x: string]: import("hono/utils/types").JSONValue;
728
+ };
729
+ notes: string | null;
730
+ metadata: {
731
+ [x: string]: import("hono/utils/types").JSONValue;
732
+ } | null;
733
+ createdAt: string;
734
+ updatedAt: string;
735
+ };
736
+ };
737
+ outputFormat: "json";
738
+ status: import("hono/utils/http-status").ContentfulStatusCode;
739
+ };
740
+ };
741
+ } & {
742
+ "/policies/:id": {
743
+ $delete: {
744
+ input: {
745
+ param: {
746
+ id: string;
747
+ };
748
+ };
749
+ output: {
750
+ error: string;
751
+ };
752
+ outputFormat: "json";
753
+ status: 404;
754
+ } | {
755
+ input: {
756
+ param: {
757
+ id: string;
758
+ };
759
+ };
760
+ output: {
761
+ success: true;
762
+ };
763
+ outputFormat: "json";
764
+ status: import("hono/utils/http-status").ContentfulStatusCode;
765
+ };
766
+ };
767
+ } & {
768
+ "/policy-results": {
769
+ $get: {
770
+ input: {};
771
+ output: {
772
+ data: {
773
+ id: string;
774
+ snapshotId: string;
775
+ snapshotItemId: string | null;
776
+ policyId: string | null;
777
+ candidateIndex: number;
778
+ status: "warning" | "passed" | "blocked" | "adjusted";
779
+ message: string | null;
780
+ details: {
781
+ [x: string]: import("hono/utils/types").JSONValue;
782
+ } | null;
783
+ createdAt: string;
784
+ }[];
785
+ total: number;
786
+ limit: number;
787
+ offset: number;
788
+ };
789
+ outputFormat: "json";
790
+ status: import("hono/utils/http-status").ContentfulStatusCode;
791
+ };
792
+ };
793
+ } & {
794
+ "/policy-results": {
795
+ $post: {
796
+ input: {};
797
+ output: {
798
+ data: {
799
+ message: string | null;
800
+ id: string;
801
+ createdAt: string;
802
+ status: "warning" | "passed" | "blocked" | "adjusted";
803
+ snapshotId: string;
804
+ candidateIndex: number;
805
+ snapshotItemId: string | null;
806
+ policyId: string | null;
807
+ details: {
808
+ [x: string]: import("hono/utils/types").JSONValue;
809
+ } | null;
810
+ } | null;
811
+ };
812
+ outputFormat: "json";
813
+ status: 201;
814
+ };
815
+ };
816
+ } & {
817
+ "/policy-results/:id": {
818
+ $get: {
819
+ input: {
820
+ param: {
821
+ id: string;
822
+ };
823
+ };
824
+ output: {
825
+ error: string;
826
+ };
827
+ outputFormat: "json";
828
+ status: 404;
829
+ } | {
830
+ input: {
831
+ param: {
832
+ id: string;
833
+ };
834
+ };
835
+ output: {
836
+ data: {
837
+ id: string;
838
+ snapshotId: string;
839
+ snapshotItemId: string | null;
840
+ policyId: string | null;
841
+ candidateIndex: number;
842
+ status: "warning" | "passed" | "blocked" | "adjusted";
843
+ message: string | null;
844
+ details: {
845
+ [x: string]: import("hono/utils/types").JSONValue;
846
+ } | null;
847
+ createdAt: string;
848
+ };
849
+ };
850
+ outputFormat: "json";
851
+ status: import("hono/utils/http-status").ContentfulStatusCode;
852
+ };
853
+ };
854
+ } & {
855
+ "/policy-results/:id": {
856
+ $patch: {
857
+ input: {
858
+ param: {
859
+ id: string;
860
+ };
861
+ };
862
+ output: {
863
+ error: string;
864
+ };
865
+ outputFormat: "json";
866
+ status: 404;
867
+ } | {
868
+ input: {
869
+ param: {
870
+ id: string;
871
+ };
872
+ };
873
+ output: {
874
+ data: {
875
+ id: string;
876
+ snapshotId: string;
877
+ snapshotItemId: string | null;
878
+ policyId: string | null;
879
+ candidateIndex: number;
880
+ status: "warning" | "passed" | "blocked" | "adjusted";
881
+ message: string | null;
882
+ details: {
883
+ [x: string]: import("hono/utils/types").JSONValue;
884
+ } | null;
885
+ createdAt: string;
886
+ };
887
+ };
888
+ outputFormat: "json";
889
+ status: import("hono/utils/http-status").ContentfulStatusCode;
890
+ };
891
+ };
892
+ } & {
893
+ "/policy-results/:id": {
894
+ $delete: {
895
+ input: {
896
+ param: {
897
+ id: string;
898
+ };
899
+ };
900
+ output: {
901
+ error: string;
902
+ };
903
+ outputFormat: "json";
904
+ status: 404;
905
+ } | {
906
+ input: {
907
+ param: {
908
+ id: string;
909
+ };
910
+ };
911
+ output: {
912
+ success: true;
913
+ };
914
+ outputFormat: "json";
915
+ status: import("hono/utils/http-status").ContentfulStatusCode;
916
+ };
917
+ };
918
+ } & {
919
+ "/offer-refresh-runs": {
920
+ $get: {
921
+ input: {};
922
+ output: {
923
+ data: {
924
+ id: string;
925
+ offerId: string;
926
+ snapshotId: string | null;
927
+ status: "pending" | "expired" | "failed" | "running" | "completed";
928
+ startedAt: string;
929
+ completedAt: string | null;
930
+ notes: string | null;
931
+ metadata: {
932
+ [x: string]: import("hono/utils/types").JSONValue;
933
+ } | null;
934
+ createdAt: string;
935
+ updatedAt: string;
936
+ }[];
937
+ total: number;
938
+ limit: number;
939
+ offset: number;
940
+ };
941
+ outputFormat: "json";
942
+ status: import("hono/utils/http-status").ContentfulStatusCode;
943
+ };
944
+ };
945
+ } & {
946
+ "/offer-refresh-runs": {
947
+ $post: {
948
+ input: {};
949
+ output: {
950
+ data: {
951
+ id: string;
952
+ createdAt: string;
953
+ updatedAt: string;
954
+ status: "pending" | "expired" | "failed" | "running" | "completed";
955
+ notes: string | null;
956
+ metadata: {
957
+ [x: string]: import("hono/utils/types").JSONValue;
958
+ } | null;
959
+ startedAt: string;
960
+ completedAt: string | null;
961
+ offerId: string;
962
+ snapshotId: string | null;
963
+ } | null;
964
+ };
965
+ outputFormat: "json";
966
+ status: 201;
967
+ };
968
+ };
969
+ } & {
970
+ "/offer-refresh-runs/:id": {
971
+ $get: {
972
+ input: {
973
+ param: {
974
+ id: string;
975
+ };
976
+ };
977
+ output: {
978
+ error: string;
979
+ };
980
+ outputFormat: "json";
981
+ status: 404;
982
+ } | {
983
+ input: {
984
+ param: {
985
+ id: string;
986
+ };
987
+ };
988
+ output: {
989
+ data: {
990
+ id: string;
991
+ offerId: string;
992
+ snapshotId: string | null;
993
+ status: "pending" | "expired" | "failed" | "running" | "completed";
994
+ startedAt: string;
995
+ completedAt: string | null;
996
+ notes: string | null;
997
+ metadata: {
998
+ [x: string]: import("hono/utils/types").JSONValue;
999
+ } | null;
1000
+ createdAt: string;
1001
+ updatedAt: string;
1002
+ };
1003
+ };
1004
+ outputFormat: "json";
1005
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1006
+ };
1007
+ };
1008
+ } & {
1009
+ "/offer-refresh-runs/:id": {
1010
+ $patch: {
1011
+ input: {
1012
+ param: {
1013
+ id: string;
1014
+ };
1015
+ };
1016
+ output: {
1017
+ error: string;
1018
+ };
1019
+ outputFormat: "json";
1020
+ status: 404;
1021
+ } | {
1022
+ input: {
1023
+ param: {
1024
+ id: string;
1025
+ };
1026
+ };
1027
+ output: {
1028
+ data: {
1029
+ id: string;
1030
+ offerId: string;
1031
+ snapshotId: string | null;
1032
+ status: "pending" | "expired" | "failed" | "running" | "completed";
1033
+ startedAt: string;
1034
+ completedAt: string | null;
1035
+ notes: string | null;
1036
+ metadata: {
1037
+ [x: string]: import("hono/utils/types").JSONValue;
1038
+ } | null;
1039
+ createdAt: string;
1040
+ updatedAt: string;
1041
+ };
1042
+ };
1043
+ outputFormat: "json";
1044
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1045
+ };
1046
+ };
1047
+ } & {
1048
+ "/offer-refresh-runs/:id": {
1049
+ $delete: {
1050
+ input: {
1051
+ param: {
1052
+ id: string;
1053
+ };
1054
+ };
1055
+ output: {
1056
+ error: string;
1057
+ };
1058
+ outputFormat: "json";
1059
+ status: 404;
1060
+ } | {
1061
+ input: {
1062
+ param: {
1063
+ id: string;
1064
+ };
1065
+ };
1066
+ output: {
1067
+ success: true;
1068
+ };
1069
+ outputFormat: "json";
1070
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1071
+ };
1072
+ };
1073
+ } & {
1074
+ "/offer-expiration-events": {
1075
+ $get: {
1076
+ input: {};
1077
+ output: {
1078
+ data: {
1079
+ id: string;
1080
+ offerId: string;
1081
+ snapshotId: string | null;
1082
+ expiresAt: string;
1083
+ expiredAt: string | null;
1084
+ status: "cancelled" | "scheduled" | "expired" | "superseded";
1085
+ reason: string | null;
1086
+ metadata: {
1087
+ [x: string]: import("hono/utils/types").JSONValue;
1088
+ } | null;
1089
+ createdAt: string;
1090
+ updatedAt: string;
1091
+ }[];
1092
+ total: number;
1093
+ limit: number;
1094
+ offset: number;
1095
+ };
1096
+ outputFormat: "json";
1097
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1098
+ };
1099
+ };
1100
+ } & {
1101
+ "/offer-expiration-events": {
1102
+ $post: {
1103
+ input: {};
1104
+ output: {
1105
+ data: {
1106
+ id: string;
1107
+ createdAt: string;
1108
+ updatedAt: string;
1109
+ status: "cancelled" | "scheduled" | "expired" | "superseded";
1110
+ reason: string | null;
1111
+ metadata: {
1112
+ [x: string]: import("hono/utils/types").JSONValue;
1113
+ } | null;
1114
+ offerId: string;
1115
+ expiresAt: string;
1116
+ snapshotId: string | null;
1117
+ expiredAt: string | null;
1118
+ } | null;
1119
+ };
1120
+ outputFormat: "json";
1121
+ status: 201;
1122
+ };
1123
+ };
1124
+ } & {
1125
+ "/offer-expiration-events/:id": {
1126
+ $get: {
1127
+ input: {
1128
+ param: {
1129
+ id: string;
1130
+ };
1131
+ };
1132
+ output: {
1133
+ error: string;
1134
+ };
1135
+ outputFormat: "json";
1136
+ status: 404;
1137
+ } | {
1138
+ input: {
1139
+ param: {
1140
+ id: string;
1141
+ };
1142
+ };
1143
+ output: {
1144
+ data: {
1145
+ id: string;
1146
+ offerId: string;
1147
+ snapshotId: string | null;
1148
+ expiresAt: string;
1149
+ expiredAt: string | null;
1150
+ status: "cancelled" | "scheduled" | "expired" | "superseded";
1151
+ reason: string | null;
1152
+ metadata: {
1153
+ [x: string]: import("hono/utils/types").JSONValue;
1154
+ } | null;
1155
+ createdAt: string;
1156
+ updatedAt: string;
1157
+ };
1158
+ };
1159
+ outputFormat: "json";
1160
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1161
+ };
1162
+ };
1163
+ } & {
1164
+ "/offer-expiration-events/:id": {
1165
+ $patch: {
1166
+ input: {
1167
+ param: {
1168
+ id: string;
1169
+ };
1170
+ };
1171
+ output: {
1172
+ error: string;
1173
+ };
1174
+ outputFormat: "json";
1175
+ status: 404;
1176
+ } | {
1177
+ input: {
1178
+ param: {
1179
+ id: string;
1180
+ };
1181
+ };
1182
+ output: {
1183
+ data: {
1184
+ id: string;
1185
+ offerId: string;
1186
+ snapshotId: string | null;
1187
+ expiresAt: string;
1188
+ expiredAt: string | null;
1189
+ status: "cancelled" | "scheduled" | "expired" | "superseded";
1190
+ reason: string | null;
1191
+ metadata: {
1192
+ [x: string]: import("hono/utils/types").JSONValue;
1193
+ } | null;
1194
+ createdAt: string;
1195
+ updatedAt: string;
1196
+ };
1197
+ };
1198
+ outputFormat: "json";
1199
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1200
+ };
1201
+ };
1202
+ } & {
1203
+ "/offer-expiration-events/:id": {
1204
+ $delete: {
1205
+ input: {
1206
+ param: {
1207
+ id: string;
1208
+ };
1209
+ };
1210
+ output: {
1211
+ error: string;
1212
+ };
1213
+ outputFormat: "json";
1214
+ status: 404;
1215
+ } | {
1216
+ input: {
1217
+ param: {
1218
+ id: string;
1219
+ };
1220
+ };
1221
+ output: {
1222
+ success: true;
1223
+ };
1224
+ outputFormat: "json";
1225
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1226
+ };
1227
+ };
1228
+ } & {
1229
+ "/explanations": {
1230
+ $get: {
1231
+ input: {};
1232
+ output: {
1233
+ data: {
1234
+ id: string;
1235
+ snapshotId: string;
1236
+ snapshotItemId: string | null;
1237
+ candidateIndex: number;
1238
+ explanationType: "pickup" | "policy" | "warning" | "allotment" | "sellable" | "pricing" | "blocked";
1239
+ code: string | null;
1240
+ message: string;
1241
+ details: {
1242
+ [x: string]: import("hono/utils/types").JSONValue;
1243
+ } | null;
1244
+ createdAt: string;
1245
+ }[];
1246
+ total: number;
1247
+ limit: number;
1248
+ offset: number;
1249
+ };
1250
+ outputFormat: "json";
1251
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1252
+ };
1253
+ };
1254
+ } & {
1255
+ "/explanations": {
1256
+ $post: {
1257
+ input: {};
1258
+ output: {
1259
+ data: {
1260
+ message: string;
1261
+ id: string;
1262
+ createdAt: string;
1263
+ code: string | null;
1264
+ snapshotId: string;
1265
+ candidateIndex: number;
1266
+ snapshotItemId: string | null;
1267
+ details: {
1268
+ [x: string]: import("hono/utils/types").JSONValue;
1269
+ } | null;
1270
+ explanationType: "pickup" | "policy" | "warning" | "allotment" | "sellable" | "pricing" | "blocked";
1271
+ } | null;
1272
+ };
1273
+ outputFormat: "json";
1274
+ status: 201;
1275
+ };
1276
+ };
1277
+ } & {
1278
+ "/explanations/:id": {
1279
+ $get: {
1280
+ input: {
1281
+ param: {
1282
+ id: string;
1283
+ };
1284
+ };
1285
+ output: {
1286
+ error: string;
1287
+ };
1288
+ outputFormat: "json";
1289
+ status: 404;
1290
+ } | {
1291
+ input: {
1292
+ param: {
1293
+ id: string;
1294
+ };
1295
+ };
1296
+ output: {
1297
+ data: {
1298
+ id: string;
1299
+ snapshotId: string;
1300
+ snapshotItemId: string | null;
1301
+ candidateIndex: number;
1302
+ explanationType: "pickup" | "policy" | "warning" | "allotment" | "sellable" | "pricing" | "blocked";
1303
+ code: string | null;
1304
+ message: string;
1305
+ details: {
1306
+ [x: string]: import("hono/utils/types").JSONValue;
1307
+ } | null;
1308
+ createdAt: string;
1309
+ };
1310
+ };
1311
+ outputFormat: "json";
1312
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1313
+ };
1314
+ };
1315
+ } & {
1316
+ "/explanations/:id": {
1317
+ $patch: {
1318
+ input: {
1319
+ param: {
1320
+ id: string;
1321
+ };
1322
+ };
1323
+ output: {
1324
+ error: string;
1325
+ };
1326
+ outputFormat: "json";
1327
+ status: 404;
1328
+ } | {
1329
+ input: {
1330
+ param: {
1331
+ id: string;
1332
+ };
1333
+ };
1334
+ output: {
1335
+ data: {
1336
+ id: string;
1337
+ snapshotId: string;
1338
+ snapshotItemId: string | null;
1339
+ candidateIndex: number;
1340
+ explanationType: "pickup" | "policy" | "warning" | "allotment" | "sellable" | "pricing" | "blocked";
1341
+ code: string | null;
1342
+ message: string;
1343
+ details: {
1344
+ [x: string]: import("hono/utils/types").JSONValue;
1345
+ } | null;
1346
+ createdAt: string;
1347
+ };
1348
+ };
1349
+ outputFormat: "json";
1350
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1351
+ };
1352
+ };
1353
+ } & {
1354
+ "/explanations/:id": {
1355
+ $delete: {
1356
+ input: {
1357
+ param: {
1358
+ id: string;
1359
+ };
1360
+ };
1361
+ output: {
1362
+ error: string;
1363
+ };
1364
+ outputFormat: "json";
1365
+ status: 404;
1366
+ } | {
1367
+ input: {
1368
+ param: {
1369
+ id: string;
1370
+ };
1371
+ };
1372
+ output: {
1373
+ success: true;
1374
+ };
1375
+ outputFormat: "json";
1376
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1377
+ };
1378
+ };
1379
+ }, "/", "/explanations/:id">;
1380
+ export type SellabilityRoutes = typeof sellabilityRoutes;
1381
+ export {};
1382
+ //# sourceMappingURL=routes.d.ts.map