@voyantjs/legal 0.3.0 → 0.4.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.
@@ -1,11 +1,18 @@
1
1
  import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
2
+ import { contractsService } from "./service.js";
2
3
  type Env = {
4
+ Bindings: Record<string, unknown>;
3
5
  Variables: {
4
6
  db: PostgresJsDatabase;
5
7
  userId?: string;
6
8
  };
7
9
  };
8
- export declare const contractsAdminRoutes: import("hono/hono-base").HonoBase<Env, {
10
+ export type ContractDocumentGenerator = Parameters<typeof contractsService.generateContractDocument>[3]["generator"];
11
+ export interface ContractsRouteOptions {
12
+ documentGenerator?: ContractDocumentGenerator;
13
+ resolveDocumentGenerator?: (bindings: Record<string, unknown>) => ContractDocumentGenerator | undefined;
14
+ }
15
+ export declare function createContractsAdminRoutes(options?: ContractsRouteOptions): import("hono/hono-base").HonoBase<Env, {
9
16
  "/templates": {
10
17
  $get: {
11
18
  input: {};
@@ -33,6 +40,38 @@ export declare const contractsAdminRoutes: import("hono/hono-base").HonoBase<Env
33
40
  status: import("hono/utils/http-status").ContentfulStatusCode;
34
41
  };
35
42
  };
43
+ } & {
44
+ "/templates/default": {
45
+ $get: {
46
+ input: {};
47
+ output: {
48
+ error: string;
49
+ };
50
+ outputFormat: "json";
51
+ status: 404;
52
+ } | {
53
+ input: {};
54
+ output: {
55
+ data: {
56
+ id: string;
57
+ name: string;
58
+ slug: string;
59
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
60
+ language: string;
61
+ description: string | null;
62
+ bodyFormat: "markdown" | "html" | "lexical_json";
63
+ body: string;
64
+ variableSchema: import("hono/utils/types").JSONValue;
65
+ currentVersionId: string | null;
66
+ active: boolean;
67
+ createdAt: string;
68
+ updatedAt: string;
69
+ };
70
+ };
71
+ outputFormat: "json";
72
+ status: import("hono/utils/http-status").ContentfulStatusCode;
73
+ };
74
+ };
36
75
  } & {
37
76
  "/templates": {
38
77
  $post: {
@@ -1026,6 +1065,164 @@ export declare const contractsAdminRoutes: import("hono/hono-base").HonoBase<Env
1026
1065
  status: import("hono/utils/http-status").ContentfulStatusCode;
1027
1066
  };
1028
1067
  };
1068
+ } & {
1069
+ "/:id/generate-document": {
1070
+ $post: {
1071
+ input: {
1072
+ param: {
1073
+ id: string;
1074
+ };
1075
+ };
1076
+ output: {
1077
+ error: string;
1078
+ };
1079
+ outputFormat: "json";
1080
+ status: 501;
1081
+ } | {
1082
+ input: {
1083
+ param: {
1084
+ id: string;
1085
+ };
1086
+ };
1087
+ output: {
1088
+ error: string;
1089
+ };
1090
+ outputFormat: "json";
1091
+ status: 404;
1092
+ } | {
1093
+ input: {
1094
+ param: {
1095
+ id: string;
1096
+ };
1097
+ };
1098
+ output: {
1099
+ error: string;
1100
+ };
1101
+ outputFormat: "json";
1102
+ status: 409;
1103
+ } | {
1104
+ input: {
1105
+ param: {
1106
+ id: string;
1107
+ };
1108
+ };
1109
+ output: {
1110
+ error: string;
1111
+ };
1112
+ outputFormat: "json";
1113
+ status: 502;
1114
+ } | {
1115
+ input: {
1116
+ param: {
1117
+ id: string;
1118
+ };
1119
+ };
1120
+ output: {
1121
+ data: {
1122
+ status: "not_found" | "not_draft" | "render_unavailable" | "generator_failed";
1123
+ } | {
1124
+ status: "generated";
1125
+ contractId: string;
1126
+ contractStatus: "draft" | "sent" | "expired" | "issued" | "signed" | "executed" | "void";
1127
+ renderedBodyFormat: "markdown" | "html" | "lexical_json";
1128
+ renderedBody: string;
1129
+ attachment: {
1130
+ id: string;
1131
+ name: string;
1132
+ createdAt: string;
1133
+ kind: string;
1134
+ metadata: import("hono/utils/types").JSONValue;
1135
+ contractId: string;
1136
+ mimeType: string | null;
1137
+ fileSize: number | null;
1138
+ storageKey: string | null;
1139
+ checksum: string | null;
1140
+ };
1141
+ };
1142
+ };
1143
+ outputFormat: "json";
1144
+ status: 201;
1145
+ };
1146
+ };
1147
+ } & {
1148
+ "/:id/regenerate-document": {
1149
+ $post: {
1150
+ input: {
1151
+ param: {
1152
+ id: string;
1153
+ };
1154
+ };
1155
+ output: {
1156
+ error: string;
1157
+ };
1158
+ outputFormat: "json";
1159
+ status: 501;
1160
+ } | {
1161
+ input: {
1162
+ param: {
1163
+ id: string;
1164
+ };
1165
+ };
1166
+ output: {
1167
+ error: string;
1168
+ };
1169
+ outputFormat: "json";
1170
+ status: 404;
1171
+ } | {
1172
+ input: {
1173
+ param: {
1174
+ id: string;
1175
+ };
1176
+ };
1177
+ output: {
1178
+ error: string;
1179
+ };
1180
+ outputFormat: "json";
1181
+ status: 409;
1182
+ } | {
1183
+ input: {
1184
+ param: {
1185
+ id: string;
1186
+ };
1187
+ };
1188
+ output: {
1189
+ error: string;
1190
+ };
1191
+ outputFormat: "json";
1192
+ status: 502;
1193
+ } | {
1194
+ input: {
1195
+ param: {
1196
+ id: string;
1197
+ };
1198
+ };
1199
+ output: {
1200
+ data: {
1201
+ status: "not_found" | "not_draft" | "render_unavailable" | "generator_failed";
1202
+ } | {
1203
+ status: "generated";
1204
+ contractId: string;
1205
+ contractStatus: "draft" | "sent" | "expired" | "issued" | "signed" | "executed" | "void";
1206
+ renderedBodyFormat: "markdown" | "html" | "lexical_json";
1207
+ renderedBody: string;
1208
+ attachment: {
1209
+ id: string;
1210
+ name: string;
1211
+ createdAt: string;
1212
+ kind: string;
1213
+ metadata: import("hono/utils/types").JSONValue;
1214
+ contractId: string;
1215
+ mimeType: string | null;
1216
+ fileSize: number | null;
1217
+ storageKey: string | null;
1218
+ checksum: string | null;
1219
+ };
1220
+ };
1221
+ };
1222
+ outputFormat: "json";
1223
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1224
+ };
1225
+ };
1029
1226
  } & {
1030
1227
  "/:id/signatures": {
1031
1228
  $get: {
@@ -1184,50 +1381,58 @@ export declare const contractsAdminRoutes: import("hono/hono-base").HonoBase<Env
1184
1381
  };
1185
1382
  };
1186
1383
  }, "/", "/attachments/:attachmentId">;
1187
- export type ContractsAdminRoutes = typeof contractsAdminRoutes;
1188
- export declare const contractsPublicRoutes: import("hono/hono-base").HonoBase<Env, {
1189
- "/:id": {
1384
+ export declare const contractsAdminRoutes: import("hono/hono-base").HonoBase<Env, {
1385
+ "/templates": {
1190
1386
  $get: {
1191
- input: {
1192
- param: {
1387
+ input: {};
1388
+ output: {
1389
+ data: {
1193
1390
  id: string;
1194
- };
1391
+ name: string;
1392
+ slug: string;
1393
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
1394
+ language: string;
1395
+ description: string | null;
1396
+ bodyFormat: "markdown" | "html" | "lexical_json";
1397
+ body: string;
1398
+ variableSchema: import("hono/utils/types").JSONValue;
1399
+ currentVersionId: string | null;
1400
+ active: boolean;
1401
+ createdAt: string;
1402
+ updatedAt: string;
1403
+ }[];
1404
+ total: number;
1405
+ limit: number;
1406
+ offset: number;
1195
1407
  };
1408
+ outputFormat: "json";
1409
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1410
+ };
1411
+ };
1412
+ } & {
1413
+ "/templates/default": {
1414
+ $get: {
1415
+ input: {};
1196
1416
  output: {
1197
1417
  error: string;
1198
1418
  };
1199
1419
  outputFormat: "json";
1200
1420
  status: 404;
1201
1421
  } | {
1202
- input: {
1203
- param: {
1204
- id: string;
1205
- };
1206
- };
1422
+ input: {};
1207
1423
  output: {
1208
1424
  data: {
1209
1425
  id: string;
1210
- contractNumber: string | null;
1426
+ name: string;
1427
+ slug: string;
1211
1428
  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
1429
  language: string;
1228
- renderedBodyFormat: "markdown" | "html" | "lexical_json";
1229
- renderedBody: string | null;
1230
- variables: import("hono/utils/types").JSONValue;
1430
+ description: string | null;
1431
+ bodyFormat: "markdown" | "html" | "lexical_json";
1432
+ body: string;
1433
+ variableSchema: import("hono/utils/types").JSONValue;
1434
+ currentVersionId: string | null;
1435
+ active: boolean;
1231
1436
  createdAt: string;
1232
1437
  updatedAt: string;
1233
1438
  };
@@ -1237,8 +1442,33 @@ export declare const contractsPublicRoutes: import("hono/hono-base").HonoBase<En
1237
1442
  };
1238
1443
  };
1239
1444
  } & {
1240
- "/:id/sign": {
1445
+ "/templates": {
1241
1446
  $post: {
1447
+ input: {};
1448
+ output: {
1449
+ data: {
1450
+ id: string;
1451
+ name: string;
1452
+ active: boolean;
1453
+ createdAt: string;
1454
+ updatedAt: string;
1455
+ description: string | null;
1456
+ slug: string;
1457
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
1458
+ language: string;
1459
+ bodyFormat: "markdown" | "html" | "lexical_json";
1460
+ body: string;
1461
+ variableSchema: import("hono/utils/types").JSONValue;
1462
+ currentVersionId: string | null;
1463
+ } | null;
1464
+ };
1465
+ outputFormat: "json";
1466
+ status: 201;
1467
+ };
1468
+ };
1469
+ } & {
1470
+ "/templates/:id": {
1471
+ $get: {
1242
1472
  input: {
1243
1473
  param: {
1244
1474
  id: string;
@@ -1256,10 +1486,1574 @@ export declare const contractsPublicRoutes: import("hono/hono-base").HonoBase<En
1256
1486
  };
1257
1487
  };
1258
1488
  output: {
1259
- error: string;
1260
- };
1261
- outputFormat: "json";
1262
- status: 409;
1489
+ data: {
1490
+ id: string;
1491
+ name: string;
1492
+ slug: string;
1493
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
1494
+ language: string;
1495
+ description: string | null;
1496
+ bodyFormat: "markdown" | "html" | "lexical_json";
1497
+ body: string;
1498
+ variableSchema: import("hono/utils/types").JSONValue;
1499
+ currentVersionId: string | null;
1500
+ active: boolean;
1501
+ createdAt: string;
1502
+ updatedAt: string;
1503
+ };
1504
+ };
1505
+ outputFormat: "json";
1506
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1507
+ };
1508
+ };
1509
+ } & {
1510
+ "/templates/:id": {
1511
+ $patch: {
1512
+ input: {
1513
+ param: {
1514
+ id: string;
1515
+ };
1516
+ };
1517
+ output: {
1518
+ error: string;
1519
+ };
1520
+ outputFormat: "json";
1521
+ status: 404;
1522
+ } | {
1523
+ input: {
1524
+ param: {
1525
+ id: string;
1526
+ };
1527
+ };
1528
+ output: {
1529
+ data: {
1530
+ id: string;
1531
+ name: string;
1532
+ slug: string;
1533
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
1534
+ language: string;
1535
+ description: string | null;
1536
+ bodyFormat: "markdown" | "html" | "lexical_json";
1537
+ body: string;
1538
+ variableSchema: import("hono/utils/types").JSONValue;
1539
+ currentVersionId: string | null;
1540
+ active: boolean;
1541
+ createdAt: string;
1542
+ updatedAt: string;
1543
+ };
1544
+ };
1545
+ outputFormat: "json";
1546
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1547
+ };
1548
+ };
1549
+ } & {
1550
+ "/templates/:id": {
1551
+ $delete: {
1552
+ input: {
1553
+ param: {
1554
+ id: string;
1555
+ };
1556
+ };
1557
+ output: {
1558
+ error: string;
1559
+ };
1560
+ outputFormat: "json";
1561
+ status: 404;
1562
+ } | {
1563
+ input: {
1564
+ param: {
1565
+ id: string;
1566
+ };
1567
+ };
1568
+ output: {
1569
+ success: true;
1570
+ };
1571
+ outputFormat: "json";
1572
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1573
+ };
1574
+ };
1575
+ } & {
1576
+ "/templates/:id/preview": {
1577
+ $post: {
1578
+ input: {
1579
+ param: {
1580
+ id: string;
1581
+ };
1582
+ };
1583
+ output: {
1584
+ error: string;
1585
+ };
1586
+ outputFormat: "json";
1587
+ status: 404;
1588
+ } | {
1589
+ input: {
1590
+ param: {
1591
+ id: string;
1592
+ };
1593
+ };
1594
+ output: {
1595
+ data: {
1596
+ rendered: string;
1597
+ bodyFormat: "markdown" | "html" | "lexical_json";
1598
+ };
1599
+ };
1600
+ outputFormat: "json";
1601
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1602
+ };
1603
+ };
1604
+ } & {
1605
+ "/templates/:id/versions": {
1606
+ $get: {
1607
+ input: {
1608
+ param: {
1609
+ id: string;
1610
+ };
1611
+ };
1612
+ output: {
1613
+ data: {
1614
+ id: string;
1615
+ templateId: string;
1616
+ version: number;
1617
+ bodyFormat: "markdown" | "html" | "lexical_json";
1618
+ body: string;
1619
+ variableSchema: import("hono/utils/types").JSONValue;
1620
+ changelog: string | null;
1621
+ createdBy: string | null;
1622
+ createdAt: string;
1623
+ }[];
1624
+ };
1625
+ outputFormat: "json";
1626
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1627
+ };
1628
+ };
1629
+ } & {
1630
+ "/templates/:id/versions": {
1631
+ $post: {
1632
+ input: {
1633
+ param: {
1634
+ id: string;
1635
+ };
1636
+ };
1637
+ output: {
1638
+ error: string;
1639
+ };
1640
+ outputFormat: "json";
1641
+ status: 404;
1642
+ } | {
1643
+ input: {
1644
+ param: {
1645
+ id: string;
1646
+ };
1647
+ };
1648
+ output: {
1649
+ data: {
1650
+ id: string;
1651
+ createdAt: string;
1652
+ bodyFormat: "markdown" | "html" | "lexical_json";
1653
+ body: string;
1654
+ variableSchema: import("hono/utils/types").JSONValue;
1655
+ templateId: string;
1656
+ version: number;
1657
+ changelog: string | null;
1658
+ createdBy: string | null;
1659
+ };
1660
+ };
1661
+ outputFormat: "json";
1662
+ status: 201;
1663
+ };
1664
+ };
1665
+ } & {
1666
+ "/template-versions/:id": {
1667
+ $get: {
1668
+ input: {
1669
+ param: {
1670
+ id: string;
1671
+ };
1672
+ };
1673
+ output: {
1674
+ error: string;
1675
+ };
1676
+ outputFormat: "json";
1677
+ status: 404;
1678
+ } | {
1679
+ input: {
1680
+ param: {
1681
+ id: string;
1682
+ };
1683
+ };
1684
+ output: {
1685
+ data: {
1686
+ id: string;
1687
+ templateId: string;
1688
+ version: number;
1689
+ bodyFormat: "markdown" | "html" | "lexical_json";
1690
+ body: string;
1691
+ variableSchema: import("hono/utils/types").JSONValue;
1692
+ changelog: string | null;
1693
+ createdBy: string | null;
1694
+ createdAt: string;
1695
+ };
1696
+ };
1697
+ outputFormat: "json";
1698
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1699
+ };
1700
+ };
1701
+ } & {
1702
+ "/number-series": {
1703
+ $get: {
1704
+ input: {};
1705
+ output: {
1706
+ data: {
1707
+ id: string;
1708
+ code: string;
1709
+ name: string;
1710
+ prefix: string;
1711
+ separator: string;
1712
+ padLength: number;
1713
+ currentSequence: number;
1714
+ resetStrategy: "never" | "annual" | "monthly";
1715
+ resetAt: string | null;
1716
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
1717
+ active: boolean;
1718
+ createdAt: string;
1719
+ updatedAt: string;
1720
+ }[];
1721
+ };
1722
+ outputFormat: "json";
1723
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1724
+ };
1725
+ };
1726
+ } & {
1727
+ "/number-series": {
1728
+ $post: {
1729
+ input: {};
1730
+ output: {
1731
+ data: {
1732
+ id: string;
1733
+ name: string;
1734
+ active: boolean;
1735
+ createdAt: string;
1736
+ updatedAt: string;
1737
+ code: string;
1738
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
1739
+ prefix: string;
1740
+ separator: string;
1741
+ padLength: number;
1742
+ currentSequence: number;
1743
+ resetStrategy: "never" | "annual" | "monthly";
1744
+ resetAt: string | null;
1745
+ } | null;
1746
+ };
1747
+ outputFormat: "json";
1748
+ status: 201;
1749
+ };
1750
+ };
1751
+ } & {
1752
+ "/number-series/:id": {
1753
+ $get: {
1754
+ input: {
1755
+ param: {
1756
+ id: string;
1757
+ };
1758
+ };
1759
+ output: {
1760
+ error: string;
1761
+ };
1762
+ outputFormat: "json";
1763
+ status: 404;
1764
+ } | {
1765
+ input: {
1766
+ param: {
1767
+ id: string;
1768
+ };
1769
+ };
1770
+ output: {
1771
+ data: {
1772
+ id: string;
1773
+ code: string;
1774
+ name: string;
1775
+ prefix: string;
1776
+ separator: string;
1777
+ padLength: number;
1778
+ currentSequence: number;
1779
+ resetStrategy: "never" | "annual" | "monthly";
1780
+ resetAt: string | null;
1781
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
1782
+ active: boolean;
1783
+ createdAt: string;
1784
+ updatedAt: string;
1785
+ };
1786
+ };
1787
+ outputFormat: "json";
1788
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1789
+ };
1790
+ };
1791
+ } & {
1792
+ "/number-series/:id": {
1793
+ $patch: {
1794
+ input: {
1795
+ param: {
1796
+ id: string;
1797
+ };
1798
+ };
1799
+ output: {
1800
+ error: string;
1801
+ };
1802
+ outputFormat: "json";
1803
+ status: 404;
1804
+ } | {
1805
+ input: {
1806
+ param: {
1807
+ id: string;
1808
+ };
1809
+ };
1810
+ output: {
1811
+ data: {
1812
+ id: string;
1813
+ code: string;
1814
+ name: string;
1815
+ prefix: string;
1816
+ separator: string;
1817
+ padLength: number;
1818
+ currentSequence: number;
1819
+ resetStrategy: "never" | "annual" | "monthly";
1820
+ resetAt: string | null;
1821
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
1822
+ active: boolean;
1823
+ createdAt: string;
1824
+ updatedAt: string;
1825
+ };
1826
+ };
1827
+ outputFormat: "json";
1828
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1829
+ };
1830
+ };
1831
+ } & {
1832
+ "/number-series/:id": {
1833
+ $delete: {
1834
+ input: {
1835
+ param: {
1836
+ id: string;
1837
+ };
1838
+ };
1839
+ output: {
1840
+ error: string;
1841
+ };
1842
+ outputFormat: "json";
1843
+ status: 404;
1844
+ } | {
1845
+ input: {
1846
+ param: {
1847
+ id: string;
1848
+ };
1849
+ };
1850
+ output: {
1851
+ success: true;
1852
+ };
1853
+ outputFormat: "json";
1854
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1855
+ };
1856
+ };
1857
+ } & {
1858
+ "/": {
1859
+ $get: {
1860
+ input: {};
1861
+ output: {
1862
+ data: {
1863
+ id: string;
1864
+ contractNumber: string | null;
1865
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
1866
+ status: "draft" | "sent" | "expired" | "issued" | "signed" | "executed" | "void";
1867
+ title: string;
1868
+ templateVersionId: string | null;
1869
+ seriesId: string | null;
1870
+ personId: string | null;
1871
+ organizationId: string | null;
1872
+ supplierId: string | null;
1873
+ channelId: string | null;
1874
+ bookingId: string | null;
1875
+ orderId: string | null;
1876
+ issuedAt: string | null;
1877
+ sentAt: string | null;
1878
+ executedAt: string | null;
1879
+ expiresAt: string | null;
1880
+ voidedAt: string | null;
1881
+ language: string;
1882
+ renderedBodyFormat: "markdown" | "html" | "lexical_json";
1883
+ renderedBody: string | null;
1884
+ variables: import("hono/utils/types").JSONValue;
1885
+ metadata: import("hono/utils/types").JSONValue;
1886
+ createdAt: string;
1887
+ updatedAt: string;
1888
+ }[];
1889
+ total: number;
1890
+ limit: number;
1891
+ offset: number;
1892
+ };
1893
+ outputFormat: "json";
1894
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1895
+ };
1896
+ };
1897
+ } & {
1898
+ "/": {
1899
+ $post: {
1900
+ input: {};
1901
+ output: {
1902
+ data: {
1903
+ id: string;
1904
+ status: "draft" | "sent" | "expired" | "issued" | "signed" | "executed" | "void";
1905
+ createdAt: string;
1906
+ updatedAt: string;
1907
+ organizationId: string | null;
1908
+ personId: string | null;
1909
+ sentAt: string | null;
1910
+ title: string;
1911
+ metadata: import("hono/utils/types").JSONValue;
1912
+ supplierId: string | null;
1913
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
1914
+ language: string;
1915
+ contractNumber: string | null;
1916
+ templateVersionId: string | null;
1917
+ seriesId: string | null;
1918
+ channelId: string | null;
1919
+ bookingId: string | null;
1920
+ orderId: string | null;
1921
+ issuedAt: string | null;
1922
+ executedAt: string | null;
1923
+ expiresAt: string | null;
1924
+ voidedAt: string | null;
1925
+ renderedBodyFormat: "markdown" | "html" | "lexical_json";
1926
+ renderedBody: string | null;
1927
+ variables: import("hono/utils/types").JSONValue;
1928
+ } | null;
1929
+ };
1930
+ outputFormat: "json";
1931
+ status: 201;
1932
+ };
1933
+ };
1934
+ } & {
1935
+ "/:id": {
1936
+ $get: {
1937
+ input: {
1938
+ param: {
1939
+ id: string;
1940
+ };
1941
+ };
1942
+ output: {
1943
+ error: string;
1944
+ };
1945
+ outputFormat: "json";
1946
+ status: 404;
1947
+ } | {
1948
+ input: {
1949
+ param: {
1950
+ id: string;
1951
+ };
1952
+ };
1953
+ output: {
1954
+ data: {
1955
+ id: string;
1956
+ contractNumber: string | null;
1957
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
1958
+ status: "draft" | "sent" | "expired" | "issued" | "signed" | "executed" | "void";
1959
+ title: string;
1960
+ templateVersionId: string | null;
1961
+ seriesId: string | null;
1962
+ personId: string | null;
1963
+ organizationId: string | null;
1964
+ supplierId: string | null;
1965
+ channelId: string | null;
1966
+ bookingId: string | null;
1967
+ orderId: string | null;
1968
+ issuedAt: string | null;
1969
+ sentAt: string | null;
1970
+ executedAt: string | null;
1971
+ expiresAt: string | null;
1972
+ voidedAt: string | null;
1973
+ language: string;
1974
+ renderedBodyFormat: "markdown" | "html" | "lexical_json";
1975
+ renderedBody: string | null;
1976
+ variables: import("hono/utils/types").JSONValue;
1977
+ metadata: import("hono/utils/types").JSONValue;
1978
+ createdAt: string;
1979
+ updatedAt: string;
1980
+ };
1981
+ };
1982
+ outputFormat: "json";
1983
+ status: import("hono/utils/http-status").ContentfulStatusCode;
1984
+ };
1985
+ };
1986
+ } & {
1987
+ "/:id": {
1988
+ $patch: {
1989
+ input: {
1990
+ param: {
1991
+ id: string;
1992
+ };
1993
+ };
1994
+ output: {
1995
+ error: string;
1996
+ };
1997
+ outputFormat: "json";
1998
+ status: 404;
1999
+ } | {
2000
+ input: {
2001
+ param: {
2002
+ id: string;
2003
+ };
2004
+ };
2005
+ output: {
2006
+ data: {
2007
+ id: string;
2008
+ contractNumber: string | null;
2009
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
2010
+ status: "draft" | "sent" | "expired" | "issued" | "signed" | "executed" | "void";
2011
+ title: string;
2012
+ templateVersionId: string | null;
2013
+ seriesId: string | null;
2014
+ personId: string | null;
2015
+ organizationId: string | null;
2016
+ supplierId: string | null;
2017
+ channelId: string | null;
2018
+ bookingId: string | null;
2019
+ orderId: string | null;
2020
+ issuedAt: string | null;
2021
+ sentAt: string | null;
2022
+ executedAt: string | null;
2023
+ expiresAt: string | null;
2024
+ voidedAt: string | null;
2025
+ language: string;
2026
+ renderedBodyFormat: "markdown" | "html" | "lexical_json";
2027
+ renderedBody: string | null;
2028
+ variables: import("hono/utils/types").JSONValue;
2029
+ metadata: import("hono/utils/types").JSONValue;
2030
+ createdAt: string;
2031
+ updatedAt: string;
2032
+ };
2033
+ };
2034
+ outputFormat: "json";
2035
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2036
+ };
2037
+ };
2038
+ } & {
2039
+ "/:id": {
2040
+ $delete: {
2041
+ input: {
2042
+ param: {
2043
+ id: string;
2044
+ };
2045
+ };
2046
+ output: {
2047
+ error: string;
2048
+ };
2049
+ outputFormat: "json";
2050
+ status: 404;
2051
+ } | {
2052
+ input: {
2053
+ param: {
2054
+ id: string;
2055
+ };
2056
+ };
2057
+ output: {
2058
+ error: string;
2059
+ };
2060
+ outputFormat: "json";
2061
+ status: 409;
2062
+ } | {
2063
+ input: {
2064
+ param: {
2065
+ id: string;
2066
+ };
2067
+ };
2068
+ output: {
2069
+ success: true;
2070
+ };
2071
+ outputFormat: "json";
2072
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2073
+ };
2074
+ };
2075
+ } & {
2076
+ "/:id/issue": {
2077
+ $post: {
2078
+ input: {
2079
+ param: {
2080
+ id: string;
2081
+ };
2082
+ };
2083
+ output: {
2084
+ error: string;
2085
+ };
2086
+ outputFormat: "json";
2087
+ status: 404;
2088
+ } | {
2089
+ input: {
2090
+ param: {
2091
+ id: string;
2092
+ };
2093
+ };
2094
+ output: {
2095
+ error: string;
2096
+ };
2097
+ outputFormat: "json";
2098
+ status: 409;
2099
+ } | {
2100
+ input: {
2101
+ param: {
2102
+ id: string;
2103
+ };
2104
+ };
2105
+ output: {
2106
+ data: {
2107
+ id: string;
2108
+ contractNumber: string | null;
2109
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
2110
+ status: "draft" | "sent" | "expired" | "issued" | "signed" | "executed" | "void";
2111
+ title: string;
2112
+ templateVersionId: string | null;
2113
+ seriesId: string | null;
2114
+ personId: string | null;
2115
+ organizationId: string | null;
2116
+ supplierId: string | null;
2117
+ channelId: string | null;
2118
+ bookingId: string | null;
2119
+ orderId: string | null;
2120
+ issuedAt: string | null;
2121
+ sentAt: string | null;
2122
+ executedAt: string | null;
2123
+ expiresAt: string | null;
2124
+ voidedAt: string | null;
2125
+ language: string;
2126
+ renderedBodyFormat: "markdown" | "html" | "lexical_json";
2127
+ renderedBody: string | null;
2128
+ variables: import("hono/utils/types").JSONValue;
2129
+ metadata: import("hono/utils/types").JSONValue;
2130
+ createdAt: string;
2131
+ updatedAt: string;
2132
+ } | null;
2133
+ };
2134
+ outputFormat: "json";
2135
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2136
+ };
2137
+ };
2138
+ } & {
2139
+ "/:id/send": {
2140
+ $post: {
2141
+ input: {
2142
+ param: {
2143
+ id: string;
2144
+ };
2145
+ };
2146
+ output: {
2147
+ error: string;
2148
+ };
2149
+ outputFormat: "json";
2150
+ status: 404;
2151
+ } | {
2152
+ input: {
2153
+ param: {
2154
+ id: string;
2155
+ };
2156
+ };
2157
+ output: {
2158
+ error: string;
2159
+ };
2160
+ outputFormat: "json";
2161
+ status: 409;
2162
+ } | {
2163
+ input: {
2164
+ param: {
2165
+ id: string;
2166
+ };
2167
+ };
2168
+ output: {
2169
+ data: {
2170
+ id: string;
2171
+ contractNumber: string | null;
2172
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
2173
+ status: "draft" | "sent" | "expired" | "issued" | "signed" | "executed" | "void";
2174
+ title: string;
2175
+ templateVersionId: string | null;
2176
+ seriesId: string | null;
2177
+ personId: string | null;
2178
+ organizationId: string | null;
2179
+ supplierId: string | null;
2180
+ channelId: string | null;
2181
+ bookingId: string | null;
2182
+ orderId: string | null;
2183
+ issuedAt: string | null;
2184
+ sentAt: string | null;
2185
+ executedAt: string | null;
2186
+ expiresAt: string | null;
2187
+ voidedAt: string | null;
2188
+ language: string;
2189
+ renderedBodyFormat: "markdown" | "html" | "lexical_json";
2190
+ renderedBody: string | null;
2191
+ variables: import("hono/utils/types").JSONValue;
2192
+ metadata: import("hono/utils/types").JSONValue;
2193
+ createdAt: string;
2194
+ updatedAt: string;
2195
+ } | null;
2196
+ };
2197
+ outputFormat: "json";
2198
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2199
+ };
2200
+ };
2201
+ } & {
2202
+ "/:id/sign": {
2203
+ $post: {
2204
+ input: {
2205
+ param: {
2206
+ id: string;
2207
+ };
2208
+ };
2209
+ output: {
2210
+ error: string;
2211
+ };
2212
+ outputFormat: "json";
2213
+ status: 404;
2214
+ } | {
2215
+ input: {
2216
+ param: {
2217
+ id: string;
2218
+ };
2219
+ };
2220
+ output: {
2221
+ error: string;
2222
+ };
2223
+ outputFormat: "json";
2224
+ status: 409;
2225
+ } | {
2226
+ input: {
2227
+ param: {
2228
+ id: string;
2229
+ };
2230
+ };
2231
+ output: {
2232
+ data: {
2233
+ contract: {
2234
+ id: string;
2235
+ contractNumber: string | null;
2236
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
2237
+ status: "draft" | "sent" | "expired" | "issued" | "signed" | "executed" | "void";
2238
+ title: string;
2239
+ templateVersionId: string | null;
2240
+ seriesId: string | null;
2241
+ personId: string | null;
2242
+ organizationId: string | null;
2243
+ supplierId: string | null;
2244
+ channelId: string | null;
2245
+ bookingId: string | null;
2246
+ orderId: string | null;
2247
+ issuedAt: string | null;
2248
+ sentAt: string | null;
2249
+ executedAt: string | null;
2250
+ expiresAt: string | null;
2251
+ voidedAt: string | null;
2252
+ language: string;
2253
+ renderedBodyFormat: "markdown" | "html" | "lexical_json";
2254
+ renderedBody: string | null;
2255
+ variables: import("hono/utils/types").JSONValue;
2256
+ metadata: import("hono/utils/types").JSONValue;
2257
+ createdAt: string;
2258
+ updatedAt: string;
2259
+ } | null;
2260
+ signature: {
2261
+ id: string;
2262
+ createdAt: string;
2263
+ personId: string | null;
2264
+ metadata: import("hono/utils/types").JSONValue;
2265
+ contractId: string;
2266
+ signerName: string;
2267
+ signerEmail: string | null;
2268
+ signerRole: string | null;
2269
+ method: "other" | "manual" | "electronic" | "docusign";
2270
+ provider: string | null;
2271
+ externalReference: string | null;
2272
+ signatureData: string | null;
2273
+ ipAddress: string | null;
2274
+ userAgent: string | null;
2275
+ signedAt: string;
2276
+ } | null;
2277
+ };
2278
+ };
2279
+ outputFormat: "json";
2280
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2281
+ };
2282
+ };
2283
+ } & {
2284
+ "/:id/execute": {
2285
+ $post: {
2286
+ input: {
2287
+ param: {
2288
+ id: string;
2289
+ };
2290
+ };
2291
+ output: {
2292
+ error: string;
2293
+ };
2294
+ outputFormat: "json";
2295
+ status: 404;
2296
+ } | {
2297
+ input: {
2298
+ param: {
2299
+ id: string;
2300
+ };
2301
+ };
2302
+ output: {
2303
+ error: string;
2304
+ };
2305
+ outputFormat: "json";
2306
+ status: 409;
2307
+ } | {
2308
+ input: {
2309
+ param: {
2310
+ id: string;
2311
+ };
2312
+ };
2313
+ output: {
2314
+ data: {
2315
+ id: string;
2316
+ contractNumber: string | null;
2317
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
2318
+ status: "draft" | "sent" | "expired" | "issued" | "signed" | "executed" | "void";
2319
+ title: string;
2320
+ templateVersionId: string | null;
2321
+ seriesId: string | null;
2322
+ personId: string | null;
2323
+ organizationId: string | null;
2324
+ supplierId: string | null;
2325
+ channelId: string | null;
2326
+ bookingId: string | null;
2327
+ orderId: string | null;
2328
+ issuedAt: string | null;
2329
+ sentAt: string | null;
2330
+ executedAt: string | null;
2331
+ expiresAt: string | null;
2332
+ voidedAt: string | null;
2333
+ language: string;
2334
+ renderedBodyFormat: "markdown" | "html" | "lexical_json";
2335
+ renderedBody: string | null;
2336
+ variables: import("hono/utils/types").JSONValue;
2337
+ metadata: import("hono/utils/types").JSONValue;
2338
+ createdAt: string;
2339
+ updatedAt: string;
2340
+ } | null;
2341
+ };
2342
+ outputFormat: "json";
2343
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2344
+ };
2345
+ };
2346
+ } & {
2347
+ "/:id/void": {
2348
+ $post: {
2349
+ input: {
2350
+ param: {
2351
+ id: string;
2352
+ };
2353
+ };
2354
+ output: {
2355
+ error: string;
2356
+ };
2357
+ outputFormat: "json";
2358
+ status: 404;
2359
+ } | {
2360
+ input: {
2361
+ param: {
2362
+ id: string;
2363
+ };
2364
+ };
2365
+ output: {
2366
+ error: string;
2367
+ };
2368
+ outputFormat: "json";
2369
+ status: 409;
2370
+ } | {
2371
+ input: {
2372
+ param: {
2373
+ id: string;
2374
+ };
2375
+ };
2376
+ output: {
2377
+ data: {
2378
+ id: string;
2379
+ contractNumber: string | null;
2380
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
2381
+ status: "draft" | "sent" | "expired" | "issued" | "signed" | "executed" | "void";
2382
+ title: string;
2383
+ templateVersionId: string | null;
2384
+ seriesId: string | null;
2385
+ personId: string | null;
2386
+ organizationId: string | null;
2387
+ supplierId: string | null;
2388
+ channelId: string | null;
2389
+ bookingId: string | null;
2390
+ orderId: string | null;
2391
+ issuedAt: string | null;
2392
+ sentAt: string | null;
2393
+ executedAt: string | null;
2394
+ expiresAt: string | null;
2395
+ voidedAt: string | null;
2396
+ language: string;
2397
+ renderedBodyFormat: "markdown" | "html" | "lexical_json";
2398
+ renderedBody: string | null;
2399
+ variables: import("hono/utils/types").JSONValue;
2400
+ metadata: import("hono/utils/types").JSONValue;
2401
+ createdAt: string;
2402
+ updatedAt: string;
2403
+ } | null;
2404
+ };
2405
+ outputFormat: "json";
2406
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2407
+ };
2408
+ };
2409
+ } & {
2410
+ "/:id/render": {
2411
+ $post: {
2412
+ input: {
2413
+ param: {
2414
+ id: string;
2415
+ };
2416
+ };
2417
+ output: {
2418
+ error: string;
2419
+ };
2420
+ outputFormat: "json";
2421
+ status: 404;
2422
+ } | {
2423
+ input: {
2424
+ param: {
2425
+ id: string;
2426
+ };
2427
+ };
2428
+ output: {
2429
+ data: {
2430
+ rendered: string;
2431
+ };
2432
+ };
2433
+ outputFormat: "json";
2434
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2435
+ };
2436
+ };
2437
+ } & {
2438
+ "/:id/generate-document": {
2439
+ $post: {
2440
+ input: {
2441
+ param: {
2442
+ id: string;
2443
+ };
2444
+ };
2445
+ output: {
2446
+ error: string;
2447
+ };
2448
+ outputFormat: "json";
2449
+ status: 501;
2450
+ } | {
2451
+ input: {
2452
+ param: {
2453
+ id: string;
2454
+ };
2455
+ };
2456
+ output: {
2457
+ error: string;
2458
+ };
2459
+ outputFormat: "json";
2460
+ status: 404;
2461
+ } | {
2462
+ input: {
2463
+ param: {
2464
+ id: string;
2465
+ };
2466
+ };
2467
+ output: {
2468
+ error: string;
2469
+ };
2470
+ outputFormat: "json";
2471
+ status: 409;
2472
+ } | {
2473
+ input: {
2474
+ param: {
2475
+ id: string;
2476
+ };
2477
+ };
2478
+ output: {
2479
+ error: string;
2480
+ };
2481
+ outputFormat: "json";
2482
+ status: 502;
2483
+ } | {
2484
+ input: {
2485
+ param: {
2486
+ id: string;
2487
+ };
2488
+ };
2489
+ output: {
2490
+ data: {
2491
+ status: "not_found" | "not_draft" | "render_unavailable" | "generator_failed";
2492
+ } | {
2493
+ status: "generated";
2494
+ contractId: string;
2495
+ contractStatus: "draft" | "sent" | "expired" | "issued" | "signed" | "executed" | "void";
2496
+ renderedBodyFormat: "markdown" | "html" | "lexical_json";
2497
+ renderedBody: string;
2498
+ attachment: {
2499
+ id: string;
2500
+ name: string;
2501
+ createdAt: string;
2502
+ kind: string;
2503
+ metadata: import("hono/utils/types").JSONValue;
2504
+ contractId: string;
2505
+ mimeType: string | null;
2506
+ fileSize: number | null;
2507
+ storageKey: string | null;
2508
+ checksum: string | null;
2509
+ };
2510
+ };
2511
+ };
2512
+ outputFormat: "json";
2513
+ status: 201;
2514
+ };
2515
+ };
2516
+ } & {
2517
+ "/:id/regenerate-document": {
2518
+ $post: {
2519
+ input: {
2520
+ param: {
2521
+ id: string;
2522
+ };
2523
+ };
2524
+ output: {
2525
+ error: string;
2526
+ };
2527
+ outputFormat: "json";
2528
+ status: 501;
2529
+ } | {
2530
+ input: {
2531
+ param: {
2532
+ id: string;
2533
+ };
2534
+ };
2535
+ output: {
2536
+ error: string;
2537
+ };
2538
+ outputFormat: "json";
2539
+ status: 404;
2540
+ } | {
2541
+ input: {
2542
+ param: {
2543
+ id: string;
2544
+ };
2545
+ };
2546
+ output: {
2547
+ error: string;
2548
+ };
2549
+ outputFormat: "json";
2550
+ status: 409;
2551
+ } | {
2552
+ input: {
2553
+ param: {
2554
+ id: string;
2555
+ };
2556
+ };
2557
+ output: {
2558
+ error: string;
2559
+ };
2560
+ outputFormat: "json";
2561
+ status: 502;
2562
+ } | {
2563
+ input: {
2564
+ param: {
2565
+ id: string;
2566
+ };
2567
+ };
2568
+ output: {
2569
+ data: {
2570
+ status: "not_found" | "not_draft" | "render_unavailable" | "generator_failed";
2571
+ } | {
2572
+ status: "generated";
2573
+ contractId: string;
2574
+ contractStatus: "draft" | "sent" | "expired" | "issued" | "signed" | "executed" | "void";
2575
+ renderedBodyFormat: "markdown" | "html" | "lexical_json";
2576
+ renderedBody: string;
2577
+ attachment: {
2578
+ id: string;
2579
+ name: string;
2580
+ createdAt: string;
2581
+ kind: string;
2582
+ metadata: import("hono/utils/types").JSONValue;
2583
+ contractId: string;
2584
+ mimeType: string | null;
2585
+ fileSize: number | null;
2586
+ storageKey: string | null;
2587
+ checksum: string | null;
2588
+ };
2589
+ };
2590
+ };
2591
+ outputFormat: "json";
2592
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2593
+ };
2594
+ };
2595
+ } & {
2596
+ "/:id/signatures": {
2597
+ $get: {
2598
+ input: {
2599
+ param: {
2600
+ id: string;
2601
+ };
2602
+ };
2603
+ output: {
2604
+ data: {
2605
+ id: string;
2606
+ contractId: string;
2607
+ signerName: string;
2608
+ signerEmail: string | null;
2609
+ signerRole: string | null;
2610
+ personId: string | null;
2611
+ method: "other" | "manual" | "electronic" | "docusign";
2612
+ provider: string | null;
2613
+ externalReference: string | null;
2614
+ signatureData: string | null;
2615
+ ipAddress: string | null;
2616
+ userAgent: string | null;
2617
+ signedAt: string;
2618
+ metadata: import("hono/utils/types").JSONValue;
2619
+ createdAt: string;
2620
+ }[];
2621
+ };
2622
+ outputFormat: "json";
2623
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2624
+ };
2625
+ };
2626
+ } & {
2627
+ "/:id/attachments": {
2628
+ $get: {
2629
+ input: {
2630
+ param: {
2631
+ id: string;
2632
+ };
2633
+ };
2634
+ output: {
2635
+ data: {
2636
+ id: string;
2637
+ contractId: string;
2638
+ kind: string;
2639
+ name: string;
2640
+ mimeType: string | null;
2641
+ fileSize: number | null;
2642
+ storageKey: string | null;
2643
+ checksum: string | null;
2644
+ metadata: import("hono/utils/types").JSONValue;
2645
+ createdAt: string;
2646
+ }[];
2647
+ };
2648
+ outputFormat: "json";
2649
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2650
+ };
2651
+ };
2652
+ } & {
2653
+ "/:id/attachments": {
2654
+ $post: {
2655
+ input: {
2656
+ param: {
2657
+ id: string;
2658
+ };
2659
+ };
2660
+ output: {
2661
+ error: string;
2662
+ };
2663
+ outputFormat: "json";
2664
+ status: 404;
2665
+ } | {
2666
+ input: {
2667
+ param: {
2668
+ id: string;
2669
+ };
2670
+ };
2671
+ output: {
2672
+ data: {
2673
+ id: string;
2674
+ name: string;
2675
+ createdAt: string;
2676
+ kind: string;
2677
+ metadata: import("hono/utils/types").JSONValue;
2678
+ contractId: string;
2679
+ mimeType: string | null;
2680
+ fileSize: number | null;
2681
+ storageKey: string | null;
2682
+ checksum: string | null;
2683
+ };
2684
+ };
2685
+ outputFormat: "json";
2686
+ status: 201;
2687
+ };
2688
+ };
2689
+ } & {
2690
+ "/attachments/:attachmentId": {
2691
+ $patch: {
2692
+ input: {
2693
+ param: {
2694
+ attachmentId: string;
2695
+ };
2696
+ };
2697
+ output: {
2698
+ error: string;
2699
+ };
2700
+ outputFormat: "json";
2701
+ status: 404;
2702
+ } | {
2703
+ input: {
2704
+ param: {
2705
+ attachmentId: string;
2706
+ };
2707
+ };
2708
+ output: {
2709
+ data: {
2710
+ id: string;
2711
+ contractId: string;
2712
+ kind: string;
2713
+ name: string;
2714
+ mimeType: string | null;
2715
+ fileSize: number | null;
2716
+ storageKey: string | null;
2717
+ checksum: string | null;
2718
+ metadata: import("hono/utils/types").JSONValue;
2719
+ createdAt: string;
2720
+ };
2721
+ };
2722
+ outputFormat: "json";
2723
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2724
+ };
2725
+ };
2726
+ } & {
2727
+ "/attachments/:attachmentId": {
2728
+ $delete: {
2729
+ input: {
2730
+ param: {
2731
+ attachmentId: string;
2732
+ };
2733
+ };
2734
+ output: {
2735
+ error: string;
2736
+ };
2737
+ outputFormat: "json";
2738
+ status: 404;
2739
+ } | {
2740
+ input: {
2741
+ param: {
2742
+ attachmentId: string;
2743
+ };
2744
+ };
2745
+ output: {
2746
+ success: true;
2747
+ };
2748
+ outputFormat: "json";
2749
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2750
+ };
2751
+ };
2752
+ }, "/", "/attachments/:attachmentId">;
2753
+ export declare function createContractsPublicRoutes(): import("hono/hono-base").HonoBase<Env, {
2754
+ "/templates/default": {
2755
+ $get: {
2756
+ input: {};
2757
+ output: {
2758
+ error: string;
2759
+ };
2760
+ outputFormat: "json";
2761
+ status: 404;
2762
+ } | {
2763
+ input: {};
2764
+ output: {
2765
+ data: {
2766
+ id: string;
2767
+ name: string;
2768
+ slug: string;
2769
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
2770
+ language: string;
2771
+ description: string | null;
2772
+ bodyFormat: "markdown" | "html" | "lexical_json";
2773
+ body: string;
2774
+ variableSchema: import("hono/utils/types").JSONValue;
2775
+ currentVersionId: string | null;
2776
+ active: boolean;
2777
+ createdAt: string;
2778
+ updatedAt: string;
2779
+ };
2780
+ };
2781
+ outputFormat: "json";
2782
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2783
+ };
2784
+ };
2785
+ } & {
2786
+ "/templates/:id/preview": {
2787
+ $post: {
2788
+ input: {
2789
+ param: {
2790
+ id: string;
2791
+ };
2792
+ };
2793
+ output: {
2794
+ error: string;
2795
+ };
2796
+ outputFormat: "json";
2797
+ status: 404;
2798
+ } | {
2799
+ input: {
2800
+ param: {
2801
+ id: string;
2802
+ };
2803
+ };
2804
+ output: {
2805
+ data: {
2806
+ rendered: string;
2807
+ bodyFormat: "markdown" | "html" | "lexical_json";
2808
+ };
2809
+ };
2810
+ outputFormat: "json";
2811
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2812
+ };
2813
+ };
2814
+ } & {
2815
+ "/:id": {
2816
+ $get: {
2817
+ input: {
2818
+ param: {
2819
+ id: string;
2820
+ };
2821
+ };
2822
+ output: {
2823
+ error: string;
2824
+ };
2825
+ outputFormat: "json";
2826
+ status: 404;
2827
+ } | {
2828
+ input: {
2829
+ param: {
2830
+ id: string;
2831
+ };
2832
+ };
2833
+ output: {
2834
+ data: {
2835
+ id: string;
2836
+ contractNumber: string | null;
2837
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
2838
+ status: "draft" | "sent" | "expired" | "issued" | "signed" | "executed" | "void";
2839
+ title: string;
2840
+ templateVersionId: string | null;
2841
+ seriesId: string | null;
2842
+ personId: string | null;
2843
+ organizationId: string | null;
2844
+ supplierId: string | null;
2845
+ channelId: string | null;
2846
+ bookingId: string | null;
2847
+ orderId: string | null;
2848
+ issuedAt: string | null;
2849
+ sentAt: string | null;
2850
+ executedAt: string | null;
2851
+ expiresAt: string | null;
2852
+ voidedAt: string | null;
2853
+ language: string;
2854
+ renderedBodyFormat: "markdown" | "html" | "lexical_json";
2855
+ renderedBody: string | null;
2856
+ variables: import("hono/utils/types").JSONValue;
2857
+ createdAt: string;
2858
+ updatedAt: string;
2859
+ };
2860
+ };
2861
+ outputFormat: "json";
2862
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2863
+ };
2864
+ };
2865
+ } & {
2866
+ "/:id/sign": {
2867
+ $post: {
2868
+ input: {
2869
+ param: {
2870
+ id: string;
2871
+ };
2872
+ };
2873
+ output: {
2874
+ error: string;
2875
+ };
2876
+ outputFormat: "json";
2877
+ status: 404;
2878
+ } | {
2879
+ input: {
2880
+ param: {
2881
+ id: string;
2882
+ };
2883
+ };
2884
+ output: {
2885
+ error: string;
2886
+ };
2887
+ outputFormat: "json";
2888
+ status: 409;
2889
+ } | {
2890
+ input: {
2891
+ param: {
2892
+ id: string;
2893
+ };
2894
+ };
2895
+ output: {
2896
+ data: {
2897
+ signature: {
2898
+ id: string;
2899
+ createdAt: string;
2900
+ personId: string | null;
2901
+ metadata: import("hono/utils/types").JSONValue;
2902
+ contractId: string;
2903
+ signerName: string;
2904
+ signerEmail: string | null;
2905
+ signerRole: string | null;
2906
+ method: "other" | "manual" | "electronic" | "docusign";
2907
+ provider: string | null;
2908
+ externalReference: string | null;
2909
+ signatureData: string | null;
2910
+ ipAddress: string | null;
2911
+ userAgent: string | null;
2912
+ signedAt: string;
2913
+ } | null;
2914
+ };
2915
+ };
2916
+ outputFormat: "json";
2917
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2918
+ };
2919
+ };
2920
+ }, "/", "/:id/sign">;
2921
+ export declare const contractsPublicRoutes: import("hono/hono-base").HonoBase<Env, {
2922
+ "/templates/default": {
2923
+ $get: {
2924
+ input: {};
2925
+ output: {
2926
+ error: string;
2927
+ };
2928
+ outputFormat: "json";
2929
+ status: 404;
2930
+ } | {
2931
+ input: {};
2932
+ output: {
2933
+ data: {
2934
+ id: string;
2935
+ name: string;
2936
+ slug: string;
2937
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
2938
+ language: string;
2939
+ description: string | null;
2940
+ bodyFormat: "markdown" | "html" | "lexical_json";
2941
+ body: string;
2942
+ variableSchema: import("hono/utils/types").JSONValue;
2943
+ currentVersionId: string | null;
2944
+ active: boolean;
2945
+ createdAt: string;
2946
+ updatedAt: string;
2947
+ };
2948
+ };
2949
+ outputFormat: "json";
2950
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2951
+ };
2952
+ };
2953
+ } & {
2954
+ "/templates/:id/preview": {
2955
+ $post: {
2956
+ input: {
2957
+ param: {
2958
+ id: string;
2959
+ };
2960
+ };
2961
+ output: {
2962
+ error: string;
2963
+ };
2964
+ outputFormat: "json";
2965
+ status: 404;
2966
+ } | {
2967
+ input: {
2968
+ param: {
2969
+ id: string;
2970
+ };
2971
+ };
2972
+ output: {
2973
+ data: {
2974
+ rendered: string;
2975
+ bodyFormat: "markdown" | "html" | "lexical_json";
2976
+ };
2977
+ };
2978
+ outputFormat: "json";
2979
+ status: import("hono/utils/http-status").ContentfulStatusCode;
2980
+ };
2981
+ };
2982
+ } & {
2983
+ "/:id": {
2984
+ $get: {
2985
+ input: {
2986
+ param: {
2987
+ id: string;
2988
+ };
2989
+ };
2990
+ output: {
2991
+ error: string;
2992
+ };
2993
+ outputFormat: "json";
2994
+ status: 404;
2995
+ } | {
2996
+ input: {
2997
+ param: {
2998
+ id: string;
2999
+ };
3000
+ };
3001
+ output: {
3002
+ data: {
3003
+ id: string;
3004
+ contractNumber: string | null;
3005
+ scope: "customer" | "partner" | "supplier" | "other" | "channel";
3006
+ status: "draft" | "sent" | "expired" | "issued" | "signed" | "executed" | "void";
3007
+ title: string;
3008
+ templateVersionId: string | null;
3009
+ seriesId: string | null;
3010
+ personId: string | null;
3011
+ organizationId: string | null;
3012
+ supplierId: string | null;
3013
+ channelId: string | null;
3014
+ bookingId: string | null;
3015
+ orderId: string | null;
3016
+ issuedAt: string | null;
3017
+ sentAt: string | null;
3018
+ executedAt: string | null;
3019
+ expiresAt: string | null;
3020
+ voidedAt: string | null;
3021
+ language: string;
3022
+ renderedBodyFormat: "markdown" | "html" | "lexical_json";
3023
+ renderedBody: string | null;
3024
+ variables: import("hono/utils/types").JSONValue;
3025
+ createdAt: string;
3026
+ updatedAt: string;
3027
+ };
3028
+ };
3029
+ outputFormat: "json";
3030
+ status: import("hono/utils/http-status").ContentfulStatusCode;
3031
+ };
3032
+ };
3033
+ } & {
3034
+ "/:id/sign": {
3035
+ $post: {
3036
+ input: {
3037
+ param: {
3038
+ id: string;
3039
+ };
3040
+ };
3041
+ output: {
3042
+ error: string;
3043
+ };
3044
+ outputFormat: "json";
3045
+ status: 404;
3046
+ } | {
3047
+ input: {
3048
+ param: {
3049
+ id: string;
3050
+ };
3051
+ };
3052
+ output: {
3053
+ error: string;
3054
+ };
3055
+ outputFormat: "json";
3056
+ status: 409;
1263
3057
  } | {
1264
3058
  input: {
1265
3059
  param: {
@@ -1292,6 +3086,7 @@ export declare const contractsPublicRoutes: import("hono/hono-base").HonoBase<En
1292
3086
  };
1293
3087
  };
1294
3088
  }, "/", "/:id/sign">;
3089
+ export type ContractsAdminRoutes = typeof contractsAdminRoutes;
1295
3090
  export type ContractsPublicRoutes = typeof contractsPublicRoutes;
1296
3091
  export {};
1297
3092
  //# sourceMappingURL=routes.d.ts.map