@voyantjs/sellability 0.17.0 → 0.19.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
@@ -31,4 +31,4 @@ const app = createApp({
31
31
 
32
32
  ## License
33
33
 
34
- FSL-1.1-Apache-2.0
34
+ Apache-2.0
package/dist/routes.d.ts CHANGED
@@ -122,9 +122,9 @@ export declare const sellabilityRoutes: import("hono/hono-base").HonoBase<Env, {
122
122
  productId: string | null;
123
123
  optionId: string | null;
124
124
  slotId: string | null;
125
- channelId: string | null;
126
125
  marketId: string | null;
127
126
  fxRateSetId: string | null;
127
+ channelId: string | null;
128
128
  offerId: string | null;
129
129
  requestedCurrencyCode: string | null;
130
130
  sourceCurrencyCode: string | null;
@@ -347,9 +347,9 @@ export declare const sellabilityRoutes: import("hono/hono-base").HonoBase<Env, {
347
347
  productId: string | null;
348
348
  optionId: string | null;
349
349
  slotId: string | null;
350
- channelId: string | null;
351
350
  marketId: string | null;
352
351
  fxRateSetId: string | null;
352
+ channelId: string | null;
353
353
  offerId: string | null;
354
354
  requestedCurrencyCode: string | null;
355
355
  sourceCurrencyCode: string | null;
@@ -369,19 +369,19 @@ export declare const sellabilityRoutes: import("hono/hono-base").HonoBase<Env, {
369
369
  status: "draft" | "expired" | "published" | "sent" | "accepted" | "withdrawn" | "converted";
370
370
  currency: string;
371
371
  notes: string | null;
372
- costAmountCents: number;
372
+ marketId: string | null;
373
+ sourceChannelId: string | null;
374
+ fxRateSetId: string | null;
373
375
  title: string;
376
+ costAmountCents: number;
374
377
  validFrom: string | null;
375
378
  contactEmail: string | null;
376
379
  contactPhone: string | null;
377
- marketId: string | null;
378
380
  baseCurrency: string | null;
379
- fxRateSetId: string | null;
380
381
  offerNumber: string;
381
382
  personId: string | null;
382
383
  opportunityId: string | null;
383
384
  quoteId: string | null;
384
- sourceChannelId: string | null;
385
385
  contactFirstName: string | null;
386
386
  contactLastName: string | null;
387
387
  contactPreferredLanguage: string | null;
@@ -428,8 +428,8 @@ export declare const sellabilityRoutes: import("hono/hono-base").HonoBase<Env, {
428
428
  lastName: string;
429
429
  phone: string | null;
430
430
  isPrimary: boolean;
431
- personId: string | null;
432
431
  offerId: string;
432
+ personId: string | null;
433
433
  preferredLanguage: string | null;
434
434
  offerItemId: string | null;
435
435
  }[];
@@ -445,8 +445,8 @@ export declare const sellabilityRoutes: import("hono/hono-base").HonoBase<Env, {
445
445
  lastName: string;
446
446
  phone: string | null;
447
447
  isPrimary: boolean;
448
- personId: string | null;
449
448
  offerId: string;
449
+ personId: string | null;
450
450
  preferredLanguage: string | null;
451
451
  offerItemId: string | null;
452
452
  }[];
@@ -463,14 +463,14 @@ export declare const sellabilityRoutes: import("hono/hono-base").HonoBase<Env, {
463
463
  startsAt: string | null;
464
464
  endsAt: string | null;
465
465
  slotId: string | null;
466
- sellCurrency: string;
467
466
  title: string;
467
+ unitId: string | null;
468
+ sellCurrency: string;
468
469
  costCurrency: string | null;
469
470
  quantity: number;
470
- unitId: string | null;
471
+ offerId: string;
471
472
  taxAmountCents: number | null;
472
473
  feeAmountCents: number | null;
473
- offerId: string;
474
474
  itemType: "service" | "other" | "accommodation" | "transport" | "unit" | "adjustment" | "extra" | "fee" | "tax" | "discount";
475
475
  serviceDate: string | null;
476
476
  unitSellAmountCents: number | null;
@@ -621,7 +621,7 @@ export declare const sellabilityRoutes: import("hono/hono-base").HonoBase<Env, {
621
621
  data: {
622
622
  id: string;
623
623
  name: string;
624
- scope: "product" | "option" | "channel" | "market" | "global";
624
+ scope: "channel" | "product" | "option" | "market" | "global";
625
625
  policyType: "custom" | "currency" | "pickup" | "capability" | "question" | "allotment" | "occupancy" | "availability_window";
626
626
  productId: string | null;
627
627
  optionId: string | null;
@@ -663,13 +663,13 @@ export declare const sellabilityRoutes: import("hono/hono-base").HonoBase<Env, {
663
663
  name: string;
664
664
  createdAt: string;
665
665
  updatedAt: string;
666
- scope: "product" | "option" | "channel" | "market" | "global";
666
+ scope: "channel" | "product" | "option" | "market" | "global";
667
667
  notes: string | null;
668
668
  active: boolean;
669
669
  productId: string | null;
670
670
  optionId: string | null;
671
- channelId: string | null;
672
671
  marketId: string | null;
672
+ channelId: string | null;
673
673
  priority: number;
674
674
  policyType: "custom" | "currency" | "pickup" | "capability" | "question" | "allotment" | "occupancy" | "availability_window";
675
675
  conditions: {
@@ -707,7 +707,7 @@ export declare const sellabilityRoutes: import("hono/hono-base").HonoBase<Env, {
707
707
  data: {
708
708
  id: string;
709
709
  name: string;
710
- scope: "product" | "option" | "channel" | "market" | "global";
710
+ scope: "channel" | "product" | "option" | "market" | "global";
711
711
  policyType: "custom" | "currency" | "pickup" | "capability" | "question" | "allotment" | "occupancy" | "availability_window";
712
712
  productId: string | null;
713
713
  optionId: string | null;
@@ -756,7 +756,7 @@ export declare const sellabilityRoutes: import("hono/hono-base").HonoBase<Env, {
756
756
  data: {
757
757
  id: string;
758
758
  name: string;
759
- scope: "product" | "option" | "channel" | "market" | "global";
759
+ scope: "channel" | "product" | "option" | "market" | "global";
760
760
  policyType: "custom" | "currency" | "pickup" | "capability" | "question" | "allotment" | "occupancy" | "availability_window";
761
761
  productId: string | null;
762
762
  optionId: string | null;
package/dist/schema.d.ts CHANGED
@@ -747,7 +747,7 @@ export declare const sellabilityPolicies: import("drizzle-orm/pg-core").PgTableW
747
747
  tableName: "sellability_policies";
748
748
  dataType: "string";
749
749
  columnType: "PgEnumColumn";
750
- data: "product" | "option" | "channel" | "market" | "global";
750
+ data: "channel" | "product" | "option" | "market" | "global";
751
751
  driverParam: string;
752
752
  notNull: true;
753
753
  hasDefault: true;
package/dist/service.d.ts CHANGED
@@ -139,9 +139,9 @@ export declare const sellabilityService: {
139
139
  productId: string | null;
140
140
  optionId: string | null;
141
141
  slotId: string | null;
142
- channelId: string | null;
143
142
  marketId: string | null;
144
143
  fxRateSetId: string | null;
144
+ channelId: string | null;
145
145
  offerId: string | null;
146
146
  requestedCurrencyCode: string | null;
147
147
  sourceCurrencyCode: string | null;
@@ -157,19 +157,19 @@ export declare const sellabilityService: {
157
157
  status: "draft" | "expired" | "published" | "sent" | "accepted" | "withdrawn" | "converted";
158
158
  currency: string;
159
159
  notes: string | null;
160
- costAmountCents: number;
160
+ marketId: string | null;
161
+ sourceChannelId: string | null;
162
+ fxRateSetId: string | null;
161
163
  title: string;
164
+ costAmountCents: number;
162
165
  validFrom: string | null;
163
166
  contactEmail: string | null;
164
167
  contactPhone: string | null;
165
- marketId: string | null;
166
168
  baseCurrency: string | null;
167
- fxRateSetId: string | null;
168
169
  offerNumber: string;
169
170
  personId: string | null;
170
171
  opportunityId: string | null;
171
172
  quoteId: string | null;
172
- sourceChannelId: string | null;
173
173
  contactFirstName: string | null;
174
174
  contactLastName: string | null;
175
175
  contactPreferredLanguage: string | null;
@@ -216,8 +216,8 @@ export declare const sellabilityService: {
216
216
  lastName: string;
217
217
  phone: string | null;
218
218
  isPrimary: boolean;
219
- personId: string | null;
220
219
  offerId: string;
220
+ personId: string | null;
221
221
  preferredLanguage: string | null;
222
222
  offerItemId: string | null;
223
223
  }[];
@@ -233,8 +233,8 @@ export declare const sellabilityService: {
233
233
  lastName: string;
234
234
  phone: string | null;
235
235
  isPrimary: boolean;
236
- personId: string | null;
237
236
  offerId: string;
237
+ personId: string | null;
238
238
  preferredLanguage: string | null;
239
239
  offerItemId: string | null;
240
240
  }[];
@@ -251,14 +251,14 @@ export declare const sellabilityService: {
251
251
  startsAt: Date | null;
252
252
  endsAt: Date | null;
253
253
  slotId: string | null;
254
- sellCurrency: string;
255
254
  title: string;
255
+ unitId: string | null;
256
+ sellCurrency: string;
256
257
  costCurrency: string | null;
257
258
  quantity: number;
258
- unitId: string | null;
259
+ offerId: string;
259
260
  taxAmountCents: number | null;
260
261
  feeAmountCents: number | null;
261
- offerId: string;
262
262
  itemType: "service" | "other" | "accommodation" | "transport" | "unit" | "adjustment" | "extra" | "fee" | "tax" | "discount";
263
263
  serviceDate: string | null;
264
264
  unitSellAmountCents: number | null;
@@ -285,9 +285,9 @@ export declare const sellabilityService: {
285
285
  productId: string | null;
286
286
  optionId: string | null;
287
287
  slotId: string | null;
288
- channelId: string | null;
289
288
  marketId: string | null;
290
289
  fxRateSetId: string | null;
290
+ channelId: string | null;
291
291
  offerId: string | null;
292
292
  requestedCurrencyCode: string | null;
293
293
  sourceCurrencyCode: string | null;
@@ -438,7 +438,7 @@ export declare const sellabilityService: {
438
438
  data: {
439
439
  id: string;
440
440
  name: string;
441
- scope: "product" | "option" | "channel" | "market" | "global";
441
+ scope: "channel" | "product" | "option" | "market" | "global";
442
442
  policyType: "custom" | "currency" | "pickup" | "capability" | "question" | "allotment" | "occupancy" | "availability_window";
443
443
  productId: string | null;
444
444
  optionId: string | null;
@@ -460,7 +460,7 @@ export declare const sellabilityService: {
460
460
  getPolicyById(db: PostgresJsDatabase, id: string): Promise<{
461
461
  id: string;
462
462
  name: string;
463
- scope: "product" | "option" | "channel" | "market" | "global";
463
+ scope: "channel" | "product" | "option" | "market" | "global";
464
464
  policyType: "custom" | "currency" | "pickup" | "capability" | "question" | "allotment" | "occupancy" | "availability_window";
465
465
  productId: string | null;
466
466
  optionId: string | null;
@@ -481,13 +481,13 @@ export declare const sellabilityService: {
481
481
  name: string;
482
482
  createdAt: Date;
483
483
  updatedAt: Date;
484
- scope: "product" | "option" | "channel" | "market" | "global";
484
+ scope: "channel" | "product" | "option" | "market" | "global";
485
485
  notes: string | null;
486
486
  active: boolean;
487
487
  productId: string | null;
488
488
  optionId: string | null;
489
- channelId: string | null;
490
489
  marketId: string | null;
490
+ channelId: string | null;
491
491
  priority: number;
492
492
  policyType: "custom" | "currency" | "pickup" | "capability" | "question" | "allotment" | "occupancy" | "availability_window";
493
493
  conditions: Record<string, unknown>;
@@ -496,7 +496,7 @@ export declare const sellabilityService: {
496
496
  updatePolicy(db: PostgresJsDatabase, id: string, data: UpdateSellabilityPolicyInput): Promise<{
497
497
  id: string;
498
498
  name: string;
499
- scope: "product" | "option" | "channel" | "market" | "global";
499
+ scope: "channel" | "product" | "option" | "market" | "global";
500
500
  policyType: "custom" | "currency" | "pickup" | "capability" | "question" | "allotment" | "occupancy" | "availability_window";
501
501
  productId: string | null;
502
502
  optionId: string | null;
@@ -29,9 +29,9 @@ export declare const sellabilitySnapshotStatusSchema: z.ZodEnum<{
29
29
  offer_constructed: "offer_constructed";
30
30
  }>;
31
31
  export declare const sellabilityPolicyScopeSchema: z.ZodEnum<{
32
+ channel: "channel";
32
33
  product: "product";
33
34
  option: "option";
34
- channel: "channel";
35
35
  market: "market";
36
36
  global: "global";
37
37
  }>;
@@ -130,9 +130,9 @@ export declare const sellabilityConstructOfferSchema: z.ZodObject<{
130
130
  startTimeId: z.ZodOptional<z.ZodString>;
131
131
  dateLocal: z.ZodOptional<z.ZodString>;
132
132
  pickupPointId: z.ZodOptional<z.ZodString>;
133
+ marketId: z.ZodOptional<z.ZodString>;
133
134
  channelId: z.ZodOptional<z.ZodString>;
134
135
  currencyCode: z.ZodOptional<z.ZodString>;
135
- marketId: z.ZodOptional<z.ZodString>;
136
136
  requestedUnits: z.ZodDefault<z.ZodArray<z.ZodObject<{
137
137
  requestRef: z.ZodOptional<z.ZodString>;
138
138
  unitId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -272,9 +272,9 @@ export declare const sellabilitySnapshotItemListQuerySchema: z.ZodObject<{
272
272
  export declare const sellabilityPolicyCoreSchema: z.ZodObject<{
273
273
  name: z.ZodString;
274
274
  scope: z.ZodDefault<z.ZodEnum<{
275
+ channel: "channel";
275
276
  product: "product";
276
277
  option: "option";
277
- channel: "channel";
278
278
  market: "market";
279
279
  global: "global";
280
280
  }>>;
@@ -302,9 +302,9 @@ export declare const sellabilityPolicyCoreSchema: z.ZodObject<{
302
302
  export declare const insertSellabilityPolicySchema: z.ZodObject<{
303
303
  name: z.ZodString;
304
304
  scope: z.ZodDefault<z.ZodEnum<{
305
+ channel: "channel";
305
306
  product: "product";
306
307
  option: "option";
307
- channel: "channel";
308
308
  market: "market";
309
309
  global: "global";
310
310
  }>>;
@@ -332,9 +332,9 @@ export declare const insertSellabilityPolicySchema: z.ZodObject<{
332
332
  export declare const updateSellabilityPolicySchema: z.ZodObject<{
333
333
  name: z.ZodOptional<z.ZodString>;
334
334
  scope: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
335
+ channel: "channel";
335
336
  product: "product";
336
337
  option: "option";
337
- channel: "channel";
338
338
  market: "market";
339
339
  global: "global";
340
340
  }>>>;
@@ -363,9 +363,9 @@ export declare const sellabilityPolicyListQuerySchema: z.ZodObject<{
363
363
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
364
364
  offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
365
365
  scope: z.ZodOptional<z.ZodEnum<{
366
+ channel: "channel";
366
367
  product: "product";
367
368
  option: "option";
368
- channel: "channel";
369
369
  market: "market";
370
370
  global: "global";
371
371
  }>>;
package/package.json CHANGED
@@ -1,39 +1,43 @@
1
1
  {
2
2
  "name": "@voyantjs/sellability",
3
- "version": "0.17.0",
4
- "license": "FSL-1.1-Apache-2.0",
3
+ "version": "0.19.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"
10
11
  },
11
12
  "./schema": {
12
13
  "types": "./dist/schema.d.ts",
13
- "import": "./dist/schema.js"
14
+ "import": "./dist/schema.js",
15
+ "default": "./dist/schema.js"
14
16
  },
15
17
  "./validation": {
16
18
  "types": "./dist/validation.d.ts",
17
- "import": "./dist/validation.js"
19
+ "import": "./dist/validation.js",
20
+ "default": "./dist/validation.js"
18
21
  },
19
22
  "./routes": {
20
23
  "types": "./dist/routes.d.ts",
21
- "import": "./dist/routes.js"
24
+ "import": "./dist/routes.js",
25
+ "default": "./dist/routes.js"
22
26
  }
23
27
  },
24
28
  "dependencies": {
25
29
  "drizzle-orm": "^0.45.2",
26
30
  "hono": "^4.12.10",
27
31
  "zod": "^4.3.6",
28
- "@voyantjs/availability": "0.17.0",
29
- "@voyantjs/core": "0.17.0",
30
- "@voyantjs/db": "0.17.0",
31
- "@voyantjs/distribution": "0.17.0",
32
- "@voyantjs/hono": "0.17.0",
33
- "@voyantjs/markets": "0.17.0",
34
- "@voyantjs/pricing": "0.17.0",
35
- "@voyantjs/products": "0.17.0",
36
- "@voyantjs/transactions": "0.17.0"
32
+ "@voyantjs/availability": "0.19.0",
33
+ "@voyantjs/core": "0.19.0",
34
+ "@voyantjs/db": "0.19.0",
35
+ "@voyantjs/distribution": "0.19.0",
36
+ "@voyantjs/hono": "0.19.0",
37
+ "@voyantjs/markets": "0.19.0",
38
+ "@voyantjs/pricing": "0.19.0",
39
+ "@voyantjs/products": "0.19.0",
40
+ "@voyantjs/transactions": "0.19.0"
37
41
  },
38
42
  "devDependencies": {
39
43
  "typescript": "^6.0.2",
@@ -50,6 +54,12 @@
50
54
  "url": "https://github.com/voyantjs/voyant.git",
51
55
  "directory": "packages/sellability"
52
56
  },
57
+ "voyant": {
58
+ "schema": "./schema",
59
+ "requiresSchemas": [
60
+ "@voyantjs/db"
61
+ ]
62
+ },
53
63
  "scripts": {
54
64
  "typecheck": "tsc --noEmit",
55
65
  "lint": "biome check src/",