@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,1297 @@
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 contractsAdminRoutes: import("hono/hono-base").HonoBase<Env, {
9
+ "/templates": {
10
+ $get: {
11
+ input: {};
12
+ output: {
13
+ data: {
14
+ id: string;
15
+ name: string;
16
+ slug: string;
17
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
18
+ language: string;
19
+ description: string | null;
20
+ bodyFormat: "markdown" | "html" | "lexical_json";
21
+ body: string;
22
+ variableSchema: import("hono/utils/types").JSONValue;
23
+ currentVersionId: string | null;
24
+ active: boolean;
25
+ createdAt: string;
26
+ updatedAt: string;
27
+ }[];
28
+ total: number;
29
+ limit: number;
30
+ offset: number;
31
+ };
32
+ outputFormat: "json";
33
+ status: import("hono/utils/http-status").ContentfulStatusCode;
34
+ };
35
+ };
36
+ } & {
37
+ "/templates": {
38
+ $post: {
39
+ input: {};
40
+ output: {
41
+ data: {
42
+ id: string;
43
+ name: string;
44
+ active: boolean;
45
+ createdAt: string;
46
+ updatedAt: string;
47
+ description: string | null;
48
+ slug: string;
49
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
50
+ language: string;
51
+ bodyFormat: "markdown" | "html" | "lexical_json";
52
+ body: string;
53
+ variableSchema: import("hono/utils/types").JSONValue;
54
+ currentVersionId: string | null;
55
+ } | null;
56
+ };
57
+ outputFormat: "json";
58
+ status: 201;
59
+ };
60
+ };
61
+ } & {
62
+ "/templates/:id": {
63
+ $get: {
64
+ input: {
65
+ param: {
66
+ id: string;
67
+ };
68
+ };
69
+ output: {
70
+ error: string;
71
+ };
72
+ outputFormat: "json";
73
+ status: 404;
74
+ } | {
75
+ input: {
76
+ param: {
77
+ id: string;
78
+ };
79
+ };
80
+ output: {
81
+ data: {
82
+ id: string;
83
+ name: string;
84
+ slug: string;
85
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
86
+ language: string;
87
+ description: string | null;
88
+ bodyFormat: "markdown" | "html" | "lexical_json";
89
+ body: string;
90
+ variableSchema: import("hono/utils/types").JSONValue;
91
+ currentVersionId: string | null;
92
+ active: boolean;
93
+ createdAt: string;
94
+ updatedAt: string;
95
+ };
96
+ };
97
+ outputFormat: "json";
98
+ status: import("hono/utils/http-status").ContentfulStatusCode;
99
+ };
100
+ };
101
+ } & {
102
+ "/templates/:id": {
103
+ $patch: {
104
+ input: {
105
+ param: {
106
+ id: string;
107
+ };
108
+ };
109
+ output: {
110
+ error: string;
111
+ };
112
+ outputFormat: "json";
113
+ status: 404;
114
+ } | {
115
+ input: {
116
+ param: {
117
+ id: string;
118
+ };
119
+ };
120
+ output: {
121
+ data: {
122
+ id: string;
123
+ name: string;
124
+ slug: string;
125
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
126
+ language: string;
127
+ description: string | null;
128
+ bodyFormat: "markdown" | "html" | "lexical_json";
129
+ body: string;
130
+ variableSchema: import("hono/utils/types").JSONValue;
131
+ currentVersionId: string | null;
132
+ active: boolean;
133
+ createdAt: string;
134
+ updatedAt: string;
135
+ };
136
+ };
137
+ outputFormat: "json";
138
+ status: import("hono/utils/http-status").ContentfulStatusCode;
139
+ };
140
+ };
141
+ } & {
142
+ "/templates/:id": {
143
+ $delete: {
144
+ input: {
145
+ param: {
146
+ id: string;
147
+ };
148
+ };
149
+ output: {
150
+ error: string;
151
+ };
152
+ outputFormat: "json";
153
+ status: 404;
154
+ } | {
155
+ input: {
156
+ param: {
157
+ id: string;
158
+ };
159
+ };
160
+ output: {
161
+ success: true;
162
+ };
163
+ outputFormat: "json";
164
+ status: import("hono/utils/http-status").ContentfulStatusCode;
165
+ };
166
+ };
167
+ } & {
168
+ "/templates/:id/preview": {
169
+ $post: {
170
+ input: {
171
+ param: {
172
+ id: string;
173
+ };
174
+ };
175
+ output: {
176
+ error: string;
177
+ };
178
+ outputFormat: "json";
179
+ status: 404;
180
+ } | {
181
+ input: {
182
+ param: {
183
+ id: string;
184
+ };
185
+ };
186
+ output: {
187
+ data: {
188
+ rendered: string;
189
+ bodyFormat: "markdown" | "html" | "lexical_json";
190
+ };
191
+ };
192
+ outputFormat: "json";
193
+ status: import("hono/utils/http-status").ContentfulStatusCode;
194
+ };
195
+ };
196
+ } & {
197
+ "/templates/:id/versions": {
198
+ $get: {
199
+ input: {
200
+ param: {
201
+ id: string;
202
+ };
203
+ };
204
+ output: {
205
+ data: {
206
+ id: string;
207
+ templateId: string;
208
+ version: number;
209
+ bodyFormat: "markdown" | "html" | "lexical_json";
210
+ body: string;
211
+ variableSchema: import("hono/utils/types").JSONValue;
212
+ changelog: string | null;
213
+ createdBy: string | null;
214
+ createdAt: string;
215
+ }[];
216
+ };
217
+ outputFormat: "json";
218
+ status: import("hono/utils/http-status").ContentfulStatusCode;
219
+ };
220
+ };
221
+ } & {
222
+ "/templates/:id/versions": {
223
+ $post: {
224
+ input: {
225
+ param: {
226
+ id: string;
227
+ };
228
+ };
229
+ output: {
230
+ error: string;
231
+ };
232
+ outputFormat: "json";
233
+ status: 404;
234
+ } | {
235
+ input: {
236
+ param: {
237
+ id: string;
238
+ };
239
+ };
240
+ output: {
241
+ data: {
242
+ id: string;
243
+ createdAt: string;
244
+ bodyFormat: "markdown" | "html" | "lexical_json";
245
+ body: string;
246
+ variableSchema: import("hono/utils/types").JSONValue;
247
+ templateId: string;
248
+ version: number;
249
+ changelog: string | null;
250
+ createdBy: string | null;
251
+ };
252
+ };
253
+ outputFormat: "json";
254
+ status: 201;
255
+ };
256
+ };
257
+ } & {
258
+ "/template-versions/:id": {
259
+ $get: {
260
+ input: {
261
+ param: {
262
+ id: string;
263
+ };
264
+ };
265
+ output: {
266
+ error: string;
267
+ };
268
+ outputFormat: "json";
269
+ status: 404;
270
+ } | {
271
+ input: {
272
+ param: {
273
+ id: string;
274
+ };
275
+ };
276
+ output: {
277
+ data: {
278
+ id: string;
279
+ templateId: string;
280
+ version: number;
281
+ bodyFormat: "markdown" | "html" | "lexical_json";
282
+ body: string;
283
+ variableSchema: import("hono/utils/types").JSONValue;
284
+ changelog: string | null;
285
+ createdBy: string | null;
286
+ createdAt: string;
287
+ };
288
+ };
289
+ outputFormat: "json";
290
+ status: import("hono/utils/http-status").ContentfulStatusCode;
291
+ };
292
+ };
293
+ } & {
294
+ "/number-series": {
295
+ $get: {
296
+ input: {};
297
+ output: {
298
+ data: {
299
+ id: string;
300
+ code: string;
301
+ name: string;
302
+ prefix: string;
303
+ separator: string;
304
+ padLength: number;
305
+ currentSequence: number;
306
+ resetStrategy: "never" | "annual" | "monthly";
307
+ resetAt: string | null;
308
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
309
+ active: boolean;
310
+ createdAt: string;
311
+ updatedAt: string;
312
+ }[];
313
+ };
314
+ outputFormat: "json";
315
+ status: import("hono/utils/http-status").ContentfulStatusCode;
316
+ };
317
+ };
318
+ } & {
319
+ "/number-series": {
320
+ $post: {
321
+ input: {};
322
+ output: {
323
+ data: {
324
+ id: string;
325
+ name: string;
326
+ active: boolean;
327
+ createdAt: string;
328
+ updatedAt: string;
329
+ code: string;
330
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
331
+ prefix: string;
332
+ separator: string;
333
+ padLength: number;
334
+ currentSequence: number;
335
+ resetStrategy: "never" | "annual" | "monthly";
336
+ resetAt: string | null;
337
+ } | null;
338
+ };
339
+ outputFormat: "json";
340
+ status: 201;
341
+ };
342
+ };
343
+ } & {
344
+ "/number-series/:id": {
345
+ $get: {
346
+ input: {
347
+ param: {
348
+ id: string;
349
+ };
350
+ };
351
+ output: {
352
+ error: string;
353
+ };
354
+ outputFormat: "json";
355
+ status: 404;
356
+ } | {
357
+ input: {
358
+ param: {
359
+ id: string;
360
+ };
361
+ };
362
+ output: {
363
+ data: {
364
+ id: string;
365
+ code: string;
366
+ name: string;
367
+ prefix: string;
368
+ separator: string;
369
+ padLength: number;
370
+ currentSequence: number;
371
+ resetStrategy: "never" | "annual" | "monthly";
372
+ resetAt: string | null;
373
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
374
+ active: boolean;
375
+ createdAt: string;
376
+ updatedAt: string;
377
+ };
378
+ };
379
+ outputFormat: "json";
380
+ status: import("hono/utils/http-status").ContentfulStatusCode;
381
+ };
382
+ };
383
+ } & {
384
+ "/number-series/:id": {
385
+ $patch: {
386
+ input: {
387
+ param: {
388
+ id: string;
389
+ };
390
+ };
391
+ output: {
392
+ error: string;
393
+ };
394
+ outputFormat: "json";
395
+ status: 404;
396
+ } | {
397
+ input: {
398
+ param: {
399
+ id: string;
400
+ };
401
+ };
402
+ output: {
403
+ data: {
404
+ id: string;
405
+ code: string;
406
+ name: string;
407
+ prefix: string;
408
+ separator: string;
409
+ padLength: number;
410
+ currentSequence: number;
411
+ resetStrategy: "never" | "annual" | "monthly";
412
+ resetAt: string | null;
413
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
414
+ active: boolean;
415
+ createdAt: string;
416
+ updatedAt: string;
417
+ };
418
+ };
419
+ outputFormat: "json";
420
+ status: import("hono/utils/http-status").ContentfulStatusCode;
421
+ };
422
+ };
423
+ } & {
424
+ "/number-series/:id": {
425
+ $delete: {
426
+ input: {
427
+ param: {
428
+ id: string;
429
+ };
430
+ };
431
+ output: {
432
+ error: string;
433
+ };
434
+ outputFormat: "json";
435
+ status: 404;
436
+ } | {
437
+ input: {
438
+ param: {
439
+ id: string;
440
+ };
441
+ };
442
+ output: {
443
+ success: true;
444
+ };
445
+ outputFormat: "json";
446
+ status: import("hono/utils/http-status").ContentfulStatusCode;
447
+ };
448
+ };
449
+ } & {
450
+ "/": {
451
+ $get: {
452
+ input: {};
453
+ output: {
454
+ data: {
455
+ id: string;
456
+ contractNumber: string | null;
457
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
458
+ status: "draft" | "sent" | "expired" | "issued" | "signed" | "executed" | "void";
459
+ title: string;
460
+ templateVersionId: string | null;
461
+ seriesId: string | null;
462
+ personId: string | null;
463
+ organizationId: string | null;
464
+ supplierId: string | null;
465
+ channelId: string | null;
466
+ bookingId: string | null;
467
+ orderId: string | null;
468
+ issuedAt: string | null;
469
+ sentAt: string | null;
470
+ executedAt: string | null;
471
+ expiresAt: string | null;
472
+ voidedAt: string | null;
473
+ language: string;
474
+ renderedBodyFormat: "markdown" | "html" | "lexical_json";
475
+ renderedBody: string | null;
476
+ variables: import("hono/utils/types").JSONValue;
477
+ metadata: import("hono/utils/types").JSONValue;
478
+ createdAt: string;
479
+ updatedAt: string;
480
+ }[];
481
+ total: number;
482
+ limit: number;
483
+ offset: number;
484
+ };
485
+ outputFormat: "json";
486
+ status: import("hono/utils/http-status").ContentfulStatusCode;
487
+ };
488
+ };
489
+ } & {
490
+ "/": {
491
+ $post: {
492
+ input: {};
493
+ output: {
494
+ data: {
495
+ id: string;
496
+ status: "draft" | "sent" | "expired" | "issued" | "signed" | "executed" | "void";
497
+ createdAt: string;
498
+ updatedAt: string;
499
+ organizationId: string | null;
500
+ title: string;
501
+ personId: string | null;
502
+ sentAt: string | null;
503
+ metadata: import("hono/utils/types").JSONValue;
504
+ supplierId: string | null;
505
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
506
+ language: string;
507
+ contractNumber: string | null;
508
+ templateVersionId: string | null;
509
+ seriesId: string | null;
510
+ channelId: string | null;
511
+ bookingId: string | null;
512
+ orderId: string | null;
513
+ issuedAt: string | null;
514
+ executedAt: string | null;
515
+ expiresAt: string | null;
516
+ voidedAt: string | null;
517
+ renderedBodyFormat: "markdown" | "html" | "lexical_json";
518
+ renderedBody: string | null;
519
+ variables: import("hono/utils/types").JSONValue;
520
+ } | null;
521
+ };
522
+ outputFormat: "json";
523
+ status: 201;
524
+ };
525
+ };
526
+ } & {
527
+ "/:id": {
528
+ $get: {
529
+ input: {
530
+ param: {
531
+ id: string;
532
+ };
533
+ };
534
+ output: {
535
+ error: string;
536
+ };
537
+ outputFormat: "json";
538
+ status: 404;
539
+ } | {
540
+ input: {
541
+ param: {
542
+ id: string;
543
+ };
544
+ };
545
+ output: {
546
+ data: {
547
+ id: string;
548
+ contractNumber: string | null;
549
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
550
+ status: "draft" | "sent" | "expired" | "issued" | "signed" | "executed" | "void";
551
+ title: string;
552
+ templateVersionId: string | null;
553
+ seriesId: string | null;
554
+ personId: string | null;
555
+ organizationId: string | null;
556
+ supplierId: string | null;
557
+ channelId: string | null;
558
+ bookingId: string | null;
559
+ orderId: string | null;
560
+ issuedAt: string | null;
561
+ sentAt: string | null;
562
+ executedAt: string | null;
563
+ expiresAt: string | null;
564
+ voidedAt: string | null;
565
+ language: string;
566
+ renderedBodyFormat: "markdown" | "html" | "lexical_json";
567
+ renderedBody: string | null;
568
+ variables: import("hono/utils/types").JSONValue;
569
+ metadata: import("hono/utils/types").JSONValue;
570
+ createdAt: string;
571
+ updatedAt: string;
572
+ };
573
+ };
574
+ outputFormat: "json";
575
+ status: import("hono/utils/http-status").ContentfulStatusCode;
576
+ };
577
+ };
578
+ } & {
579
+ "/:id": {
580
+ $patch: {
581
+ input: {
582
+ param: {
583
+ id: string;
584
+ };
585
+ };
586
+ output: {
587
+ error: string;
588
+ };
589
+ outputFormat: "json";
590
+ status: 404;
591
+ } | {
592
+ input: {
593
+ param: {
594
+ id: string;
595
+ };
596
+ };
597
+ output: {
598
+ data: {
599
+ id: string;
600
+ contractNumber: string | null;
601
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
602
+ status: "draft" | "sent" | "expired" | "issued" | "signed" | "executed" | "void";
603
+ title: string;
604
+ templateVersionId: string | null;
605
+ seriesId: string | null;
606
+ personId: string | null;
607
+ organizationId: string | null;
608
+ supplierId: string | null;
609
+ channelId: string | null;
610
+ bookingId: string | null;
611
+ orderId: string | null;
612
+ issuedAt: string | null;
613
+ sentAt: string | null;
614
+ executedAt: string | null;
615
+ expiresAt: string | null;
616
+ voidedAt: string | null;
617
+ language: string;
618
+ renderedBodyFormat: "markdown" | "html" | "lexical_json";
619
+ renderedBody: string | null;
620
+ variables: import("hono/utils/types").JSONValue;
621
+ metadata: import("hono/utils/types").JSONValue;
622
+ createdAt: string;
623
+ updatedAt: string;
624
+ };
625
+ };
626
+ outputFormat: "json";
627
+ status: import("hono/utils/http-status").ContentfulStatusCode;
628
+ };
629
+ };
630
+ } & {
631
+ "/:id": {
632
+ $delete: {
633
+ input: {
634
+ param: {
635
+ id: string;
636
+ };
637
+ };
638
+ output: {
639
+ error: string;
640
+ };
641
+ outputFormat: "json";
642
+ status: 404;
643
+ } | {
644
+ input: {
645
+ param: {
646
+ id: string;
647
+ };
648
+ };
649
+ output: {
650
+ error: string;
651
+ };
652
+ outputFormat: "json";
653
+ status: 409;
654
+ } | {
655
+ input: {
656
+ param: {
657
+ id: string;
658
+ };
659
+ };
660
+ output: {
661
+ success: true;
662
+ };
663
+ outputFormat: "json";
664
+ status: import("hono/utils/http-status").ContentfulStatusCode;
665
+ };
666
+ };
667
+ } & {
668
+ "/:id/issue": {
669
+ $post: {
670
+ input: {
671
+ param: {
672
+ id: string;
673
+ };
674
+ };
675
+ output: {
676
+ error: string;
677
+ };
678
+ outputFormat: "json";
679
+ status: 404;
680
+ } | {
681
+ input: {
682
+ param: {
683
+ id: string;
684
+ };
685
+ };
686
+ output: {
687
+ error: string;
688
+ };
689
+ outputFormat: "json";
690
+ status: 409;
691
+ } | {
692
+ input: {
693
+ param: {
694
+ id: string;
695
+ };
696
+ };
697
+ output: {
698
+ data: {
699
+ id: string;
700
+ contractNumber: string | null;
701
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
702
+ status: "draft" | "sent" | "expired" | "issued" | "signed" | "executed" | "void";
703
+ title: string;
704
+ templateVersionId: string | null;
705
+ seriesId: string | null;
706
+ personId: string | null;
707
+ organizationId: string | null;
708
+ supplierId: string | null;
709
+ channelId: string | null;
710
+ bookingId: string | null;
711
+ orderId: string | null;
712
+ issuedAt: string | null;
713
+ sentAt: string | null;
714
+ executedAt: string | null;
715
+ expiresAt: string | null;
716
+ voidedAt: string | null;
717
+ language: string;
718
+ renderedBodyFormat: "markdown" | "html" | "lexical_json";
719
+ renderedBody: string | null;
720
+ variables: import("hono/utils/types").JSONValue;
721
+ metadata: import("hono/utils/types").JSONValue;
722
+ createdAt: string;
723
+ updatedAt: string;
724
+ } | null;
725
+ };
726
+ outputFormat: "json";
727
+ status: import("hono/utils/http-status").ContentfulStatusCode;
728
+ };
729
+ };
730
+ } & {
731
+ "/:id/send": {
732
+ $post: {
733
+ input: {
734
+ param: {
735
+ id: string;
736
+ };
737
+ };
738
+ output: {
739
+ error: string;
740
+ };
741
+ outputFormat: "json";
742
+ status: 404;
743
+ } | {
744
+ input: {
745
+ param: {
746
+ id: string;
747
+ };
748
+ };
749
+ output: {
750
+ error: string;
751
+ };
752
+ outputFormat: "json";
753
+ status: 409;
754
+ } | {
755
+ input: {
756
+ param: {
757
+ id: string;
758
+ };
759
+ };
760
+ output: {
761
+ data: {
762
+ id: string;
763
+ contractNumber: string | null;
764
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
765
+ status: "draft" | "sent" | "expired" | "issued" | "signed" | "executed" | "void";
766
+ title: string;
767
+ templateVersionId: string | null;
768
+ seriesId: string | null;
769
+ personId: string | null;
770
+ organizationId: string | null;
771
+ supplierId: string | null;
772
+ channelId: string | null;
773
+ bookingId: string | null;
774
+ orderId: string | null;
775
+ issuedAt: string | null;
776
+ sentAt: string | null;
777
+ executedAt: string | null;
778
+ expiresAt: string | null;
779
+ voidedAt: string | null;
780
+ language: string;
781
+ renderedBodyFormat: "markdown" | "html" | "lexical_json";
782
+ renderedBody: string | null;
783
+ variables: import("hono/utils/types").JSONValue;
784
+ metadata: import("hono/utils/types").JSONValue;
785
+ createdAt: string;
786
+ updatedAt: string;
787
+ } | null;
788
+ };
789
+ outputFormat: "json";
790
+ status: import("hono/utils/http-status").ContentfulStatusCode;
791
+ };
792
+ };
793
+ } & {
794
+ "/:id/sign": {
795
+ $post: {
796
+ input: {
797
+ param: {
798
+ id: string;
799
+ };
800
+ };
801
+ output: {
802
+ error: string;
803
+ };
804
+ outputFormat: "json";
805
+ status: 404;
806
+ } | {
807
+ input: {
808
+ param: {
809
+ id: string;
810
+ };
811
+ };
812
+ output: {
813
+ error: string;
814
+ };
815
+ outputFormat: "json";
816
+ status: 409;
817
+ } | {
818
+ input: {
819
+ param: {
820
+ id: string;
821
+ };
822
+ };
823
+ output: {
824
+ data: {
825
+ contract: {
826
+ id: string;
827
+ contractNumber: string | null;
828
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
829
+ status: "draft" | "sent" | "expired" | "issued" | "signed" | "executed" | "void";
830
+ title: string;
831
+ templateVersionId: string | null;
832
+ seriesId: string | null;
833
+ personId: string | null;
834
+ organizationId: string | null;
835
+ supplierId: string | null;
836
+ channelId: string | null;
837
+ bookingId: string | null;
838
+ orderId: string | null;
839
+ issuedAt: string | null;
840
+ sentAt: string | null;
841
+ executedAt: string | null;
842
+ expiresAt: string | null;
843
+ voidedAt: string | null;
844
+ language: string;
845
+ renderedBodyFormat: "markdown" | "html" | "lexical_json";
846
+ renderedBody: string | null;
847
+ variables: import("hono/utils/types").JSONValue;
848
+ metadata: import("hono/utils/types").JSONValue;
849
+ createdAt: string;
850
+ updatedAt: string;
851
+ } | null;
852
+ signature: {
853
+ id: string;
854
+ createdAt: string;
855
+ personId: string | null;
856
+ metadata: import("hono/utils/types").JSONValue;
857
+ contractId: string;
858
+ signerName: string;
859
+ signerEmail: string | null;
860
+ signerRole: string | null;
861
+ method: "other" | "manual" | "electronic" | "docusign";
862
+ provider: string | null;
863
+ externalReference: string | null;
864
+ signatureData: string | null;
865
+ ipAddress: string | null;
866
+ userAgent: string | null;
867
+ signedAt: string;
868
+ } | null;
869
+ };
870
+ };
871
+ outputFormat: "json";
872
+ status: import("hono/utils/http-status").ContentfulStatusCode;
873
+ };
874
+ };
875
+ } & {
876
+ "/:id/execute": {
877
+ $post: {
878
+ input: {
879
+ param: {
880
+ id: string;
881
+ };
882
+ };
883
+ output: {
884
+ error: string;
885
+ };
886
+ outputFormat: "json";
887
+ status: 404;
888
+ } | {
889
+ input: {
890
+ param: {
891
+ id: string;
892
+ };
893
+ };
894
+ output: {
895
+ error: string;
896
+ };
897
+ outputFormat: "json";
898
+ status: 409;
899
+ } | {
900
+ input: {
901
+ param: {
902
+ id: string;
903
+ };
904
+ };
905
+ output: {
906
+ data: {
907
+ id: string;
908
+ contractNumber: string | null;
909
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
910
+ status: "draft" | "sent" | "expired" | "issued" | "signed" | "executed" | "void";
911
+ title: string;
912
+ templateVersionId: string | null;
913
+ seriesId: string | null;
914
+ personId: string | null;
915
+ organizationId: string | null;
916
+ supplierId: string | null;
917
+ channelId: string | null;
918
+ bookingId: string | null;
919
+ orderId: string | null;
920
+ issuedAt: string | null;
921
+ sentAt: string | null;
922
+ executedAt: string | null;
923
+ expiresAt: string | null;
924
+ voidedAt: string | null;
925
+ language: string;
926
+ renderedBodyFormat: "markdown" | "html" | "lexical_json";
927
+ renderedBody: string | null;
928
+ variables: import("hono/utils/types").JSONValue;
929
+ metadata: import("hono/utils/types").JSONValue;
930
+ createdAt: string;
931
+ updatedAt: string;
932
+ } | null;
933
+ };
934
+ outputFormat: "json";
935
+ status: import("hono/utils/http-status").ContentfulStatusCode;
936
+ };
937
+ };
938
+ } & {
939
+ "/:id/void": {
940
+ $post: {
941
+ input: {
942
+ param: {
943
+ id: string;
944
+ };
945
+ };
946
+ output: {
947
+ error: string;
948
+ };
949
+ outputFormat: "json";
950
+ status: 404;
951
+ } | {
952
+ input: {
953
+ param: {
954
+ id: string;
955
+ };
956
+ };
957
+ output: {
958
+ error: string;
959
+ };
960
+ outputFormat: "json";
961
+ status: 409;
962
+ } | {
963
+ input: {
964
+ param: {
965
+ id: string;
966
+ };
967
+ };
968
+ output: {
969
+ data: {
970
+ id: string;
971
+ contractNumber: string | null;
972
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
973
+ status: "draft" | "sent" | "expired" | "issued" | "signed" | "executed" | "void";
974
+ title: string;
975
+ templateVersionId: string | null;
976
+ seriesId: string | null;
977
+ personId: string | null;
978
+ organizationId: string | null;
979
+ supplierId: string | null;
980
+ channelId: string | null;
981
+ bookingId: string | null;
982
+ orderId: string | null;
983
+ issuedAt: string | null;
984
+ sentAt: string | null;
985
+ executedAt: string | null;
986
+ expiresAt: string | null;
987
+ voidedAt: string | null;
988
+ language: string;
989
+ renderedBodyFormat: "markdown" | "html" | "lexical_json";
990
+ renderedBody: string | null;
991
+ variables: import("hono/utils/types").JSONValue;
992
+ metadata: import("hono/utils/types").JSONValue;
993
+ createdAt: string;
994
+ updatedAt: string;
995
+ } | null;
996
+ };
997
+ outputFormat: "json";
998
+ status: import("hono/utils/http-status").ContentfulStatusCode;
999
+ };
1000
+ };
1001
+ } & {
1002
+ "/:id/render": {
1003
+ $post: {
1004
+ input: {
1005
+ param: {
1006
+ id: string;
1007
+ };
1008
+ };
1009
+ output: {
1010
+ error: string;
1011
+ };
1012
+ outputFormat: "json";
1013
+ status: 404;
1014
+ } | {
1015
+ input: {
1016
+ param: {
1017
+ id: string;
1018
+ };
1019
+ };
1020
+ output: {
1021
+ data: {
1022
+ rendered: string;
1023
+ };
1024
+ };
1025
+ outputFormat: "json";
1026
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1027
+ };
1028
+ };
1029
+ } & {
1030
+ "/:id/signatures": {
1031
+ $get: {
1032
+ input: {
1033
+ param: {
1034
+ id: string;
1035
+ };
1036
+ };
1037
+ output: {
1038
+ data: {
1039
+ id: string;
1040
+ contractId: string;
1041
+ signerName: string;
1042
+ signerEmail: string | null;
1043
+ signerRole: string | null;
1044
+ personId: string | null;
1045
+ method: "other" | "manual" | "electronic" | "docusign";
1046
+ provider: string | null;
1047
+ externalReference: string | null;
1048
+ signatureData: string | null;
1049
+ ipAddress: string | null;
1050
+ userAgent: string | null;
1051
+ signedAt: string;
1052
+ metadata: import("hono/utils/types").JSONValue;
1053
+ createdAt: string;
1054
+ }[];
1055
+ };
1056
+ outputFormat: "json";
1057
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1058
+ };
1059
+ };
1060
+ } & {
1061
+ "/:id/attachments": {
1062
+ $get: {
1063
+ input: {
1064
+ param: {
1065
+ id: string;
1066
+ };
1067
+ };
1068
+ output: {
1069
+ data: {
1070
+ id: string;
1071
+ contractId: string;
1072
+ kind: string;
1073
+ name: string;
1074
+ mimeType: string | null;
1075
+ fileSize: number | null;
1076
+ storageKey: string | null;
1077
+ checksum: string | null;
1078
+ metadata: import("hono/utils/types").JSONValue;
1079
+ createdAt: string;
1080
+ }[];
1081
+ };
1082
+ outputFormat: "json";
1083
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1084
+ };
1085
+ };
1086
+ } & {
1087
+ "/:id/attachments": {
1088
+ $post: {
1089
+ input: {
1090
+ param: {
1091
+ id: string;
1092
+ };
1093
+ };
1094
+ output: {
1095
+ error: string;
1096
+ };
1097
+ outputFormat: "json";
1098
+ status: 404;
1099
+ } | {
1100
+ input: {
1101
+ param: {
1102
+ id: string;
1103
+ };
1104
+ };
1105
+ output: {
1106
+ data: {
1107
+ id: string;
1108
+ name: string;
1109
+ createdAt: string;
1110
+ kind: string;
1111
+ metadata: import("hono/utils/types").JSONValue;
1112
+ contractId: string;
1113
+ mimeType: string | null;
1114
+ fileSize: number | null;
1115
+ storageKey: string | null;
1116
+ checksum: string | null;
1117
+ };
1118
+ };
1119
+ outputFormat: "json";
1120
+ status: 201;
1121
+ };
1122
+ };
1123
+ } & {
1124
+ "/attachments/:attachmentId": {
1125
+ $patch: {
1126
+ input: {
1127
+ param: {
1128
+ attachmentId: string;
1129
+ };
1130
+ };
1131
+ output: {
1132
+ error: string;
1133
+ };
1134
+ outputFormat: "json";
1135
+ status: 404;
1136
+ } | {
1137
+ input: {
1138
+ param: {
1139
+ attachmentId: string;
1140
+ };
1141
+ };
1142
+ output: {
1143
+ data: {
1144
+ id: string;
1145
+ contractId: string;
1146
+ kind: string;
1147
+ name: string;
1148
+ mimeType: string | null;
1149
+ fileSize: number | null;
1150
+ storageKey: string | null;
1151
+ checksum: string | null;
1152
+ metadata: import("hono/utils/types").JSONValue;
1153
+ createdAt: string;
1154
+ };
1155
+ };
1156
+ outputFormat: "json";
1157
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1158
+ };
1159
+ };
1160
+ } & {
1161
+ "/attachments/:attachmentId": {
1162
+ $delete: {
1163
+ input: {
1164
+ param: {
1165
+ attachmentId: string;
1166
+ };
1167
+ };
1168
+ output: {
1169
+ error: string;
1170
+ };
1171
+ outputFormat: "json";
1172
+ status: 404;
1173
+ } | {
1174
+ input: {
1175
+ param: {
1176
+ attachmentId: string;
1177
+ };
1178
+ };
1179
+ output: {
1180
+ success: true;
1181
+ };
1182
+ outputFormat: "json";
1183
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1184
+ };
1185
+ };
1186
+ }, "/", "/attachments/:attachmentId">;
1187
+ export type ContractsAdminRoutes = typeof contractsAdminRoutes;
1188
+ export declare const contractsPublicRoutes: import("hono/hono-base").HonoBase<Env, {
1189
+ "/:id": {
1190
+ $get: {
1191
+ input: {
1192
+ param: {
1193
+ id: string;
1194
+ };
1195
+ };
1196
+ output: {
1197
+ error: string;
1198
+ };
1199
+ outputFormat: "json";
1200
+ status: 404;
1201
+ } | {
1202
+ input: {
1203
+ param: {
1204
+ id: string;
1205
+ };
1206
+ };
1207
+ output: {
1208
+ data: {
1209
+ id: string;
1210
+ contractNumber: string | null;
1211
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
1212
+ status: "draft" | "sent" | "expired" | "issued" | "signed" | "executed" | "void";
1213
+ title: string;
1214
+ templateVersionId: string | null;
1215
+ seriesId: string | null;
1216
+ personId: string | null;
1217
+ organizationId: string | null;
1218
+ supplierId: string | null;
1219
+ channelId: string | null;
1220
+ bookingId: string | null;
1221
+ orderId: string | null;
1222
+ issuedAt: string | null;
1223
+ sentAt: string | null;
1224
+ executedAt: string | null;
1225
+ expiresAt: string | null;
1226
+ voidedAt: string | null;
1227
+ language: string;
1228
+ renderedBodyFormat: "markdown" | "html" | "lexical_json";
1229
+ renderedBody: string | null;
1230
+ variables: import("hono/utils/types").JSONValue;
1231
+ createdAt: string;
1232
+ updatedAt: string;
1233
+ };
1234
+ };
1235
+ outputFormat: "json";
1236
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1237
+ };
1238
+ };
1239
+ } & {
1240
+ "/:id/sign": {
1241
+ $post: {
1242
+ input: {
1243
+ param: {
1244
+ id: string;
1245
+ };
1246
+ };
1247
+ output: {
1248
+ error: string;
1249
+ };
1250
+ outputFormat: "json";
1251
+ status: 404;
1252
+ } | {
1253
+ input: {
1254
+ param: {
1255
+ id: string;
1256
+ };
1257
+ };
1258
+ output: {
1259
+ error: string;
1260
+ };
1261
+ outputFormat: "json";
1262
+ status: 409;
1263
+ } | {
1264
+ input: {
1265
+ param: {
1266
+ id: string;
1267
+ };
1268
+ };
1269
+ output: {
1270
+ data: {
1271
+ signature: {
1272
+ id: string;
1273
+ createdAt: string;
1274
+ personId: string | null;
1275
+ metadata: import("hono/utils/types").JSONValue;
1276
+ contractId: string;
1277
+ signerName: string;
1278
+ signerEmail: string | null;
1279
+ signerRole: string | null;
1280
+ method: "other" | "manual" | "electronic" | "docusign";
1281
+ provider: string | null;
1282
+ externalReference: string | null;
1283
+ signatureData: string | null;
1284
+ ipAddress: string | null;
1285
+ userAgent: string | null;
1286
+ signedAt: string;
1287
+ } | null;
1288
+ };
1289
+ };
1290
+ outputFormat: "json";
1291
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1292
+ };
1293
+ };
1294
+ }, "/", "/:id/sign">;
1295
+ export type ContractsPublicRoutes = typeof contractsPublicRoutes;
1296
+ export {};
1297
+ //# sourceMappingURL=routes.d.ts.map