@voyantjs/legal 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 (36) hide show
  1. package/LICENSE +109 -0
  2. package/README.md +60 -0
  3. package/dist/contracts/index.d.ts +13 -0
  4. package/dist/contracts/index.d.ts.map +1 -0
  5. package/dist/contracts/index.js +19 -0
  6. package/dist/contracts/routes.d.ts +1297 -0
  7. package/dist/contracts/routes.d.ts.map +1 -0
  8. package/dist/contracts/routes.js +224 -0
  9. package/dist/contracts/schema.d.ts +1531 -0
  10. package/dist/contracts/schema.d.ts.map +1 -0
  11. package/dist/contracts/schema.js +227 -0
  12. package/dist/contracts/service.d.ts +1753 -0
  13. package/dist/contracts/service.d.ts.map +1 -0
  14. package/dist/contracts/service.js +570 -0
  15. package/dist/contracts/validation.d.ts +274 -0
  16. package/dist/contracts/validation.d.ts.map +1 -0
  17. package/dist/contracts/validation.js +125 -0
  18. package/dist/index.d.ts +14 -0
  19. package/dist/index.d.ts.map +1 -0
  20. package/dist/index.js +26 -0
  21. package/dist/policies/index.d.ts +16 -0
  22. package/dist/policies/index.d.ts.map +1 -0
  23. package/dist/policies/index.js +26 -0
  24. package/dist/policies/routes.d.ts +916 -0
  25. package/dist/policies/routes.d.ts.map +1 -0
  26. package/dist/policies/routes.js +162 -0
  27. package/dist/policies/schema.d.ts +1176 -0
  28. package/dist/policies/schema.d.ts.map +1 -0
  29. package/dist/policies/schema.js +189 -0
  30. package/dist/policies/service.d.ts +1384 -0
  31. package/dist/policies/service.d.ts.map +1 -0
  32. package/dist/policies/service.js +438 -0
  33. package/dist/policies/validation.d.ts +273 -0
  34. package/dist/policies/validation.d.ts.map +1 -0
  35. package/dist/policies/validation.js +140 -0
  36. package/package.json +83 -0
