@voyantjs/transactions 0.4.5 → 0.6.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/dist/booking-extension.d.ts +2 -2
- package/dist/booking-extension.d.ts.map +1 -1
- package/dist/booking-extension.js +2 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -4
- package/dist/route-runtime.d.ts +8 -0
- package/dist/route-runtime.d.ts.map +1 -0
- package/dist/route-runtime.js +17 -0
- package/dist/routes-offers.d.ts +21 -140
- package/dist/routes-offers.d.ts.map +1 -1
- package/dist/routes-offers.js +14 -13
- package/dist/routes-orders.d.ts +26 -145
- package/dist/routes-orders.d.ts.map +1 -1
- package/dist/routes-orders.js +17 -16
- package/dist/routes-shared.d.ts +23 -46
- package/dist/routes-shared.d.ts.map +1 -1
- package/dist/routes-shared.js +20 -12
- package/dist/schema-audit.d.ts +1 -1
- package/dist/schema-offers.d.ts +1 -1
- package/dist/schema-orders.d.ts +1 -1
- package/dist/service-offers.d.ts +21 -21
- package/dist/service-orders.d.ts +17 -17
- package/dist/validation.d.ts +5 -5
- package/package.json +5 -5
package/dist/service-offers.d.ts
CHANGED
|
@@ -64,16 +64,16 @@ export declare function getOfferById(db: PostgresJsDatabase, id: string): Promis
|
|
|
64
64
|
updatedAt: Date;
|
|
65
65
|
} | null>;
|
|
66
66
|
export declare function createOffer(db: PostgresJsDatabase, data: CreateOfferInput): Promise<{
|
|
67
|
+
metadata: unknown;
|
|
68
|
+
id: string;
|
|
67
69
|
createdAt: Date;
|
|
68
70
|
updatedAt: Date;
|
|
69
|
-
id: string;
|
|
70
|
-
metadata: unknown;
|
|
71
71
|
organizationId: string | null;
|
|
72
72
|
status: "draft" | "published" | "sent" | "accepted" | "expired" | "withdrawn" | "converted";
|
|
73
73
|
currency: string;
|
|
74
74
|
notes: string | null;
|
|
75
|
-
offerNumber: string;
|
|
76
75
|
title: string;
|
|
76
|
+
offerNumber: string;
|
|
77
77
|
personId: string | null;
|
|
78
78
|
opportunityId: string | null;
|
|
79
79
|
quoteId: string | null;
|
|
@@ -94,16 +94,16 @@ export declare function createOffer(db: PostgresJsDatabase, data: CreateOfferInp
|
|
|
94
94
|
} | null>;
|
|
95
95
|
export declare function createOfferBundle(db: PostgresJsDatabase, input: CreateOfferBundleInput): Promise<{
|
|
96
96
|
offer: {
|
|
97
|
+
metadata: unknown;
|
|
98
|
+
id: string;
|
|
97
99
|
createdAt: Date;
|
|
98
100
|
updatedAt: Date;
|
|
99
|
-
id: string;
|
|
100
|
-
metadata: unknown;
|
|
101
101
|
organizationId: string | null;
|
|
102
102
|
status: "draft" | "published" | "sent" | "accepted" | "expired" | "withdrawn" | "converted";
|
|
103
103
|
currency: string;
|
|
104
104
|
notes: string | null;
|
|
105
|
-
offerNumber: string;
|
|
106
105
|
title: string;
|
|
106
|
+
offerNumber: string;
|
|
107
107
|
personId: string | null;
|
|
108
108
|
opportunityId: string | null;
|
|
109
109
|
quoteId: string | null;
|
|
@@ -140,14 +140,14 @@ export declare function createOfferBundle(db: PostgresJsDatabase, input: CreateO
|
|
|
140
140
|
updatedAt: Date;
|
|
141
141
|
}[];
|
|
142
142
|
items: {
|
|
143
|
-
|
|
143
|
+
metadata: unknown;
|
|
144
|
+
id: string;
|
|
144
145
|
createdAt: Date;
|
|
145
146
|
updatedAt: Date;
|
|
146
|
-
description: string | null;
|
|
147
|
-
id: string;
|
|
148
|
-
metadata: unknown;
|
|
149
147
|
status: "draft" | "confirmed" | "fulfilled" | "cancelled" | "priced";
|
|
150
148
|
notes: string | null;
|
|
149
|
+
description: string | null;
|
|
150
|
+
offerId: string;
|
|
151
151
|
title: string;
|
|
152
152
|
taxAmountCents: number | null;
|
|
153
153
|
feeAmountCents: number | null;
|
|
@@ -155,7 +155,7 @@ export declare function createOfferBundle(db: PostgresJsDatabase, input: CreateO
|
|
|
155
155
|
optionId: string | null;
|
|
156
156
|
unitId: string | null;
|
|
157
157
|
slotId: string | null;
|
|
158
|
-
itemType: "
|
|
158
|
+
itemType: "service" | "other" | "unit" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
159
159
|
serviceDate: string | null;
|
|
160
160
|
startsAt: Date | null;
|
|
161
161
|
endsAt: Date | null;
|
|
@@ -168,8 +168,8 @@ export declare function createOfferBundle(db: PostgresJsDatabase, input: CreateO
|
|
|
168
168
|
totalCostAmountCents: number | null;
|
|
169
169
|
}[];
|
|
170
170
|
itemParticipants: {
|
|
171
|
-
createdAt: Date;
|
|
172
171
|
id: string;
|
|
172
|
+
createdAt: Date;
|
|
173
173
|
role: "other" | "traveler" | "occupant" | "primary_contact" | "beneficiary" | "service_assignee";
|
|
174
174
|
participantId: string;
|
|
175
175
|
isPrimary: boolean;
|
|
@@ -294,7 +294,7 @@ export declare function listOfferItems(db: PostgresJsDatabase, query: OfferItemL
|
|
|
294
294
|
slotId: string | null;
|
|
295
295
|
title: string;
|
|
296
296
|
description: string | null;
|
|
297
|
-
itemType: "
|
|
297
|
+
itemType: "service" | "other" | "unit" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
298
298
|
status: "draft" | "confirmed" | "fulfilled" | "cancelled" | "priced";
|
|
299
299
|
serviceDate: string | null;
|
|
300
300
|
startsAt: Date | null;
|
|
@@ -326,7 +326,7 @@ export declare function getOfferItemById(db: PostgresJsDatabase, id: string): Pr
|
|
|
326
326
|
slotId: string | null;
|
|
327
327
|
title: string;
|
|
328
328
|
description: string | null;
|
|
329
|
-
itemType: "
|
|
329
|
+
itemType: "service" | "other" | "unit" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
330
330
|
status: "draft" | "confirmed" | "fulfilled" | "cancelled" | "priced";
|
|
331
331
|
serviceDate: string | null;
|
|
332
332
|
startsAt: Date | null;
|
|
@@ -346,14 +346,14 @@ export declare function getOfferItemById(db: PostgresJsDatabase, id: string): Pr
|
|
|
346
346
|
updatedAt: Date;
|
|
347
347
|
} | null>;
|
|
348
348
|
export declare function createOfferItem(db: PostgresJsDatabase, data: CreateOfferItemInput): Promise<{
|
|
349
|
-
|
|
349
|
+
metadata: unknown;
|
|
350
|
+
id: string;
|
|
350
351
|
createdAt: Date;
|
|
351
352
|
updatedAt: Date;
|
|
352
|
-
description: string | null;
|
|
353
|
-
id: string;
|
|
354
|
-
metadata: unknown;
|
|
355
353
|
status: "draft" | "confirmed" | "fulfilled" | "cancelled" | "priced";
|
|
356
354
|
notes: string | null;
|
|
355
|
+
description: string | null;
|
|
356
|
+
offerId: string;
|
|
357
357
|
title: string;
|
|
358
358
|
taxAmountCents: number | null;
|
|
359
359
|
feeAmountCents: number | null;
|
|
@@ -361,7 +361,7 @@ export declare function createOfferItem(db: PostgresJsDatabase, data: CreateOffe
|
|
|
361
361
|
optionId: string | null;
|
|
362
362
|
unitId: string | null;
|
|
363
363
|
slotId: string | null;
|
|
364
|
-
itemType: "
|
|
364
|
+
itemType: "service" | "other" | "unit" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
365
365
|
serviceDate: string | null;
|
|
366
366
|
startsAt: Date | null;
|
|
367
367
|
endsAt: Date | null;
|
|
@@ -382,7 +382,7 @@ export declare function updateOfferItem(db: PostgresJsDatabase, id: string, data
|
|
|
382
382
|
slotId: string | null;
|
|
383
383
|
title: string;
|
|
384
384
|
description: string | null;
|
|
385
|
-
itemType: "
|
|
385
|
+
itemType: "service" | "other" | "unit" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
386
386
|
status: "draft" | "confirmed" | "fulfilled" | "cancelled" | "priced";
|
|
387
387
|
serviceDate: string | null;
|
|
388
388
|
startsAt: Date | null;
|
|
@@ -426,8 +426,8 @@ export declare function getOfferItemParticipantById(db: PostgresJsDatabase, id:
|
|
|
426
426
|
createdAt: Date;
|
|
427
427
|
} | null>;
|
|
428
428
|
export declare function createOfferItemParticipant(db: PostgresJsDatabase, data: CreateOfferItemParticipantInput): Promise<{
|
|
429
|
-
createdAt: Date;
|
|
430
429
|
id: string;
|
|
430
|
+
createdAt: Date;
|
|
431
431
|
role: "other" | "traveler" | "occupant" | "primary_contact" | "beneficiary" | "service_assignee";
|
|
432
432
|
participantId: string;
|
|
433
433
|
isPrimary: boolean;
|
package/dist/service-orders.d.ts
CHANGED
|
@@ -64,16 +64,16 @@ export declare function getOrderById(db: PostgresJsDatabase, id: string): Promis
|
|
|
64
64
|
updatedAt: Date;
|
|
65
65
|
} | null>;
|
|
66
66
|
export declare function createOrder(db: PostgresJsDatabase, data: CreateOrderInput): Promise<{
|
|
67
|
-
|
|
67
|
+
metadata: unknown;
|
|
68
|
+
id: string;
|
|
68
69
|
createdAt: Date;
|
|
69
70
|
updatedAt: Date;
|
|
70
|
-
id: string;
|
|
71
71
|
expiresAt: Date | null;
|
|
72
|
-
metadata: unknown;
|
|
73
72
|
organizationId: string | null;
|
|
74
73
|
status: "pending" | "draft" | "expired" | "confirmed" | "fulfilled" | "cancelled";
|
|
75
74
|
currency: string;
|
|
76
75
|
notes: string | null;
|
|
76
|
+
offerId: string | null;
|
|
77
77
|
title: string;
|
|
78
78
|
personId: string | null;
|
|
79
79
|
opportunityId: string | null;
|
|
@@ -211,7 +211,7 @@ export declare function listOrderItems(db: PostgresJsDatabase, query: OrderItemL
|
|
|
211
211
|
slotId: string | null;
|
|
212
212
|
title: string;
|
|
213
213
|
description: string | null;
|
|
214
|
-
itemType: "
|
|
214
|
+
itemType: "service" | "other" | "unit" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
215
215
|
status: "draft" | "confirmed" | "fulfilled" | "cancelled" | "priced";
|
|
216
216
|
serviceDate: string | null;
|
|
217
217
|
startsAt: Date | null;
|
|
@@ -244,7 +244,7 @@ export declare function getOrderItemById(db: PostgresJsDatabase, id: string): Pr
|
|
|
244
244
|
slotId: string | null;
|
|
245
245
|
title: string;
|
|
246
246
|
description: string | null;
|
|
247
|
-
itemType: "
|
|
247
|
+
itemType: "service" | "other" | "unit" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
248
248
|
status: "draft" | "confirmed" | "fulfilled" | "cancelled" | "priced";
|
|
249
249
|
serviceDate: string | null;
|
|
250
250
|
startsAt: Date | null;
|
|
@@ -264,14 +264,14 @@ export declare function getOrderItemById(db: PostgresJsDatabase, id: string): Pr
|
|
|
264
264
|
updatedAt: Date;
|
|
265
265
|
} | null>;
|
|
266
266
|
export declare function createOrderItem(db: PostgresJsDatabase, data: CreateOrderItemInput): Promise<{
|
|
267
|
-
|
|
267
|
+
metadata: unknown;
|
|
268
|
+
id: string;
|
|
268
269
|
createdAt: Date;
|
|
269
270
|
updatedAt: Date;
|
|
270
|
-
description: string | null;
|
|
271
|
-
id: string;
|
|
272
|
-
metadata: unknown;
|
|
273
271
|
status: "draft" | "confirmed" | "fulfilled" | "cancelled" | "priced";
|
|
274
272
|
notes: string | null;
|
|
273
|
+
description: string | null;
|
|
274
|
+
orderId: string;
|
|
275
275
|
title: string;
|
|
276
276
|
taxAmountCents: number | null;
|
|
277
277
|
feeAmountCents: number | null;
|
|
@@ -279,7 +279,7 @@ export declare function createOrderItem(db: PostgresJsDatabase, data: CreateOrde
|
|
|
279
279
|
optionId: string | null;
|
|
280
280
|
unitId: string | null;
|
|
281
281
|
slotId: string | null;
|
|
282
|
-
itemType: "
|
|
282
|
+
itemType: "service" | "other" | "unit" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
283
283
|
serviceDate: string | null;
|
|
284
284
|
startsAt: Date | null;
|
|
285
285
|
endsAt: Date | null;
|
|
@@ -302,7 +302,7 @@ export declare function updateOrderItem(db: PostgresJsDatabase, id: string, data
|
|
|
302
302
|
slotId: string | null;
|
|
303
303
|
title: string;
|
|
304
304
|
description: string | null;
|
|
305
|
-
itemType: "
|
|
305
|
+
itemType: "service" | "other" | "unit" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
306
306
|
status: "draft" | "confirmed" | "fulfilled" | "cancelled" | "priced";
|
|
307
307
|
serviceDate: string | null;
|
|
308
308
|
startsAt: Date | null;
|
|
@@ -346,8 +346,8 @@ export declare function getOrderItemParticipantById(db: PostgresJsDatabase, id:
|
|
|
346
346
|
createdAt: Date;
|
|
347
347
|
} | null>;
|
|
348
348
|
export declare function createOrderItemParticipant(db: PostgresJsDatabase, data: CreateOrderItemParticipantInput): Promise<{
|
|
349
|
-
createdAt: Date;
|
|
350
349
|
id: string;
|
|
350
|
+
createdAt: Date;
|
|
351
351
|
role: "other" | "traveler" | "occupant" | "primary_contact" | "beneficiary" | "service_assignee";
|
|
352
352
|
participantId: string;
|
|
353
353
|
isPrimary: boolean;
|
|
@@ -404,14 +404,14 @@ export declare function getOrderTermById(db: PostgresJsDatabase, id: string): Pr
|
|
|
404
404
|
updatedAt: Date;
|
|
405
405
|
} | null>;
|
|
406
406
|
export declare function createOrderTerm(db: PostgresJsDatabase, data: CreateOrderTermInput): Promise<{
|
|
407
|
-
|
|
408
|
-
|
|
407
|
+
metadata: unknown;
|
|
408
|
+
id: string;
|
|
409
409
|
createdAt: Date;
|
|
410
410
|
updatedAt: Date;
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
metadata: unknown;
|
|
411
|
+
offerId: string | null;
|
|
412
|
+
orderId: string | null;
|
|
414
413
|
title: string;
|
|
414
|
+
body: string;
|
|
415
415
|
acceptedAt: Date | null;
|
|
416
416
|
termType: "other" | "terms_and_conditions" | "cancellation" | "guarantee" | "payment" | "pricing" | "commission";
|
|
417
417
|
language: string | null;
|
package/dist/validation.d.ts
CHANGED
|
@@ -78,9 +78,9 @@ export declare const transactionTravelerCategorySchema: z.ZodEnum<{
|
|
|
78
78
|
senior: "senior";
|
|
79
79
|
}>;
|
|
80
80
|
export declare const transactionItemTypeSchema: z.ZodEnum<{
|
|
81
|
+
service: "service";
|
|
81
82
|
other: "other";
|
|
82
83
|
unit: "unit";
|
|
83
|
-
service: "service";
|
|
84
84
|
extra: "extra";
|
|
85
85
|
fee: "fee";
|
|
86
86
|
tax: "tax";
|
|
@@ -317,9 +317,9 @@ export declare const insertOfferItemSchema: z.ZodObject<{
|
|
|
317
317
|
title: z.ZodString;
|
|
318
318
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
319
319
|
itemType: z.ZodDefault<z.ZodEnum<{
|
|
320
|
+
service: "service";
|
|
320
321
|
other: "other";
|
|
321
322
|
unit: "unit";
|
|
322
|
-
service: "service";
|
|
323
323
|
extra: "extra";
|
|
324
324
|
fee: "fee";
|
|
325
325
|
tax: "tax";
|
|
@@ -359,9 +359,9 @@ export declare const updateOfferItemSchema: z.ZodObject<{
|
|
|
359
359
|
title: z.ZodOptional<z.ZodString>;
|
|
360
360
|
description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
361
361
|
itemType: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
362
|
+
service: "service";
|
|
362
363
|
other: "other";
|
|
363
364
|
unit: "unit";
|
|
364
|
-
service: "service";
|
|
365
365
|
extra: "extra";
|
|
366
366
|
fee: "fee";
|
|
367
367
|
tax: "tax";
|
|
@@ -593,9 +593,9 @@ export declare const insertOrderItemSchema: z.ZodObject<{
|
|
|
593
593
|
title: z.ZodString;
|
|
594
594
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
595
595
|
itemType: z.ZodDefault<z.ZodEnum<{
|
|
596
|
+
service: "service";
|
|
596
597
|
other: "other";
|
|
597
598
|
unit: "unit";
|
|
598
|
-
service: "service";
|
|
599
599
|
extra: "extra";
|
|
600
600
|
fee: "fee";
|
|
601
601
|
tax: "tax";
|
|
@@ -636,9 +636,9 @@ export declare const updateOrderItemSchema: z.ZodObject<{
|
|
|
636
636
|
title: z.ZodOptional<z.ZodString>;
|
|
637
637
|
description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
638
638
|
itemType: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
639
|
+
service: "service";
|
|
639
640
|
other: "other";
|
|
640
641
|
unit: "unit";
|
|
641
|
-
service: "service";
|
|
642
642
|
extra: "extra";
|
|
643
643
|
fee: "fee";
|
|
644
644
|
tax: "tax";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/transactions",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"license": "FSL-1.1-Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"drizzle-orm": "^0.45.2",
|
|
30
30
|
"hono": "^4.12.10",
|
|
31
31
|
"zod": "^4.3.6",
|
|
32
|
-
"@voyantjs/core": "0.
|
|
33
|
-
"@voyantjs/db": "0.
|
|
34
|
-
"@voyantjs/hono": "0.
|
|
35
|
-
"@voyantjs/utils": "0.
|
|
32
|
+
"@voyantjs/core": "0.6.0",
|
|
33
|
+
"@voyantjs/db": "0.6.0",
|
|
34
|
+
"@voyantjs/hono": "0.6.0",
|
|
35
|
+
"@voyantjs/utils": "0.6.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"typescript": "^6.0.2",
|