@voyantjs/legal 0.16.0 → 0.18.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.
package/LICENSE CHANGED
@@ -1,109 +1,201 @@
1
- # Functional Source License, Version 1.1, Apache 2.0 Future License
2
-
3
- ## Abbreviation
4
-
5
- FSL-1.1-Apache-2.0
6
-
7
- ## Notice
8
-
9
- Copyright 2026 PixelMakers Studio SRL
10
-
11
- ## Terms and Conditions
12
-
13
- ### Licensor ("We")
14
-
15
- The party offering the Software under these Terms and Conditions.
16
-
17
- ### The Software
18
-
19
- The "Software" is each version of the software that we make available under
20
- these Terms and Conditions, as indicated by our inclusion of these Terms and
21
- Conditions with the Software.
22
-
23
- ### License Grant
24
-
25
- Subject to your compliance with this License Grant and the Patents,
26
- Redistribution and Trademark clauses below, we hereby grant you the right to
27
- use, copy, modify, create derivative works, publicly perform, publicly
28
- display and redistribute the Software for any Permitted Purpose identified
29
- below.
30
-
31
- ### Permitted Purpose
32
-
33
- A Permitted Purpose is any purpose other than a Competing Use. A Competing
34
- Use means making the Software available to others in a commercial product or
35
- service that:
36
-
37
- 1. substitutes for the Software;
38
-
39
- 2. substitutes for any other product or service we offer using the Software
40
- that exists as of the date we make the Software available; or
41
-
42
- 3. offers the same or substantially similar functionality as the Software.
43
-
44
- Permitted Purposes specifically include using the Software:
45
-
46
- 1. for your internal use and access;
47
-
48
- 2. for non-commercial education;
49
-
50
- 3. for non-commercial research; and
51
-
52
- 4. in connection with professional services that you provide to a licensee
53
- using the Software in accordance with these Terms and Conditions.
54
-
55
- ### Patents
56
-
57
- To the extent your use for a Permitted Purpose would necessarily infringe
58
- our patents, the license grant above includes a license under our patents.
59
- If you make a claim against any party that the Software infringes or
60
- contributes to the infringement of any patent, then your patent license to
61
- the Software ends immediately.
62
-
63
- ### Redistribution
64
-
65
- The Terms and Conditions apply to all copies, modifications and derivatives
66
- of the Software.
67
-
68
- If you redistribute any copies, modifications or derivatives of the
69
- Software, you must include a copy of or a link to these Terms and Conditions
70
- and not remove any copyright notices provided in or with the Software.
71
-
72
- ### Disclaimer
73
-
74
- THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS
75
- OR IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A
76
- PARTICULAR PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
77
-
78
- IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO
79
- THE SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
80
- DAMAGES, EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
81
-
82
- ### Trademarks
83
-
84
- Except for displaying the License Details and identifying us as the origin
85
- of the Software, you have no right under these Terms and Conditions to use
86
- our trademarks, trade names, service marks or product names.
87
-
88
- ---
89
-
90
- ## Grant of Future License
91
-
92
- We hereby irrevocably grant you an additional license to use the Software
93
- under the Apache License, Version 2.0 that is effective on the second
94
- anniversary of the date we make the Software available. On or after that
95
- date, you may use the Software under the Apache License, Version 2.0, in
96
- which case the following will apply:
97
-
98
- Licensed under the Apache License, Version 2.0 (the "License"); you may not
99
- use this file except in compliance with the License.
100
-
101
- You may obtain a copy of the License at
102
-
103
- http://www.apache.org/licenses/LICENSE-2.0
104
-
105
- Unless required by applicable law or agreed to in writing, software
106
- distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
107
- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
108
- License for the specific language governing permissions and limitations
109
- under the License.
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for describing the origin of the Work and
141
+ reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may accept and charge a
167
+ fee for, the acceptance of support, warranty, indemnity, or
168
+ other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 PixelMakers Studio SRL
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -57,4 +57,4 @@ const app = createApp({
57
57
 
58
58
  ## License
59
59
 
60
- FSL-1.1-Apache-2.0
60
+ Apache-2.0
@@ -12,10 +12,10 @@ type Env = {
12
12
  export type ContractDocumentGenerator = Parameters<typeof contractsService.generateContractDocument>[3]["generator"];
13
13
  export interface ContractsRouteOptions {
14
14
  documentGenerator?: ContractDocumentGenerator;
15
- resolveDocumentGenerator?: (bindings: unknown) => ContractDocumentGenerator | undefined;
16
- resolveDocumentDownloadUrl?: (bindings: unknown, storageKey: string) => Promise<string | null> | string | null;
15
+ resolveDocumentGenerator?: (bindings: Record<string, unknown>) => ContractDocumentGenerator | undefined;
16
+ resolveDocumentDownloadUrl?: (bindings: Record<string, unknown>, storageKey: string) => Promise<string | null> | string | null;
17
17
  eventBus?: EventBus;
18
- resolveEventBus?: (bindings: unknown) => EventBus | undefined;
18
+ resolveEventBus?: (bindings: Record<string, unknown>) => EventBus | undefined;
19
19
  }
20
20
  export declare function createContractsAdminRoutes(options?: ContractsRouteOptions): import("hono/hono-base").HonoBase<Env, {
21
21
  "/templates": {
@@ -81,13 +81,13 @@ export declare function createContractsAdminRoutes(options?: ContractsRouteOptio
81
81
  input: {};
82
82
  output: {
83
83
  data: {
84
- id: string;
85
84
  name: string;
85
+ id: string;
86
+ description: string | null;
86
87
  createdAt: string;
87
88
  updatedAt: string;
88
89
  scope: "customer" | "partner" | "supplier" | "other" | "channel";
89
90
  slug: string;
90
- description: string | null;
91
91
  active: boolean;
92
92
  body: string;
93
93
  language: string;
@@ -355,8 +355,8 @@ export declare function createContractsAdminRoutes(options?: ContractsRouteOptio
355
355
  input: {};
356
356
  output: {
357
357
  data: {
358
- id: string;
359
358
  name: string;
359
+ id: string;
360
360
  prefix: string;
361
361
  createdAt: string;
362
362
  updatedAt: string;
@@ -1120,8 +1120,8 @@ export declare function createContractsAdminRoutes(options?: ContractsRouteOptio
1120
1120
  renderedBody: string;
1121
1121
  attachment: {
1122
1122
  metadata: import("hono/utils/types").JSONValue;
1123
- id: string;
1124
1123
  name: string;
1124
+ id: string;
1125
1125
  createdAt: string;
1126
1126
  kind: string;
1127
1127
  mimeType: string | null;
@@ -1199,8 +1199,8 @@ export declare function createContractsAdminRoutes(options?: ContractsRouteOptio
1199
1199
  renderedBody: string;
1200
1200
  attachment: {
1201
1201
  metadata: import("hono/utils/types").JSONValue;
1202
- id: string;
1203
1202
  name: string;
1203
+ id: string;
1204
1204
  createdAt: string;
1205
1205
  kind: string;
1206
1206
  mimeType: string | null;
@@ -1294,8 +1294,8 @@ export declare function createContractsAdminRoutes(options?: ContractsRouteOptio
1294
1294
  output: {
1295
1295
  data: {
1296
1296
  metadata: import("hono/utils/types").JSONValue;
1297
- id: string;
1298
1297
  name: string;
1298
+ id: string;
1299
1299
  createdAt: string;
1300
1300
  kind: string;
1301
1301
  mimeType: string | null;
@@ -1472,13 +1472,13 @@ export declare const contractsAdminRoutes: import("hono/hono-base").HonoBase<Env
1472
1472
  input: {};
1473
1473
  output: {
1474
1474
  data: {
1475
- id: string;
1476
1475
  name: string;
1476
+ id: string;
1477
+ description: string | null;
1477
1478
  createdAt: string;
1478
1479
  updatedAt: string;
1479
1480
  scope: "customer" | "partner" | "supplier" | "other" | "channel";
1480
1481
  slug: string;
1481
- description: string | null;
1482
1482
  active: boolean;
1483
1483
  body: string;
1484
1484
  language: string;
@@ -1746,8 +1746,8 @@ export declare const contractsAdminRoutes: import("hono/hono-base").HonoBase<Env
1746
1746
  input: {};
1747
1747
  output: {
1748
1748
  data: {
1749
- id: string;
1750
1749
  name: string;
1750
+ id: string;
1751
1751
  prefix: string;
1752
1752
  createdAt: string;
1753
1753
  updatedAt: string;
@@ -2511,8 +2511,8 @@ export declare const contractsAdminRoutes: import("hono/hono-base").HonoBase<Env
2511
2511
  renderedBody: string;
2512
2512
  attachment: {
2513
2513
  metadata: import("hono/utils/types").JSONValue;
2514
- id: string;
2515
2514
  name: string;
2515
+ id: string;
2516
2516
  createdAt: string;
2517
2517
  kind: string;
2518
2518
  mimeType: string | null;
@@ -2590,8 +2590,8 @@ export declare const contractsAdminRoutes: import("hono/hono-base").HonoBase<Env
2590
2590
  renderedBody: string;
2591
2591
  attachment: {
2592
2592
  metadata: import("hono/utils/types").JSONValue;
2593
- id: string;
2594
2593
  name: string;
2594
+ id: string;
2595
2595
  createdAt: string;
2596
2596
  kind: string;
2597
2597
  mimeType: string | null;
@@ -2685,8 +2685,8 @@ export declare const contractsAdminRoutes: import("hono/hono-base").HonoBase<Env
2685
2685
  output: {
2686
2686
  data: {
2687
2687
  metadata: import("hono/utils/types").JSONValue;
2688
- id: string;
2689
2688
  name: string;
2689
+ id: string;
2690
2690
  createdAt: string;
2691
2691
  kind: string;
2692
2692
  mimeType: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/contracts/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAE/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAQjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAoB/C,KAAK,GAAG,GAAG;IACT,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,SAAS,EAAE;QACT,SAAS,EAAE,eAAe,CAAA;QAC1B,EAAE,EAAE,kBAAkB,CAAA;QACtB,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,CAAA;CACF,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG,UAAU,CAChD,OAAO,gBAAgB,CAAC,wBAAwB,CACjD,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAA;AAEjB,MAAM,WAAW,qBAAqB;IACpC,iBAAiB,CAAC,EAAE,yBAAyB,CAAA;IAC7C,wBAAwB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,yBAAyB,GAAG,SAAS,CAAA;IACvF,0BAA0B,CAAC,EAAE,CAC3B,QAAQ,EAAE,OAAO,EACjB,UAAU,EAAE,MAAM,KACf,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,MAAM,GAAG,IAAI,CAAA;IAC3C,QAAQ,CAAC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCAA+B,CAAA;AAEhE,wBAAgB,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAiC1C;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAgC,CAAA;AAElE,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAA;AAC9D,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAA"}
@@ -1217,8 +1217,8 @@ export declare const contractRecordsService: {
1217
1217
  } | null>;
1218
1218
  createAttachment(db: PostgresJsDatabase, contractId: string, data: CreateContractAttachmentInput): Promise<{
1219
1219
  metadata: unknown;
1220
- id: string;
1221
1220
  name: string;
1221
+ id: string;
1222
1222
  createdAt: Date;
1223
1223
  kind: string;
1224
1224
  mimeType: string | null;
@@ -50,8 +50,8 @@ export declare const contractSeriesService: {
50
50
  updatedAt: Date;
51
51
  } | null>;
52
52
  createSeries(db: PostgresJsDatabase, data: CreateContractNumberSeriesInput): Promise<{
53
- id: string;
54
53
  name: string;
54
+ id: string;
55
55
  prefix: string;
56
56
  createdAt: Date;
57
57
  updatedAt: Date;
@@ -71,13 +71,13 @@ export declare const contractTemplatesService: {
71
71
  updatedAt: Date;
72
72
  } | null>;
73
73
  createTemplate(db: PostgresJsDatabase, data: CreateContractTemplateInput): Promise<{
74
- id: string;
75
74
  name: string;
75
+ id: string;
76
+ description: string | null;
76
77
  createdAt: Date;
77
78
  updatedAt: Date;
78
79
  scope: "customer" | "partner" | "supplier" | "other" | "channel";
79
80
  slug: string;
80
- description: string | null;
81
81
  active: boolean;
82
82
  body: string;
83
83
  language: string;
@@ -1229,8 +1229,8 @@ export declare const contractsService: {
1229
1229
  } | null>;
1230
1230
  createAttachment(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, contractId: string, data: import("./service-shared.js").CreateContractAttachmentInput): Promise<{
1231
1231
  metadata: unknown;
1232
- id: string;
1233
1232
  name: string;
1233
+ id: string;
1234
1234
  createdAt: Date;
1235
1235
  kind: string;
1236
1236
  mimeType: string | null;
@@ -1297,8 +1297,8 @@ export declare const contractsService: {
1297
1297
  updatedAt: Date;
1298
1298
  } | null>;
1299
1299
  createSeries(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, data: import("./service-shared.js").CreateContractNumberSeriesInput): Promise<{
1300
- id: string;
1301
1300
  name: string;
1301
+ id: string;
1302
1302
  prefix: string;
1303
1303
  createdAt: Date;
1304
1304
  updatedAt: Date;
@@ -1393,13 +1393,13 @@ export declare const contractsService: {
1393
1393
  updatedAt: Date;
1394
1394
  } | null>;
1395
1395
  createTemplate(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, data: import("./service-shared.js").CreateContractTemplateInput): Promise<{
1396
- id: string;
1397
1396
  name: string;
1397
+ id: string;
1398
+ description: string | null;
1398
1399
  createdAt: Date;
1399
1400
  updatedAt: Date;
1400
1401
  scope: "customer" | "partner" | "supplier" | "other" | "channel";
1401
1402
  slug: string;
1402
- description: string | null;
1403
1403
  active: boolean;
1404
1404
  body: string;
1405
1405
  language: string;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { Module } from "@voyantjs/core";
2
+ import type { AnyDrizzleDb } from "@voyantjs/db";
2
3
  import type { HonoModule } from "@voyantjs/hono/module";
3
- import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
4
4
  import { type ContractsRouteOptions } from "./contracts/routes.js";
5
5
  import { type AutoGenerateContractOptions } from "./contracts/service-auto-generate.js";
6
6
  export declare const legalLinkable: {
@@ -15,9 +15,12 @@ export interface CreateLegalHonoModuleOptions extends ContractsRouteOptions {
15
15
  /**
16
16
  * Required when `autoGenerateContractOnConfirmed.enabled` is true. The
17
17
  * `booking.confirmed` subscriber fires outside request scope, so it
18
- * needs its own db handle from runtime bindings.
18
+ * needs its own db handle from runtime bindings. Returns `AnyDrizzleDb`
19
+ * (the `PostgresJsDatabase | NeonHttpDatabase` union from
20
+ * `@voyantjs/db`) so consumers don't need to cast through `unknown` when
21
+ * wiring a Hyperdrive/Neon client.
19
22
  */
20
- resolveDb?: (bindings: Record<string, unknown>) => PostgresJsDatabase;
23
+ resolveDb?: (bindings: Record<string, unknown>) => AnyDrizzleDb;
21
24
  /**
22
25
  * Opt-in auto-generate on `booking.confirmed`. When enabled + a
23
26
  * `templateSlug` is supplied + a `documentGenerator` is resolvable, every
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAOjE,OAAO,EACL,KAAK,qBAAqB,EAG3B,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EACL,KAAK,2BAA2B,EAEjC,MAAM,sCAAsC,CAAA;AAI7C,eAAO,MAAM,aAAa;;;;;;CAGzB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,MAGzB,CAAA;AAED,MAAM,WAAW,4BAA6B,SAAQ,qBAAqB;IACzE;;;;OAIG;IACH,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,kBAAkB,CAAA;IACrE;;;;;;OAMG;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AAU,CAyE5F;AAED,eAAO,MAAM,eAAe,EAAE,UAAoC,CAAA;AAElE,cAAc,sBAAsB,CAAA;AACpC,OAAO,EACL,0BAA0B,EAC1B,qCAAqC,EACrC,KAAK,qBAAqB,GAC3B,MAAM,8BAA8B,CAAA;AACrC,YAAY,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAA;AAClE,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,8BAA8B,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,GAChC,MAAM,sCAAsC,CAAA;AAC7C,cAAc,qBAAqB,CAAA"}
package/dist/index.js CHANGED
@@ -43,6 +43,9 @@ export function createLegalHonoModule(options = {}) {
43
43
  const generator = runtime.documentGenerator;
44
44
  eventBus.subscribe("booking.confirmed", async (event) => {
45
45
  try {
46
+ // The resolver may return either drizzle flavor; the queries
47
+ // autoGenerateContractForBooking runs are compatible with both
48
+ // at runtime, so we narrow at this internal boundary.
46
49
  const db = resolveDb(bindings);
47
50
  const result = await autoGenerateContractForBooking(db, event.data, auto, {
48
51
  generator,
@@ -37,12 +37,12 @@ export declare const policiesAdminRoutes: import("hono/hono-base").HonoBase<Env,
37
37
  output: {
38
38
  data: {
39
39
  metadata: import("hono/utils/types").JSONValue;
40
- id: string;
41
40
  name: string;
41
+ id: string;
42
+ description: string | null;
42
43
  createdAt: string;
43
44
  updatedAt: string;
44
45
  slug: string;
45
- description: string | null;
46
46
  language: string;
47
47
  kind: "other" | "cancellation" | "payment" | "terms_and_conditions" | "privacy" | "refund" | "commission" | "guarantee";
48
48
  currentVersionId: string | null;
@@ -44,12 +44,12 @@ export declare const policiesCoreService: {
44
44
  } | null>;
45
45
  createPolicy(db: PostgresJsDatabase, data: CreatePolicyInput): Promise<{
46
46
  metadata: unknown;
47
- id: string;
48
47
  name: string;
48
+ id: string;
49
+ description: string | null;
49
50
  createdAt: Date;
50
51
  updatedAt: Date;
51
52
  slug: string;
52
- description: string | null;
53
53
  language: string;
54
54
  kind: "other" | "cancellation" | "payment" | "terms_and_conditions" | "privacy" | "refund" | "commission" | "guarantee";
55
55
  currentVersionId: string | null;
@@ -44,12 +44,12 @@ export declare const policiesService: {
44
44
  } | null>;
45
45
  createPolicy(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, data: import("./service-shared.js").CreatePolicyInput): Promise<{
46
46
  metadata: unknown;
47
- id: string;
48
47
  name: string;
48
+ id: string;
49
+ description: string | null;
49
50
  createdAt: Date;
50
51
  updatedAt: Date;
51
52
  slug: string;
52
- description: string | null;
53
53
  language: string;
54
54
  kind: "other" | "cancellation" | "payment" | "terms_and_conditions" | "privacy" | "refund" | "commission" | "guarantee";
55
55
  currentVersionId: string | null;
@@ -0,0 +1,3 @@
1
+ export * from "./contracts/schema.js";
2
+ export * from "./policies/schema.js";
3
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA"}
package/dist/schema.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./contracts/schema.js";
2
+ export * from "./policies/schema.js";
package/package.json CHANGED
@@ -1,66 +1,72 @@
1
1
  {
2
2
  "name": "@voyantjs/legal",
3
- "version": "0.16.0",
4
- "license": "FSL-1.1-Apache-2.0",
3
+ "version": "0.18.0",
4
+ "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
8
8
  "types": "./dist/index.d.ts",
9
- "import": "./dist/index.js"
9
+ "import": "./dist/index.js",
10
+ "default": "./dist/index.js"
11
+ },
12
+ "./schema": {
13
+ "types": "./dist/schema.d.ts",
14
+ "import": "./dist/schema.js",
15
+ "default": "./dist/schema.js"
10
16
  },
11
17
  "./contracts": {
12
18
  "types": "./dist/contracts/index.d.ts",
13
- "import": "./dist/contracts/index.js"
14
- },
15
- "./contracts/schema": {
16
- "types": "./dist/contracts/schema.d.ts",
17
- "import": "./dist/contracts/schema.js"
19
+ "import": "./dist/contracts/index.js",
20
+ "default": "./dist/contracts/index.js"
18
21
  },
19
22
  "./contracts/validation": {
20
23
  "types": "./dist/contracts/validation.d.ts",
21
- "import": "./dist/contracts/validation.js"
24
+ "import": "./dist/contracts/validation.js",
25
+ "default": "./dist/contracts/validation.js"
22
26
  },
23
27
  "./contracts/routes": {
24
28
  "types": "./dist/contracts/routes.d.ts",
25
- "import": "./dist/contracts/routes.js"
29
+ "import": "./dist/contracts/routes.js",
30
+ "default": "./dist/contracts/routes.js"
26
31
  },
27
32
  "./contracts/service": {
28
33
  "types": "./dist/contracts/service.d.ts",
29
- "import": "./dist/contracts/service.js"
34
+ "import": "./dist/contracts/service.js",
35
+ "default": "./dist/contracts/service.js"
30
36
  },
31
37
  "./policies": {
32
38
  "types": "./dist/policies/index.d.ts",
33
- "import": "./dist/policies/index.js"
34
- },
35
- "./policies/schema": {
36
- "types": "./dist/policies/schema.d.ts",
37
- "import": "./dist/policies/schema.js"
39
+ "import": "./dist/policies/index.js",
40
+ "default": "./dist/policies/index.js"
38
41
  },
39
42
  "./policies/validation": {
40
43
  "types": "./dist/policies/validation.d.ts",
41
- "import": "./dist/policies/validation.js"
44
+ "import": "./dist/policies/validation.js",
45
+ "default": "./dist/policies/validation.js"
42
46
  },
43
47
  "./policies/routes": {
44
48
  "types": "./dist/policies/routes.d.ts",
45
- "import": "./dist/policies/routes.js"
49
+ "import": "./dist/policies/routes.js",
50
+ "default": "./dist/policies/routes.js"
46
51
  },
47
52
  "./policies/service": {
48
53
  "types": "./dist/policies/service.d.ts",
49
- "import": "./dist/policies/service.js"
54
+ "import": "./dist/policies/service.js",
55
+ "default": "./dist/policies/service.js"
50
56
  }
51
57
  },
52
58
  "dependencies": {
53
59
  "drizzle-orm": "^0.45.2",
54
60
  "hono": "^4.12.10",
55
61
  "zod": "^4.3.6",
56
- "@voyantjs/bookings": "0.16.0",
57
- "@voyantjs/core": "0.16.0",
58
- "@voyantjs/crm": "0.16.0",
59
- "@voyantjs/db": "0.16.0",
60
- "@voyantjs/hono": "0.16.0",
61
- "@voyantjs/suppliers": "0.16.0",
62
- "@voyantjs/utils": "0.16.0",
63
- "@voyantjs/voyant-storage": "0.16.0"
62
+ "@voyantjs/bookings": "0.18.0",
63
+ "@voyantjs/core": "0.18.0",
64
+ "@voyantjs/crm": "0.18.0",
65
+ "@voyantjs/db": "0.18.0",
66
+ "@voyantjs/hono": "0.18.0",
67
+ "@voyantjs/suppliers": "0.18.0",
68
+ "@voyantjs/utils": "0.18.0",
69
+ "@voyantjs/voyant-storage": "0.18.0"
64
70
  },
65
71
  "devDependencies": {
66
72
  "typescript": "^6.0.2",
@@ -79,6 +85,12 @@
79
85
  "url": "https://github.com/voyantjs/voyant.git",
80
86
  "directory": "packages/legal"
81
87
  },
88
+ "voyant": {
89
+ "schema": "./schema",
90
+ "requiresSchemas": [
91
+ "@voyantjs/db"
92
+ ]
93
+ },
82
94
  "scripts": {
83
95
  "typecheck": "tsc --noEmit",
84
96
  "lint": "biome check src/",