@@ -0,0 +1,916 @@
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 policiesAdminRoutes: import("hono/hono-base").HonoBase<Env, {
9
+ "/": {
10
+ $get: {
11
+ input: {};
12
+ output: {
13
+ data: {
14
+ id: string;
15
+ kind: "other" | "cancellation" | "payment" | "terms_and_conditions" | "privacy" | "refund" | "commission" | "guarantee";
16
+ name: string;
17
+ slug: string;
18
+ description: string | null;
19
+ language: string;
20
+ currentVersionId: string | null;
21
+ metadata: import("hono/utils/types").JSONValue;
22
+ createdAt: string;
23
+ updatedAt: string;
24
+ }[];
25
+ total: number;
26
+ limit: number;
27
+ offset: number;
28
+ };
29
+ outputFormat: "json";
30
+ status: import("hono/utils/http-status").ContentfulStatusCode;
31
+ };
32
+ };
33
+ } & {
34
+ "/": {
35
+ $post: {
36
+ input: {};
37
+ output: {
38
+ data: {
39
+ id: string;
40
+ name: string;
41
+ createdAt: string;
42
+ updatedAt: string;
43
+ description: string | null;
44
+ kind: "other" | "cancellation" | "payment" | "terms_and_conditions" | "privacy" | "refund" | "commission" | "guarantee";
45
+ metadata: import("hono/utils/types").JSONValue;
46
+ slug: string;
47
+ language: string;
48
+ currentVersionId: string | null;
49
+ } | null;
50
+ };
51
+ outputFormat: "json";
52
+ status: 201;
53
+ };
54
+ };
55
+ } & {
56
+ "/resolve": {
57
+ $get: {
58
+ input: {};
59
+ output: {
60
+ data: null;
61
+ };
62
+ outputFormat: "json";
63
+ status: import("hono/utils/http-status").ContentfulStatusCode;
64
+ } | {
65
+ input: {};
66
+ output: {
67
+ data: {
68
+ policy: {
69
+ id: string;
70
+ kind: "other" | "cancellation" | "payment" | "terms_and_conditions" | "privacy" | "refund" | "commission" | "guarantee";
71
+ name: string;
72
+ slug: string;
73
+ description: string | null;
74
+ language: string;
75
+ currentVersionId: string | null;
76
+ metadata: import("hono/utils/types").JSONValue;
77
+ createdAt: string;
78
+ updatedAt: string;
79
+ };
80
+ assignment: {
81
+ id: string;
82
+ policyId: string;
83
+ scope: "supplier" | "organization" | "channel" | "product" | "market" | "global";
84
+ productId: string | null;
85
+ channelId: string | null;
86
+ supplierId: string | null;
87
+ marketId: string | null;
88
+ organizationId: string | null;
89
+ validFrom: string | null;
90
+ validTo: string | null;
91
+ priority: number;
92
+ metadata: import("hono/utils/types").JSONValue;
93
+ createdAt: string;
94
+ updatedAt: string;
95
+ };
96
+ version: {
97
+ id: string;
98
+ policyId: string;
99
+ version: number;
100
+ status: "draft" | "published" | "retired";
101
+ title: string;
102
+ bodyFormat: "markdown" | "html" | "plain";
103
+ body: string | null;
104
+ publishedAt: string | null;
105
+ publishedBy: string | null;
106
+ retiredAt: string | null;
107
+ metadata: import("hono/utils/types").JSONValue;
108
+ createdAt: string;
109
+ updatedAt: string;
110
+ } | null;
111
+ rules: {
112
+ id: string;
113
+ policyVersionId: string;
114
+ ruleType: "custom" | "window" | "percentage" | "flat_amount" | "date_range";
115
+ label: string | null;
116
+ daysBeforeDeparture: number | null;
117
+ refundPercent: number | null;
118
+ refundType: "cash" | "credit" | "cash_or_credit" | "none" | null;
119
+ flatAmountCents: number | null;
120
+ currency: string | null;
121
+ validFrom: string | null;
122
+ validTo: string | null;
123
+ conditions: import("hono/utils/types").JSONValue;
124
+ sortOrder: number;
125
+ createdAt: string;
126
+ updatedAt: string;
127
+ }[];
128
+ };
129
+ };
130
+ outputFormat: "json";
131
+ status: import("hono/utils/http-status").ContentfulStatusCode;
132
+ };
133
+ };
134
+ } & {
135
+ "/:id": {
136
+ $get: {
137
+ input: {
138
+ param: {
139
+ id: string;
140
+ };
141
+ };
142
+ output: {
143
+ error: string;
144
+ };
145
+ outputFormat: "json";
146
+ status: 404;
147
+ } | {
148
+ input: {
149
+ param: {
150
+ id: string;
151
+ };
152
+ };
153
+ output: {
154
+ data: {
155
+ id: string;
156
+ kind: "other" | "cancellation" | "payment" | "terms_and_conditions" | "privacy" | "refund" | "commission" | "guarantee";
157
+ name: string;
158
+ slug: string;
159
+ description: string | null;
160
+ language: string;
161
+ currentVersionId: string | null;
162
+ metadata: import("hono/utils/types").JSONValue;
163
+ createdAt: string;
164
+ updatedAt: string;
165
+ };
166
+ };
167
+ outputFormat: "json";
168
+ status: import("hono/utils/http-status").ContentfulStatusCode;
169
+ };
170
+ };
171
+ } & {
172
+ "/:id": {
173
+ $patch: {
174
+ input: {
175
+ param: {
176
+ id: string;
177
+ };
178
+ };
179
+ output: {
180
+ error: string;
181
+ };
182
+ outputFormat: "json";
183
+ status: 404;
184
+ } | {
185
+ input: {
186
+ param: {
187
+ id: string;
188
+ };
189
+ };
190
+ output: {
191
+ data: {
192
+ id: string;
193
+ kind: "other" | "cancellation" | "payment" | "terms_and_conditions" | "privacy" | "refund" | "commission" | "guarantee";
194
+ name: string;
195
+ slug: string;
196
+ description: string | null;
197
+ language: string;
198
+ currentVersionId: string | null;
199
+ metadata: import("hono/utils/types").JSONValue;
200
+ createdAt: string;
201
+ updatedAt: string;
202
+ };
203
+ };
204
+ outputFormat: "json";
205
+ status: import("hono/utils/http-status").ContentfulStatusCode;
206
+ };
207
+ };
208
+ } & {
209
+ "/:id": {
210
+ $delete: {
211
+ input: {
212
+ param: {
213
+ id: string;
214
+ };
215
+ };
216
+ output: {
217
+ error: string;
218
+ };
219
+ outputFormat: "json";
220
+ status: 404;
221
+ } | {
222
+ input: {
223
+ param: {
224
+ id: string;
225
+ };
226
+ };
227
+ output: {
228
+ success: true;
229
+ };
230
+ outputFormat: "json";
231
+ status: import("hono/utils/http-status").ContentfulStatusCode;
232
+ };
233
+ };
234
+ } & {
235
+ "/:id/evaluate": {
236
+ $post: {
237
+ input: {
238
+ param: {
239
+ id: string;
240
+ };
241
+ };
242
+ output: {
243
+ error: string;
244
+ };
245
+ outputFormat: "json";
246
+ status: 404;
247
+ } | {
248
+ input: {
249
+ param: {
250
+ id: string;
251
+ };
252
+ };
253
+ output: {
254
+ data: {
255
+ refundPercent: number;
256
+ refundCents: number;
257
+ refundType: "cash" | "credit" | "cash_or_credit" | "none";
258
+ appliedRule: {
259
+ id?: string | undefined;
260
+ daysBeforeDeparture: number | null;
261
+ refundPercent: number | null;
262
+ refundType: "cash" | "credit" | "cash_or_credit" | "none" | null;
263
+ flatAmountCents: number | null;
264
+ label: string | null;
265
+ } | null;
266
+ };
267
+ };
268
+ outputFormat: "json";
269
+ status: import("hono/utils/http-status").ContentfulStatusCode;
270
+ };
271
+ };
272
+ } & {
273
+ "/:id/versions": {
274
+ $get: {
275
+ input: {
276
+ param: {
277
+ id: string;
278
+ };
279
+ };
280
+ output: {
281
+ data: {
282
+ id: string;
283
+ policyId: string;
284
+ version: number;
285
+ status: "draft" | "published" | "retired";
286
+ title: string;
287
+ bodyFormat: "markdown" | "html" | "plain";
288
+ body: string | null;
289
+ publishedAt: string | null;
290
+ publishedBy: string | null;
291
+ retiredAt: string | null;
292
+ metadata: import("hono/utils/types").JSONValue;
293
+ createdAt: string;
294
+ updatedAt: string;
295
+ }[];
296
+ };
297
+ outputFormat: "json";
298
+ status: import("hono/utils/http-status").ContentfulStatusCode;
299
+ };
300
+ };
301
+ } & {
302
+ "/:id/versions": {
303
+ $post: {
304
+ input: {
305
+ param: {
306
+ id: string;
307
+ };
308
+ };
309
+ output: {
310
+ error: string;
311
+ };
312
+ outputFormat: "json";
313
+ status: 404;
314
+ } | {
315
+ input: {
316
+ param: {
317
+ id: string;
318
+ };
319
+ };
320
+ output: {
321
+ data: {
322
+ id: string;
323
+ status: "draft" | "published" | "retired";
324
+ createdAt: string;
325
+ updatedAt: string;
326
+ title: string;
327
+ metadata: import("hono/utils/types").JSONValue;
328
+ bodyFormat: "markdown" | "html" | "plain";
329
+ body: string | null;
330
+ version: number;
331
+ policyId: string;
332
+ publishedAt: string | null;
333
+ publishedBy: string | null;
334
+ retiredAt: string | null;
335
+ };
336
+ };
337
+ outputFormat: "json";
338
+ status: 201;
339
+ };
340
+ };
341
+ } & {
342
+ "/versions/:versionId": {
343
+ $get: {
344
+ input: {
345
+ param: {
346
+ versionId: string;
347
+ };
348
+ };
349
+ output: {
350
+ error: string;
351
+ };
352
+ outputFormat: "json";
353
+ status: 404;
354
+ } | {
355
+ input: {
356
+ param: {
357
+ versionId: string;
358
+ };
359
+ };
360
+ output: {
361
+ data: {
362
+ id: string;
363
+ policyId: string;
364
+ version: number;
365
+ status: "draft" | "published" | "retired";
366
+ title: string;
367
+ bodyFormat: "markdown" | "html" | "plain";
368
+ body: string | null;
369
+ publishedAt: string | null;
370
+ publishedBy: string | null;
371
+ retiredAt: string | null;
372
+ metadata: import("hono/utils/types").JSONValue;
373
+ createdAt: string;
374
+ updatedAt: string;
375
+ };
376
+ };
377
+ outputFormat: "json";
378
+ status: import("hono/utils/http-status").ContentfulStatusCode;
379
+ };
380
+ };
381
+ } & {
382
+ "/versions/:versionId": {
383
+ $patch: {
384
+ input: {
385
+ param: {
386
+ versionId: string;
387
+ };
388
+ };
389
+ output: {
390
+ error: string;
391
+ };
392
+ outputFormat: "json";
393
+ status: 404;
394
+ } | {
395
+ input: {
396
+ param: {
397
+ versionId: string;
398
+ };
399
+ };
400
+ output: {
401
+ data: {
402
+ id: string;
403
+ policyId: string;
404
+ version: number;
405
+ status: "draft" | "published" | "retired";
406
+ title: string;
407
+ bodyFormat: "markdown" | "html" | "plain";
408
+ body: string | null;
409
+ publishedAt: string | null;
410
+ publishedBy: string | null;
411
+ retiredAt: string | null;
412
+ metadata: import("hono/utils/types").JSONValue;
413
+ createdAt: string;
414
+ updatedAt: string;
415
+ };
416
+ };
417
+ outputFormat: "json";
418
+ status: import("hono/utils/http-status").ContentfulStatusCode;
419
+ };
420
+ };
421
+ } & {
422
+ "/versions/:versionId/publish": {
423
+ $post: {
424
+ input: {
425
+ param: {
426
+ versionId: string;
427
+ };
428
+ };
429
+ output: {
430
+ error: string;
431
+ };
432
+ outputFormat: "json";
433
+ status: 404;
434
+ } | {
435
+ input: {
436
+ param: {
437
+ versionId: string;
438
+ };
439
+ };
440
+ output: {
441
+ error: string;
442
+ };
443
+ outputFormat: "json";
444
+ status: 409;
445
+ } | {
446
+ input: {
447
+ param: {
448
+ versionId: string;
449
+ };
450
+ };
451
+ output: {
452
+ data: {
453
+ id: string;
454
+ policyId: string;
455
+ version: number;
456
+ status: "draft" | "published" | "retired";
457
+ title: string;
458
+ bodyFormat: "markdown" | "html" | "plain";
459
+ body: string | null;
460
+ publishedAt: string | null;
461
+ publishedBy: string | null;
462
+ retiredAt: string | null;
463
+ metadata: import("hono/utils/types").JSONValue;
464
+ createdAt: string;
465
+ updatedAt: string;
466
+ } | null;
467
+ };
468
+ outputFormat: "json";
469
+ status: import("hono/utils/http-status").ContentfulStatusCode;
470
+ };
471
+ };
472
+ } & {
473
+ "/versions/:versionId/retire": {
474
+ $post: {
475
+ input: {
476
+ param: {
477
+ versionId: string;
478
+ };
479
+ };
480
+ output: {
481
+ error: string;
482
+ };
483
+ outputFormat: "json";
484
+ status: 404;
485
+ } | {
486
+ input: {
487
+ param: {
488
+ versionId: string;
489
+ };
490
+ };
491
+ output: {
492
+ data: {
493
+ id: string;
494
+ policyId: string;
495
+ version: number;
496
+ status: "draft" | "published" | "retired";
497
+ title: string;
498
+ bodyFormat: "markdown" | "html" | "plain";
499
+ body: string | null;
500
+ publishedAt: string | null;
501
+ publishedBy: string | null;
502
+ retiredAt: string | null;
503
+ metadata: import("hono/utils/types").JSONValue;
504
+ createdAt: string;
505
+ updatedAt: string;
506
+ };
507
+ };
508
+ outputFormat: "json";
509
+ status: import("hono/utils/http-status").ContentfulStatusCode;
510
+ };
511
+ };
512
+ } & {
513
+ "/versions/:versionId/rules": {
514
+ $get: {
515
+ input: {
516
+ param: {
517
+ versionId: string;
518
+ };
519
+ };
520
+ output: {
521
+ data: {
522
+ id: string;
523
+ policyVersionId: string;
524
+ ruleType: "custom" | "window" | "percentage" | "flat_amount" | "date_range";
525
+ label: string | null;
526
+ daysBeforeDeparture: number | null;
527
+ refundPercent: number | null;
528
+ refundType: "cash" | "credit" | "cash_or_credit" | "none" | null;
529
+ flatAmountCents: number | null;
530
+ currency: string | null;
531
+ validFrom: string | null;
532
+ validTo: string | null;
533
+ conditions: import("hono/utils/types").JSONValue;
534
+ sortOrder: number;
535
+ createdAt: string;
536
+ updatedAt: string;
537
+ }[];
538
+ };
539
+ outputFormat: "json";
540
+ status: import("hono/utils/http-status").ContentfulStatusCode;
541
+ };
542
+ };
543
+ } & {
544
+ "/versions/:versionId/rules": {
545
+ $post: {
546
+ input: {
547
+ param: {
548
+ versionId: string;
549
+ };
550
+ };
551
+ output: {
552
+ error: string;
553
+ };
554
+ outputFormat: "json";
555
+ status: 404;
556
+ } | {
557
+ input: {
558
+ param: {
559
+ versionId: string;
560
+ };
561
+ };
562
+ output: {
563
+ data: {
564
+ id: string;
565
+ createdAt: string;
566
+ updatedAt: string;
567
+ sortOrder: number;
568
+ currency: string | null;
569
+ label: string | null;
570
+ conditions: import("hono/utils/types").JSONValue;
571
+ validFrom: string | null;
572
+ validTo: string | null;
573
+ policyVersionId: string;
574
+ ruleType: "custom" | "window" | "percentage" | "flat_amount" | "date_range";
575
+ daysBeforeDeparture: number | null;
576
+ refundPercent: number | null;
577
+ refundType: "cash" | "credit" | "cash_or_credit" | "none" | null;
578
+ flatAmountCents: number | null;
579
+ };
580
+ };
581
+ outputFormat: "json";
582
+ status: 201;
583
+ };
584
+ };
585
+ } & {
586
+ "/rules/:ruleId": {
587
+ $patch: {
588
+ input: {
589
+ param: {
590
+ ruleId: string;
591
+ };
592
+ };
593
+ output: {
594
+ error: string;
595
+ };
596
+ outputFormat: "json";
597
+ status: 404;
598
+ } | {
599
+ input: {
600
+ param: {
601
+ ruleId: string;
602
+ };
603
+ };
604
+ output: {
605
+ data: {
606
+ id: string;
607
+ policyVersionId: string;
608
+ ruleType: "custom" | "window" | "percentage" | "flat_amount" | "date_range";
609
+ label: string | null;
610
+ daysBeforeDeparture: number | null;
611
+ refundPercent: number | null;
612
+ refundType: "cash" | "credit" | "cash_or_credit" | "none" | null;
613
+ flatAmountCents: number | null;
614
+ currency: string | null;
615
+ validFrom: string | null;
616
+ validTo: string | null;
617
+ conditions: import("hono/utils/types").JSONValue;
618
+ sortOrder: number;
619
+ createdAt: string;
620
+ updatedAt: string;
621
+ };
622
+ };
623
+ outputFormat: "json";
624
+ status: import("hono/utils/http-status").ContentfulStatusCode;
625
+ };
626
+ };
627
+ } & {
628
+ "/rules/:ruleId": {
629
+ $delete: {
630
+ input: {
631
+ param: {
632
+ ruleId: string;
633
+ };
634
+ };
635
+ output: {
636
+ error: string;
637
+ };
638
+ outputFormat: "json";
639
+ status: 404;
640
+ } | {
641
+ input: {
642
+ param: {
643
+ ruleId: string;
644
+ };
645
+ };
646
+ output: {
647
+ success: true;
648
+ };
649
+ outputFormat: "json";
650
+ status: import("hono/utils/http-status").ContentfulStatusCode;
651
+ };
652
+ };
653
+ } & {
654
+ "/assignments": {
655
+ $get: {
656
+ input: {};
657
+ output: {
658
+ data: {
659
+ id: string;
660
+ policyId: string;
661
+ scope: "supplier" | "organization" | "channel" | "product" | "market" | "global";
662
+ productId: string | null;
663
+ channelId: string | null;
664
+ supplierId: string | null;
665
+ marketId: string | null;
666
+ organizationId: string | null;
667
+ validFrom: string | null;
668
+ validTo: string | null;
669
+ priority: number;
670
+ metadata: import("hono/utils/types").JSONValue;
671
+ createdAt: string;
672
+ updatedAt: string;
673
+ }[];
674
+ total: number;
675
+ limit: number;
676
+ offset: number;
677
+ };
678
+ outputFormat: "json";
679
+ status: import("hono/utils/http-status").ContentfulStatusCode;
680
+ };
681
+ };
682
+ } & {
683
+ "/assignments": {
684
+ $post: {
685
+ input: {};
686
+ output: {
687
+ data: {
688
+ id: string;
689
+ createdAt: string;
690
+ updatedAt: string;
691
+ organizationId: string | null;
692
+ productId: string | null;
693
+ metadata: import("hono/utils/types").JSONValue;
694
+ validFrom: string | null;
695
+ validTo: string | null;
696
+ supplierId: string | null;
697
+ scope: "supplier" | "organization" | "channel" | "product" | "market" | "global";
698
+ channelId: string | null;
699
+ policyId: string;
700
+ marketId: string | null;
701
+ priority: number;
702
+ } | null;
703
+ };
704
+ outputFormat: "json";
705
+ status: 201;
706
+ };
707
+ };
708
+ } & {
709
+ "/assignments/:id": {
710
+ $patch: {
711
+ input: {
712
+ param: {
713
+ id: string;
714
+ };
715
+ };
716
+ output: {
717
+ error: string;
718
+ };
719
+ outputFormat: "json";
720
+ status: 404;
721
+ } | {
722
+ input: {
723
+ param: {
724
+ id: string;
725
+ };
726
+ };
727
+ output: {
728
+ data: {
729
+ id: string;
730
+ policyId: string;
731
+ scope: "supplier" | "organization" | "channel" | "product" | "market" | "global";
732
+ productId: string | null;
733
+ channelId: string | null;
734
+ supplierId: string | null;
735
+ marketId: string | null;
736
+ organizationId: string | null;
737
+ validFrom: string | null;
738
+ validTo: string | null;
739
+ priority: number;
740
+ metadata: import("hono/utils/types").JSONValue;
741
+ createdAt: string;
742
+ updatedAt: string;
743
+ };
744
+ };
745
+ outputFormat: "json";
746
+ status: import("hono/utils/http-status").ContentfulStatusCode;
747
+ };
748
+ };
749
+ } & {
750
+ "/assignments/:id": {
751
+ $delete: {
752
+ input: {
753
+ param: {
754
+ id: string;
755
+ };
756
+ };
757
+ output: {
758
+ error: string;
759
+ };
760
+ outputFormat: "json";
761
+ status: 404;
762
+ } | {
763
+ input: {
764
+ param: {
765
+ id: string;
766
+ };
767
+ };
768
+ output: {
769
+ success: true;
770
+ };
771
+ outputFormat: "json";
772
+ status: import("hono/utils/http-status").ContentfulStatusCode;
773
+ };
774
+ };
775
+ } & {
776
+ "/acceptances": {
777
+ $get: {
778
+ input: {};
779
+ output: {
780
+ data: {
781
+ id: string;
782
+ policyVersionId: string;
783
+ personId: string | null;
784
+ bookingId: string | null;
785
+ orderId: string | null;
786
+ offerId: string | null;
787
+ acceptedAt: string;
788
+ acceptedBy: string | null;
789
+ method: "signature" | "implicit" | "explicit_checkbox";
790
+ ipAddress: string | null;
791
+ userAgent: string | null;
792
+ metadata: import("hono/utils/types").JSONValue;
793
+ createdAt: string;
794
+ }[];
795
+ total: number;
796
+ limit: number;
797
+ offset: number;
798
+ };
799
+ outputFormat: "json";
800
+ status: import("hono/utils/http-status").ContentfulStatusCode;
801
+ };
802
+ };
803
+ } & {
804
+ "/acceptances": {
805
+ $post: {
806
+ input: {};
807
+ output: {
808
+ data: {
809
+ id: string;
810
+ createdAt: string;
811
+ personId: string | null;
812
+ metadata: import("hono/utils/types").JSONValue;
813
+ bookingId: string | null;
814
+ orderId: string | null;
815
+ method: "signature" | "implicit" | "explicit_checkbox";
816
+ ipAddress: string | null;
817
+ userAgent: string | null;
818
+ policyVersionId: string;
819
+ offerId: string | null;
820
+ acceptedAt: string;
821
+ acceptedBy: string | null;
822
+ } | null;
823
+ };
824
+ outputFormat: "json";
825
+ status: 201;
826
+ };
827
+ };
828
+ }, "/", "/acceptances">;
829
+ export type PoliciesAdminRoutes = typeof policiesAdminRoutes;
830
+ export declare const policiesPublicRoutes: import("hono/hono-base").HonoBase<Env, {
831
+ "/:slug": {
832
+ $get: {
833
+ input: {
834
+ param: {
835
+ slug: string;
836
+ };
837
+ };
838
+ output: {
839
+ error: string;
840
+ };
841
+ outputFormat: "json";
842
+ status: 404;
843
+ } | {
844
+ input: {
845
+ param: {
846
+ slug: string;
847
+ };
848
+ };
849
+ output: {
850
+ data: {
851
+ policy: {
852
+ id: string;
853
+ kind: "other" | "cancellation" | "payment" | "terms_and_conditions" | "privacy" | "refund" | "commission" | "guarantee";
854
+ name: string;
855
+ slug: string;
856
+ description: string | null;
857
+ language: string;
858
+ currentVersionId: string | null;
859
+ metadata: import("hono/utils/types").JSONValue;
860
+ createdAt: string;
861
+ updatedAt: string;
862
+ };
863
+ version: {
864
+ id: string;
865
+ policyId: string;
866
+ version: number;
867
+ status: "draft" | "published" | "retired";
868
+ title: string;
869
+ bodyFormat: "markdown" | "html" | "plain";
870
+ body: string | null;
871
+ publishedAt: string | null;
872
+ publishedBy: string | null;
873
+ retiredAt: string | null;
874
+ metadata: import("hono/utils/types").JSONValue;
875
+ createdAt: string;
876
+ updatedAt: string;
877
+ };
878
+ };
879
+ };
880
+ outputFormat: "json";
881
+ status: import("hono/utils/http-status").ContentfulStatusCode;
882
+ };
883
+ };
884
+ } & {
885
+ "/:id/accept": {
886
+ $post: {
887
+ input: {
888
+ param: {
889
+ id: string;
890
+ };
891
+ };
892
+ output: {
893
+ data: {
894
+ id: string;
895
+ createdAt: string;
896
+ personId: string | null;
897
+ metadata: import("hono/utils/types").JSONValue;
898
+ bookingId: string | null;
899
+ orderId: string | null;
900
+ method: "signature" | "implicit" | "explicit_checkbox";
901
+ ipAddress: string | null;
902
+ userAgent: string | null;
903
+ policyVersionId: string;
904
+ offerId: string | null;
905
+ acceptedAt: string;
906
+ acceptedBy: string | null;
907
+ } | null;
908
+ };
909
+ outputFormat: "json";
910
+ status: 201;
911
+ };
912
+ };
913
+ }, "/", "/:id/accept">;
914
+ export type PoliciesPublicRoutes = typeof policiesPublicRoutes;
915
+ export {};
916
+ //# sourceMappingURL=routes.d.ts.map