@voyantjs/distribution 0.5.0 → 0.6.2
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/dist/booking-extension.d.ts +6 -6
- package/dist/booking-extension.d.ts.map +1 -1
- package/dist/booking-extension.js +2 -1
- package/dist/routes.d.ts +77 -77
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +80 -79
- package/dist/schema-core.d.ts +4 -4
- package/dist/schema-finance.d.ts +1 -1
- package/dist/service.d.ts +66 -66
- package/dist/validation.d.ts +24 -24
- package/package.json +8 -8
package/dist/validation.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const channelKindSchema: z.ZodEnum<{
|
|
3
|
+
reseller: "reseller";
|
|
3
4
|
direct: "direct";
|
|
4
5
|
affiliate: "affiliate";
|
|
5
6
|
ota: "ota";
|
|
6
|
-
reseller: "reseller";
|
|
7
7
|
marketplace: "marketplace";
|
|
8
8
|
api_partner: "api_partner";
|
|
9
9
|
}>;
|
|
10
10
|
export declare const channelStatusSchema: z.ZodEnum<{
|
|
11
|
+
pending: "pending";
|
|
11
12
|
active: "active";
|
|
12
13
|
archived: "archived";
|
|
13
14
|
inactive: "inactive";
|
|
14
|
-
pending: "pending";
|
|
15
15
|
}>;
|
|
16
16
|
export declare const channelContractStatusSchema: z.ZodEnum<{
|
|
17
17
|
draft: "draft";
|
|
@@ -20,9 +20,9 @@ export declare const channelContractStatusSchema: z.ZodEnum<{
|
|
|
20
20
|
terminated: "terminated";
|
|
21
21
|
}>;
|
|
22
22
|
export declare const distributionPaymentOwnerSchema: z.ZodEnum<{
|
|
23
|
+
split: "split";
|
|
23
24
|
operator: "operator";
|
|
24
25
|
channel: "channel";
|
|
25
|
-
split: "split";
|
|
26
26
|
}>;
|
|
27
27
|
export declare const distributionCancellationOwnerSchema: z.ZodEnum<{
|
|
28
28
|
operator: "operator";
|
|
@@ -30,8 +30,8 @@ export declare const distributionCancellationOwnerSchema: z.ZodEnum<{
|
|
|
30
30
|
mixed: "mixed";
|
|
31
31
|
}>;
|
|
32
32
|
export declare const channelCommissionScopeSchema: z.ZodEnum<{
|
|
33
|
-
product: "product";
|
|
34
33
|
category: "category";
|
|
34
|
+
product: "product";
|
|
35
35
|
booking: "booking";
|
|
36
36
|
rate: "rate";
|
|
37
37
|
}>;
|
|
@@ -62,8 +62,8 @@ export declare const channelSettlementRunStatusSchema: z.ZodEnum<{
|
|
|
62
62
|
paid: "paid";
|
|
63
63
|
}>;
|
|
64
64
|
export declare const channelSettlementItemStatusSchema: z.ZodEnum<{
|
|
65
|
-
void: "void";
|
|
66
65
|
pending: "pending";
|
|
66
|
+
void: "void";
|
|
67
67
|
paid: "paid";
|
|
68
68
|
approved: "approved";
|
|
69
69
|
disputed: "disputed";
|
|
@@ -136,18 +136,18 @@ export declare const channelCoreSchema: z.ZodObject<{
|
|
|
136
136
|
name: z.ZodString;
|
|
137
137
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
138
138
|
kind: z.ZodEnum<{
|
|
139
|
+
reseller: "reseller";
|
|
139
140
|
direct: "direct";
|
|
140
141
|
affiliate: "affiliate";
|
|
141
142
|
ota: "ota";
|
|
142
|
-
reseller: "reseller";
|
|
143
143
|
marketplace: "marketplace";
|
|
144
144
|
api_partner: "api_partner";
|
|
145
145
|
}>;
|
|
146
146
|
status: z.ZodDefault<z.ZodEnum<{
|
|
147
|
+
pending: "pending";
|
|
147
148
|
active: "active";
|
|
148
149
|
archived: "archived";
|
|
149
150
|
inactive: "inactive";
|
|
150
|
-
pending: "pending";
|
|
151
151
|
}>>;
|
|
152
152
|
website: z.ZodPipe<z.ZodUnion<[z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodLiteral<"">]>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
153
153
|
contactName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -158,18 +158,18 @@ export declare const insertChannelSchema: z.ZodObject<{
|
|
|
158
158
|
name: z.ZodString;
|
|
159
159
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
160
160
|
kind: z.ZodEnum<{
|
|
161
|
+
reseller: "reseller";
|
|
161
162
|
direct: "direct";
|
|
162
163
|
affiliate: "affiliate";
|
|
163
164
|
ota: "ota";
|
|
164
|
-
reseller: "reseller";
|
|
165
165
|
marketplace: "marketplace";
|
|
166
166
|
api_partner: "api_partner";
|
|
167
167
|
}>;
|
|
168
168
|
status: z.ZodDefault<z.ZodEnum<{
|
|
169
|
+
pending: "pending";
|
|
169
170
|
active: "active";
|
|
170
171
|
archived: "archived";
|
|
171
172
|
inactive: "inactive";
|
|
172
|
-
pending: "pending";
|
|
173
173
|
}>>;
|
|
174
174
|
website: z.ZodPipe<z.ZodUnion<[z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodLiteral<"">]>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
175
175
|
contactName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -180,18 +180,18 @@ export declare const updateChannelSchema: z.ZodObject<{
|
|
|
180
180
|
name: z.ZodOptional<z.ZodString>;
|
|
181
181
|
description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
182
182
|
kind: z.ZodOptional<z.ZodEnum<{
|
|
183
|
+
reseller: "reseller";
|
|
183
184
|
direct: "direct";
|
|
184
185
|
affiliate: "affiliate";
|
|
185
186
|
ota: "ota";
|
|
186
|
-
reseller: "reseller";
|
|
187
187
|
marketplace: "marketplace";
|
|
188
188
|
api_partner: "api_partner";
|
|
189
189
|
}>>;
|
|
190
190
|
status: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
191
|
+
pending: "pending";
|
|
191
192
|
active: "active";
|
|
192
193
|
archived: "archived";
|
|
193
194
|
inactive: "inactive";
|
|
194
|
-
pending: "pending";
|
|
195
195
|
}>>>;
|
|
196
196
|
website: z.ZodOptional<z.ZodPipe<z.ZodUnion<[z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodLiteral<"">]>, z.ZodTransform<string | null, string | null | undefined>>>;
|
|
197
197
|
contactName: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
@@ -202,18 +202,18 @@ export declare const channelListQuerySchema: z.ZodObject<{
|
|
|
202
202
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
203
203
|
offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
204
204
|
kind: z.ZodOptional<z.ZodEnum<{
|
|
205
|
+
reseller: "reseller";
|
|
205
206
|
direct: "direct";
|
|
206
207
|
affiliate: "affiliate";
|
|
207
208
|
ota: "ota";
|
|
208
|
-
reseller: "reseller";
|
|
209
209
|
marketplace: "marketplace";
|
|
210
210
|
api_partner: "api_partner";
|
|
211
211
|
}>>;
|
|
212
212
|
status: z.ZodOptional<z.ZodEnum<{
|
|
213
|
+
pending: "pending";
|
|
213
214
|
active: "active";
|
|
214
215
|
archived: "archived";
|
|
215
216
|
inactive: "inactive";
|
|
216
|
-
pending: "pending";
|
|
217
217
|
}>>;
|
|
218
218
|
}, z.core.$strip>;
|
|
219
219
|
export declare const channelContractCoreSchema: z.ZodObject<{
|
|
@@ -228,9 +228,9 @@ export declare const channelContractCoreSchema: z.ZodObject<{
|
|
|
228
228
|
startsAt: z.ZodString;
|
|
229
229
|
endsAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
230
230
|
paymentOwner: z.ZodDefault<z.ZodEnum<{
|
|
231
|
+
split: "split";
|
|
231
232
|
operator: "operator";
|
|
232
233
|
channel: "channel";
|
|
233
|
-
split: "split";
|
|
234
234
|
}>>;
|
|
235
235
|
cancellationOwner: z.ZodDefault<z.ZodEnum<{
|
|
236
236
|
operator: "operator";
|
|
@@ -252,9 +252,9 @@ export declare const insertChannelContractSchema: z.ZodObject<{
|
|
|
252
252
|
startsAt: z.ZodString;
|
|
253
253
|
endsAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
254
254
|
paymentOwner: z.ZodDefault<z.ZodEnum<{
|
|
255
|
+
split: "split";
|
|
255
256
|
operator: "operator";
|
|
256
257
|
channel: "channel";
|
|
257
|
-
split: "split";
|
|
258
258
|
}>>;
|
|
259
259
|
cancellationOwner: z.ZodDefault<z.ZodEnum<{
|
|
260
260
|
operator: "operator";
|
|
@@ -276,9 +276,9 @@ export declare const updateChannelContractSchema: z.ZodObject<{
|
|
|
276
276
|
startsAt: z.ZodOptional<z.ZodString>;
|
|
277
277
|
endsAt: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
278
278
|
paymentOwner: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
279
|
+
split: "split";
|
|
279
280
|
operator: "operator";
|
|
280
281
|
channel: "channel";
|
|
281
|
-
split: "split";
|
|
282
282
|
}>>>;
|
|
283
283
|
cancellationOwner: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
284
284
|
operator: "operator";
|
|
@@ -303,8 +303,8 @@ export declare const channelContractListQuerySchema: z.ZodObject<{
|
|
|
303
303
|
export declare const channelCommissionRuleCoreSchema: z.ZodObject<{
|
|
304
304
|
contractId: z.ZodString;
|
|
305
305
|
scope: z.ZodEnum<{
|
|
306
|
-
product: "product";
|
|
307
306
|
category: "category";
|
|
307
|
+
product: "product";
|
|
308
308
|
booking: "booking";
|
|
309
309
|
rate: "rate";
|
|
310
310
|
}>;
|
|
@@ -323,8 +323,8 @@ export declare const channelCommissionRuleCoreSchema: z.ZodObject<{
|
|
|
323
323
|
export declare const insertChannelCommissionRuleSchema: z.ZodObject<{
|
|
324
324
|
contractId: z.ZodString;
|
|
325
325
|
scope: z.ZodEnum<{
|
|
326
|
-
product: "product";
|
|
327
326
|
category: "category";
|
|
327
|
+
product: "product";
|
|
328
328
|
booking: "booking";
|
|
329
329
|
rate: "rate";
|
|
330
330
|
}>;
|
|
@@ -343,8 +343,8 @@ export declare const insertChannelCommissionRuleSchema: z.ZodObject<{
|
|
|
343
343
|
export declare const updateChannelCommissionRuleSchema: z.ZodObject<{
|
|
344
344
|
contractId: z.ZodOptional<z.ZodString>;
|
|
345
345
|
scope: z.ZodOptional<z.ZodEnum<{
|
|
346
|
-
product: "product";
|
|
347
346
|
category: "category";
|
|
347
|
+
product: "product";
|
|
348
348
|
booking: "booking";
|
|
349
349
|
rate: "rate";
|
|
350
350
|
}>>;
|
|
@@ -366,8 +366,8 @@ export declare const channelCommissionRuleListQuerySchema: z.ZodObject<{
|
|
|
366
366
|
contractId: z.ZodOptional<z.ZodString>;
|
|
367
367
|
productId: z.ZodOptional<z.ZodString>;
|
|
368
368
|
scope: z.ZodOptional<z.ZodEnum<{
|
|
369
|
-
product: "product";
|
|
370
369
|
category: "category";
|
|
370
|
+
product: "product";
|
|
371
371
|
booking: "booking";
|
|
372
372
|
rate: "rate";
|
|
373
373
|
}>>;
|
|
@@ -733,8 +733,8 @@ export declare const channelSettlementItemCoreSchema: z.ZodObject<{
|
|
|
733
733
|
bookingId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
734
734
|
commissionRuleId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
735
735
|
status: z.ZodDefault<z.ZodEnum<{
|
|
736
|
-
void: "void";
|
|
737
736
|
pending: "pending";
|
|
737
|
+
void: "void";
|
|
738
738
|
paid: "paid";
|
|
739
739
|
approved: "approved";
|
|
740
740
|
disputed: "disputed";
|
|
@@ -753,8 +753,8 @@ export declare const insertChannelSettlementItemSchema: z.ZodObject<{
|
|
|
753
753
|
bookingId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
754
754
|
commissionRuleId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
755
755
|
status: z.ZodDefault<z.ZodEnum<{
|
|
756
|
-
void: "void";
|
|
757
756
|
pending: "pending";
|
|
757
|
+
void: "void";
|
|
758
758
|
paid: "paid";
|
|
759
759
|
approved: "approved";
|
|
760
760
|
disputed: "disputed";
|
|
@@ -773,8 +773,8 @@ export declare const updateChannelSettlementItemSchema: z.ZodObject<{
|
|
|
773
773
|
bookingId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
774
774
|
commissionRuleId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
775
775
|
status: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
776
|
-
void: "void";
|
|
777
776
|
pending: "pending";
|
|
777
|
+
void: "void";
|
|
778
778
|
paid: "paid";
|
|
779
779
|
approved: "approved";
|
|
780
780
|
disputed: "disputed";
|
|
@@ -794,8 +794,8 @@ export declare const channelSettlementItemListQuerySchema: z.ZodObject<{
|
|
|
794
794
|
bookingLinkId: z.ZodOptional<z.ZodString>;
|
|
795
795
|
bookingId: z.ZodOptional<z.ZodString>;
|
|
796
796
|
status: z.ZodOptional<z.ZodEnum<{
|
|
797
|
-
void: "void";
|
|
798
797
|
pending: "pending";
|
|
798
|
+
void: "void";
|
|
799
799
|
paid: "paid";
|
|
800
800
|
approved: "approved";
|
|
801
801
|
disputed: "disputed";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/distribution",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"license": "FSL-1.1-Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
"drizzle-orm": "^0.45.2",
|
|
30
30
|
"hono": "^4.12.10",
|
|
31
31
|
"zod": "^4.3.6",
|
|
32
|
-
"@voyantjs/availability": "0.
|
|
33
|
-
"@voyantjs/core": "0.
|
|
34
|
-
"@voyantjs/db": "0.
|
|
35
|
-
"@voyantjs/hono": "0.
|
|
36
|
-
"@voyantjs/identity": "0.
|
|
37
|
-
"@voyantjs/products": "0.
|
|
38
|
-
"@voyantjs/suppliers": "0.
|
|
32
|
+
"@voyantjs/availability": "0.6.2",
|
|
33
|
+
"@voyantjs/core": "0.6.2",
|
|
34
|
+
"@voyantjs/db": "0.6.2",
|
|
35
|
+
"@voyantjs/hono": "0.6.2",
|
|
36
|
+
"@voyantjs/identity": "0.6.2",
|
|
37
|
+
"@voyantjs/products": "0.6.2",
|
|
38
|
+
"@voyantjs/suppliers": "0.6.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"typescript": "^6.0.2",
|