@voyant-travel/finance 0.155.2 → 0.156.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/checkout-routes.d.ts +4 -4
- package/dist/checkout-service-plan.d.ts +1 -1
- package/dist/checkout-validation.d.ts +13 -13
- package/dist/checkout-validation.d.ts.map +1 -1
- package/dist/index.d.ts +5 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -4
- package/dist/routes-booking-billing.d.ts +22 -22
- package/dist/routes-booking-create.d.ts.map +1 -1
- package/dist/routes-booking-create.js +26 -26
- package/dist/routes-booking-reads.d.ts +2 -2
- package/dist/routes-invoice-core.d.ts +11 -11
- package/dist/routes-invoice-schemas.d.ts +2 -2
- package/dist/routes-invoice-schemas.js +1 -1
- package/dist/routes-payment-processing.d.ts +24 -24
- package/dist/routes-payment-schemas.d.ts +58 -12
- package/dist/routes-payment-schemas.d.ts.map +1 -1
- package/dist/routes-payment-schemas.js +21 -16
- package/dist/routes-payments.d.ts +18 -18
- package/dist/routes-public-accountant.d.ts +162 -0
- package/dist/routes-public-accountant.d.ts.map +1 -0
- package/dist/routes-public-accountant.js +196 -0
- package/dist/routes-public.d.ts +42 -48
- package/dist/routes-public.d.ts.map +1 -1
- package/dist/routes-public.js +13 -218
- package/dist/routes-supplier-invoices.d.ts +6 -6
- package/dist/routes-supplier-invoices.js +1 -1
- package/dist/{routes-vouchers.d.ts → routes-travel-credits.d.ts} +37 -21
- package/dist/routes-travel-credits.d.ts.map +1 -0
- package/dist/routes-travel-credits.js +182 -0
- package/dist/routes.d.ts +108 -92
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +2 -2
- package/dist/schema/booking-billing.d.ts +1 -1
- package/dist/schema/enums.d.ts +4 -4
- package/dist/schema/enums.d.ts.map +1 -1
- package/dist/schema/enums.js +11 -5
- package/dist/schema/payment-instruments.d.ts +2 -2
- package/dist/schema/payment-sessions.d.ts +2 -2
- package/dist/schema/receivables.d.ts +2 -2
- package/dist/schema/relations.d.ts +4 -4
- package/dist/schema/relations.d.ts.map +1 -1
- package/dist/schema/relations.js +7 -7
- package/dist/schema/supplier-invoices.d.ts +2 -2
- package/dist/schema/{vouchers.d.ts → travel-credits.d.ts} +54 -37
- package/dist/schema/travel-credits.d.ts.map +1 -0
- package/dist/schema/travel-credits.js +68 -0
- package/dist/schema.d.ts +1 -1
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +1 -1
- package/dist/service-action-ledger-bookings.d.ts +1 -1
- package/dist/service-action-ledger-bookings.d.ts.map +1 -1
- package/dist/service-action-ledger-bookings.js +1 -1
- package/dist/service-booking-billing.d.ts +8 -8
- package/dist/service-booking-create.d.ts +14 -14
- package/dist/service-booking-create.d.ts.map +1 -1
- package/dist/service-booking-create.js +47 -45
- package/dist/service-booking-guarantees.d.ts +6 -6
- package/dist/service-booking-payment-schedules.d.ts +2 -2
- package/dist/service-bookings-dual-create.d.ts +4 -4
- package/dist/service-invoice-payments.d.ts +8 -8
- package/dist/service-invoices.d.ts +8 -8
- package/dist/service-payment-instruments.d.ts +4 -4
- package/dist/service-payment-processing.d.ts +13 -13
- package/dist/service-payment-session-completion.d.ts +1 -1
- package/dist/service-payment-sessions.d.ts +8 -8
- package/dist/service-public.d.ts +16 -30
- package/dist/service-public.d.ts.map +1 -1
- package/dist/service-public.js +61 -117
- package/dist/service-shared.d.ts +1 -1
- package/dist/service-supplier-payments.d.ts +3 -3
- package/dist/{service-vouchers-migration.d.ts → service-travel-credits-migration.d.ts} +17 -16
- package/dist/service-travel-credits-migration.d.ts.map +1 -0
- package/dist/{service-vouchers-migration.js → service-travel-credits-migration.js} +51 -26
- package/dist/{service-vouchers.d.ts → service-travel-credits.d.ts} +36 -32
- package/dist/service-travel-credits.d.ts.map +1 -0
- package/dist/service-travel-credits.js +236 -0
- package/dist/service.d.ts +46 -43
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +2 -2
- package/dist/validation-travel-credits.d.ts +2 -0
- package/dist/validation-travel-credits.d.ts.map +1 -0
- package/dist/voyant.d.ts.map +1 -1
- package/dist/voyant.js +10 -4
- package/migrations/0001_travel_credits.sql +75 -0
- package/migrations/meta/_journal.json +7 -0
- package/openapi/admin/finance.json +154 -78
- package/openapi/storefront/finance.json +18 -29
- package/package.json +15 -9
- package/dist/routes-vouchers.d.ts.map +0 -1
- package/dist/routes-vouchers.js +0 -176
- package/dist/schema/vouchers.d.ts.map +0 -1
- package/dist/schema/vouchers.js +0 -64
- package/dist/service-vouchers-migration.d.ts.map +0 -1
- package/dist/service-vouchers.d.ts.map +0 -1
- package/dist/service-vouchers.js +0 -191
- package/dist/validation-vouchers.d.ts +0 -2
- package/dist/validation-vouchers.d.ts.map +0 -1
- /package/dist/{validation-vouchers.js → validation-travel-credits.js} +0 -0
|
@@ -6,7 +6,7 @@ import { dualCreateBooking, dualCreateBookingSchema } from "./service-bookings-d
|
|
|
6
6
|
// --- Response schemas ------------------------------------------------------
|
|
7
7
|
//
|
|
8
8
|
// The success `data` payload is the rich `BookingCreateResult` — a composite of
|
|
9
|
-
// cross-package Drizzle rows (booking, travelers, payment schedules,
|
|
9
|
+
// cross-package Drizzle rows (booking, travelers, payment schedules, travel credit,
|
|
10
10
|
// invoice, payments) owned by `@voyant-travel/bookings` / `finance`. To avoid
|
|
11
11
|
// asserting (and drifting against) every column those packages own, the heavy
|
|
12
12
|
// row sub-objects are modeled as opaque objects here; the documented contract is
|
|
@@ -17,7 +17,7 @@ const bookingCreateResultSchema = z.object({
|
|
|
17
17
|
booking: opaqueRow,
|
|
18
18
|
travelers: z.array(opaqueRow),
|
|
19
19
|
paymentSchedules: z.array(opaqueRow),
|
|
20
|
-
|
|
20
|
+
travelCreditRedemption: z.object({ travelCredit: opaqueRow, redemption: opaqueRow }).nullable(),
|
|
21
21
|
groupMembership: z.object({ groupId: z.string(), member: opaqueRow }).nullable(),
|
|
22
22
|
invoice: opaqueRow.nullable(),
|
|
23
23
|
invoiceDocument: z.union([
|
|
@@ -136,11 +136,11 @@ const createBookingRoute = createRoute({
|
|
|
136
136
|
content: { "application/json": { schema: createBadRequestSchema } },
|
|
137
137
|
},
|
|
138
138
|
404: {
|
|
139
|
-
description: "Product,
|
|
139
|
+
description: "Product, travel credit, or booking group not found",
|
|
140
140
|
content: { "application/json": { schema: notFoundSchema } },
|
|
141
141
|
},
|
|
142
142
|
409: {
|
|
143
|
-
description: "Conflict: duplicate booking,
|
|
143
|
+
description: "Conflict: duplicate booking, travel credit state conflict, or booking already in a group",
|
|
144
144
|
content: { "application/json": { schema: createConflictSchema } },
|
|
145
145
|
},
|
|
146
146
|
},
|
|
@@ -168,11 +168,11 @@ const dualCreateBookingRoute = createRoute({
|
|
|
168
168
|
content: { "application/json": { schema: dualBadRequestSchema } },
|
|
169
169
|
},
|
|
170
170
|
404: {
|
|
171
|
-
description: "A sub-booking's product,
|
|
171
|
+
description: "A sub-booking's product, travel credit, or group was not found",
|
|
172
172
|
content: { "application/json": { schema: notFoundSchema } },
|
|
173
173
|
},
|
|
174
174
|
409: {
|
|
175
|
-
description: "A sub-booking hit a duplicate /
|
|
175
|
+
description: "A sub-booking hit a duplicate / travel credit / already-in-group conflict",
|
|
176
176
|
content: { "application/json": { schema: dualConflictSchema } },
|
|
177
177
|
},
|
|
178
178
|
500: {
|
|
@@ -225,16 +225,16 @@ const createBookingRoutes = new OpenAPIHono({ defaultHook: openApiValidationHook
|
|
|
225
225
|
}, 409);
|
|
226
226
|
case "product_not_found":
|
|
227
227
|
return c.json({ error: "Product not found or unavailable" }, 404);
|
|
228
|
-
case "
|
|
229
|
-
return c.json({ error: "
|
|
230
|
-
case "
|
|
231
|
-
return c.json({ error: "
|
|
232
|
-
case "
|
|
233
|
-
return c.json({ error: "
|
|
234
|
-
case "
|
|
235
|
-
return c.json({ error: "
|
|
236
|
-
case "
|
|
237
|
-
return c.json({ error: "
|
|
228
|
+
case "travel_credit_not_found":
|
|
229
|
+
return c.json({ error: "Travel credit not found" }, 404);
|
|
230
|
+
case "travel_credit_inactive":
|
|
231
|
+
return c.json({ error: "Travel credit is not active" }, 409);
|
|
232
|
+
case "travel_credit_not_started":
|
|
233
|
+
return c.json({ error: "Travel credit is not yet valid" }, 409);
|
|
234
|
+
case "travel_credit_expired":
|
|
235
|
+
return c.json({ error: "Travel credit has expired" }, 409);
|
|
236
|
+
case "travel_credit_insufficient_balance":
|
|
237
|
+
return c.json({ error: "Travel credit does not have enough balance" }, 409);
|
|
238
238
|
case "group_not_found":
|
|
239
239
|
return c.json({ error: "Booking group not found" }, 404);
|
|
240
240
|
case "booking_already_in_group":
|
|
@@ -298,16 +298,16 @@ const createBookingRoutes = new OpenAPIHono({ defaultHook: openApiValidationHook
|
|
|
298
298
|
}, 409);
|
|
299
299
|
case "product_not_found":
|
|
300
300
|
return c.json({ ...body, error: `${which}: product not found or unavailable` }, 404);
|
|
301
|
-
case "
|
|
302
|
-
return c.json({ ...body, error: `${which}:
|
|
303
|
-
case "
|
|
304
|
-
return c.json({ ...body, error: `${which}:
|
|
305
|
-
case "
|
|
306
|
-
return c.json({ ...body, error: `${which}:
|
|
307
|
-
case "
|
|
308
|
-
return c.json({ ...body, error: `${which}:
|
|
309
|
-
case "
|
|
310
|
-
return c.json({ ...body, error: `${which}:
|
|
301
|
+
case "travel_credit_not_found":
|
|
302
|
+
return c.json({ ...body, error: `${which}: travel credit not found` }, 404);
|
|
303
|
+
case "travel_credit_inactive":
|
|
304
|
+
return c.json({ ...body, error: `${which}: travel credit is not active` }, 409);
|
|
305
|
+
case "travel_credit_not_started":
|
|
306
|
+
return c.json({ ...body, error: `${which}: travel credit is not yet valid` }, 409);
|
|
307
|
+
case "travel_credit_expired":
|
|
308
|
+
return c.json({ ...body, error: `${which}: travel credit has expired` }, 409);
|
|
309
|
+
case "travel_credit_insufficient_balance":
|
|
310
|
+
return c.json({ ...body, error: `${which}: travel credit does not have enough balance` }, 409);
|
|
311
311
|
case "group_not_found":
|
|
312
312
|
return c.json({ ...body, error: `${which}: group linking failed` }, 500);
|
|
313
313
|
case "booking_already_in_group":
|
|
@@ -40,12 +40,12 @@ export declare const financeBookingReadRoutes: OpenAPIHono<Env, {
|
|
|
40
40
|
bookingId: string;
|
|
41
41
|
payments: {
|
|
42
42
|
id: string;
|
|
43
|
-
source: "payment" | "
|
|
43
|
+
source: "payment" | "travel_credit_redemption";
|
|
44
44
|
invoiceId: string | null;
|
|
45
45
|
invoiceNumber: string | null;
|
|
46
46
|
invoiceType: "invoice" | "proforma" | "credit_note" | null;
|
|
47
47
|
status: "pending" | "completed" | "failed" | "refunded";
|
|
48
|
-
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
48
|
+
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other";
|
|
49
49
|
amountCents: number;
|
|
50
50
|
currency: string;
|
|
51
51
|
baseCurrency: string | null;
|
|
@@ -467,7 +467,7 @@ export declare const financeInvoiceCoreRoutes: OpenAPIHono<Env, import("hono/typ
|
|
|
467
467
|
baseCurrency: string | null;
|
|
468
468
|
baseAmountCents: number | null;
|
|
469
469
|
fxRateSetId: string | null;
|
|
470
|
-
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
470
|
+
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other";
|
|
471
471
|
paymentInstrumentId: string | null;
|
|
472
472
|
paymentAuthorizationId: string | null;
|
|
473
473
|
paymentCaptureId: string | null;
|
|
@@ -494,7 +494,7 @@ export declare const financeInvoiceCoreRoutes: OpenAPIHono<Env, import("hono/typ
|
|
|
494
494
|
json: {
|
|
495
495
|
amountCents: number;
|
|
496
496
|
currency: string;
|
|
497
|
-
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
497
|
+
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other";
|
|
498
498
|
paymentDate: string;
|
|
499
499
|
baseCurrency?: string | null | undefined;
|
|
500
500
|
baseAmountCents?: number | null | undefined;
|
|
@@ -522,7 +522,7 @@ export declare const financeInvoiceCoreRoutes: OpenAPIHono<Env, import("hono/typ
|
|
|
522
522
|
json: {
|
|
523
523
|
amountCents: number;
|
|
524
524
|
currency: string;
|
|
525
|
-
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
525
|
+
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other";
|
|
526
526
|
paymentDate: string;
|
|
527
527
|
baseCurrency?: string | null | undefined;
|
|
528
528
|
baseAmountCents?: number | null | undefined;
|
|
@@ -550,7 +550,7 @@ export declare const financeInvoiceCoreRoutes: OpenAPIHono<Env, import("hono/typ
|
|
|
550
550
|
json: {
|
|
551
551
|
amountCents: number;
|
|
552
552
|
currency: string;
|
|
553
|
-
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
553
|
+
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other";
|
|
554
554
|
paymentDate: string;
|
|
555
555
|
baseCurrency?: string | null | undefined;
|
|
556
556
|
baseAmountCents?: number | null | undefined;
|
|
@@ -578,7 +578,7 @@ export declare const financeInvoiceCoreRoutes: OpenAPIHono<Env, import("hono/typ
|
|
|
578
578
|
json: {
|
|
579
579
|
amountCents: number;
|
|
580
580
|
currency: string;
|
|
581
|
-
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
581
|
+
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other";
|
|
582
582
|
paymentDate: string;
|
|
583
583
|
baseCurrency?: string | null | undefined;
|
|
584
584
|
baseAmountCents?: number | null | undefined;
|
|
@@ -601,7 +601,7 @@ export declare const financeInvoiceCoreRoutes: OpenAPIHono<Env, import("hono/typ
|
|
|
601
601
|
baseCurrency: string | null;
|
|
602
602
|
baseAmountCents: number | null;
|
|
603
603
|
fxRateSetId: string | null;
|
|
604
|
-
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
604
|
+
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other";
|
|
605
605
|
paymentInstrumentId: string | null;
|
|
606
606
|
paymentAuthorizationId: string | null;
|
|
607
607
|
paymentCaptureId: string | null;
|
|
@@ -1260,7 +1260,7 @@ export declare const financeInvoiceCoreRoutes: OpenAPIHono<Env, import("hono/typ
|
|
|
1260
1260
|
idempotencyKey?: string | null | undefined;
|
|
1261
1261
|
} | undefined;
|
|
1262
1262
|
provider?: string | null | undefined;
|
|
1263
|
-
paymentMethod?: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
1263
|
+
paymentMethod?: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other" | null | undefined;
|
|
1264
1264
|
payerPersonId?: string | null | undefined;
|
|
1265
1265
|
payerOrganizationId?: string | null | undefined;
|
|
1266
1266
|
payerEmail?: string | null | undefined;
|
|
@@ -1328,7 +1328,7 @@ export declare const financeInvoiceCoreRoutes: OpenAPIHono<Env, import("hono/typ
|
|
|
1328
1328
|
idempotencyKey?: string | null | undefined;
|
|
1329
1329
|
} | undefined;
|
|
1330
1330
|
provider?: string | null | undefined;
|
|
1331
|
-
paymentMethod?: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
1331
|
+
paymentMethod?: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other" | null | undefined;
|
|
1332
1332
|
payerPersonId?: string | null | undefined;
|
|
1333
1333
|
payerOrganizationId?: string | null | undefined;
|
|
1334
1334
|
payerEmail?: string | null | undefined;
|
|
@@ -1396,7 +1396,7 @@ export declare const financeInvoiceCoreRoutes: OpenAPIHono<Env, import("hono/typ
|
|
|
1396
1396
|
idempotencyKey?: string | null | undefined;
|
|
1397
1397
|
} | undefined;
|
|
1398
1398
|
provider?: string | null | undefined;
|
|
1399
|
-
paymentMethod?: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
1399
|
+
paymentMethod?: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other" | null | undefined;
|
|
1400
1400
|
payerPersonId?: string | null | undefined;
|
|
1401
1401
|
payerOrganizationId?: string | null | undefined;
|
|
1402
1402
|
payerEmail?: string | null | undefined;
|
|
@@ -1464,7 +1464,7 @@ export declare const financeInvoiceCoreRoutes: OpenAPIHono<Env, import("hono/typ
|
|
|
1464
1464
|
idempotencyKey?: string | null | undefined;
|
|
1465
1465
|
} | undefined;
|
|
1466
1466
|
provider?: string | null | undefined;
|
|
1467
|
-
paymentMethod?: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
1467
|
+
paymentMethod?: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other" | null | undefined;
|
|
1468
1468
|
payerPersonId?: string | null | undefined;
|
|
1469
1469
|
payerOrganizationId?: string | null | undefined;
|
|
1470
1470
|
payerEmail?: string | null | undefined;
|
|
@@ -1504,7 +1504,7 @@ export declare const financeInvoiceCoreRoutes: OpenAPIHono<Env, import("hono/typ
|
|
|
1504
1504
|
clientReference: string | null;
|
|
1505
1505
|
currency: string;
|
|
1506
1506
|
amountCents: number;
|
|
1507
|
-
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
1507
|
+
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other" | null;
|
|
1508
1508
|
payerPersonId: string | null;
|
|
1509
1509
|
payerOrganizationId: string | null;
|
|
1510
1510
|
payerEmail: string | null;
|
|
@@ -209,7 +209,7 @@ export declare const paymentSchema: z.ZodObject<{
|
|
|
209
209
|
cheque: "cheque";
|
|
210
210
|
wallet: "wallet";
|
|
211
211
|
direct_bill: "direct_bill";
|
|
212
|
-
|
|
212
|
+
travel_credit: "travel_credit";
|
|
213
213
|
other: "other";
|
|
214
214
|
}>;
|
|
215
215
|
paymentInstrumentId: z.ZodNullable<z.ZodString>;
|
|
@@ -362,7 +362,7 @@ export declare const paymentSessionSchema: z.ZodObject<{
|
|
|
362
362
|
cheque: "cheque";
|
|
363
363
|
wallet: "wallet";
|
|
364
364
|
direct_bill: "direct_bill";
|
|
365
|
-
|
|
365
|
+
travel_credit: "travel_credit";
|
|
366
366
|
other: "other";
|
|
367
367
|
}>>;
|
|
368
368
|
payerPersonId: z.ZodNullable<z.ZodString>;
|
|
@@ -795,7 +795,7 @@ export declare const financePaymentProcessingRoutes: OpenAPIHono<Env, import("ho
|
|
|
795
795
|
supplierId?: string | undefined;
|
|
796
796
|
channelId?: string | undefined;
|
|
797
797
|
status?: "expired" | "active" | "inactive" | "revoked" | "failed_verification" | undefined;
|
|
798
|
-
instrumentType?: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "
|
|
798
|
+
instrumentType?: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "travel_credit" | "other" | "bank_account" | undefined;
|
|
799
799
|
search?: string | undefined;
|
|
800
800
|
};
|
|
801
801
|
};
|
|
@@ -807,7 +807,7 @@ export declare const financePaymentProcessingRoutes: OpenAPIHono<Env, import("ho
|
|
|
807
807
|
organizationId: string | null;
|
|
808
808
|
supplierId: string | null;
|
|
809
809
|
channelId: string | null;
|
|
810
|
-
instrumentType: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "
|
|
810
|
+
instrumentType: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "travel_credit" | "other" | "bank_account";
|
|
811
811
|
status: "expired" | "active" | "inactive" | "revoked" | "failed_verification";
|
|
812
812
|
label: string;
|
|
813
813
|
provider: string | null;
|
|
@@ -839,7 +839,7 @@ export declare const financePaymentProcessingRoutes: OpenAPIHono<Env, import("ho
|
|
|
839
839
|
$post: {
|
|
840
840
|
input: {
|
|
841
841
|
json: {
|
|
842
|
-
instrumentType: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "
|
|
842
|
+
instrumentType: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "travel_credit" | "other" | "bank_account";
|
|
843
843
|
label: string;
|
|
844
844
|
ownerType?: "other" | "client" | "supplier" | "channel" | "agency" | "internal" | undefined;
|
|
845
845
|
personId?: string | null | undefined;
|
|
@@ -870,7 +870,7 @@ export declare const financePaymentProcessingRoutes: OpenAPIHono<Env, import("ho
|
|
|
870
870
|
} | {
|
|
871
871
|
input: {
|
|
872
872
|
json: {
|
|
873
|
-
instrumentType: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "
|
|
873
|
+
instrumentType: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "travel_credit" | "other" | "bank_account";
|
|
874
874
|
label: string;
|
|
875
875
|
ownerType?: "other" | "client" | "supplier" | "channel" | "agency" | "internal" | undefined;
|
|
876
876
|
personId?: string | null | undefined;
|
|
@@ -901,7 +901,7 @@ export declare const financePaymentProcessingRoutes: OpenAPIHono<Env, import("ho
|
|
|
901
901
|
organizationId: string | null;
|
|
902
902
|
supplierId: string | null;
|
|
903
903
|
channelId: string | null;
|
|
904
|
-
instrumentType: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "
|
|
904
|
+
instrumentType: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "travel_credit" | "other" | "bank_account";
|
|
905
905
|
status: "expired" | "active" | "inactive" | "revoked" | "failed_verification";
|
|
906
906
|
label: string;
|
|
907
907
|
provider: string | null;
|
|
@@ -952,7 +952,7 @@ export declare const financePaymentProcessingRoutes: OpenAPIHono<Env, import("ho
|
|
|
952
952
|
organizationId: string | null;
|
|
953
953
|
supplierId: string | null;
|
|
954
954
|
channelId: string | null;
|
|
955
|
-
instrumentType: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "
|
|
955
|
+
instrumentType: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "travel_credit" | "other" | "bank_account";
|
|
956
956
|
status: "expired" | "active" | "inactive" | "revoked" | "failed_verification";
|
|
957
957
|
label: string;
|
|
958
958
|
provider: string | null;
|
|
@@ -990,7 +990,7 @@ export declare const financePaymentProcessingRoutes: OpenAPIHono<Env, import("ho
|
|
|
990
990
|
organizationId?: string | null | undefined;
|
|
991
991
|
supplierId?: string | null | undefined;
|
|
992
992
|
channelId?: string | null | undefined;
|
|
993
|
-
instrumentType?: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "
|
|
993
|
+
instrumentType?: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "travel_credit" | "other" | "bank_account" | undefined;
|
|
994
994
|
status?: "expired" | "active" | "inactive" | "revoked" | "failed_verification" | undefined;
|
|
995
995
|
label?: string | undefined;
|
|
996
996
|
provider?: string | null | undefined;
|
|
@@ -1025,7 +1025,7 @@ export declare const financePaymentProcessingRoutes: OpenAPIHono<Env, import("ho
|
|
|
1025
1025
|
organizationId?: string | null | undefined;
|
|
1026
1026
|
supplierId?: string | null | undefined;
|
|
1027
1027
|
channelId?: string | null | undefined;
|
|
1028
|
-
instrumentType?: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "
|
|
1028
|
+
instrumentType?: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "travel_credit" | "other" | "bank_account" | undefined;
|
|
1029
1029
|
status?: "expired" | "active" | "inactive" | "revoked" | "failed_verification" | undefined;
|
|
1030
1030
|
label?: string | undefined;
|
|
1031
1031
|
provider?: string | null | undefined;
|
|
@@ -1060,7 +1060,7 @@ export declare const financePaymentProcessingRoutes: OpenAPIHono<Env, import("ho
|
|
|
1060
1060
|
organizationId?: string | null | undefined;
|
|
1061
1061
|
supplierId?: string | null | undefined;
|
|
1062
1062
|
channelId?: string | null | undefined;
|
|
1063
|
-
instrumentType?: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "
|
|
1063
|
+
instrumentType?: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "travel_credit" | "other" | "bank_account" | undefined;
|
|
1064
1064
|
status?: "expired" | "active" | "inactive" | "revoked" | "failed_verification" | undefined;
|
|
1065
1065
|
label?: string | undefined;
|
|
1066
1066
|
provider?: string | null | undefined;
|
|
@@ -1086,7 +1086,7 @@ export declare const financePaymentProcessingRoutes: OpenAPIHono<Env, import("ho
|
|
|
1086
1086
|
organizationId: string | null;
|
|
1087
1087
|
supplierId: string | null;
|
|
1088
1088
|
channelId: string | null;
|
|
1089
|
-
instrumentType: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "
|
|
1089
|
+
instrumentType: "credit_card" | "debit_card" | "cash" | "wallet" | "direct_bill" | "travel_credit" | "other" | "bank_account";
|
|
1090
1090
|
status: "expired" | "active" | "inactive" | "revoked" | "failed_verification";
|
|
1091
1091
|
label: string;
|
|
1092
1092
|
provider: string | null;
|
|
@@ -1181,7 +1181,7 @@ export declare const financePaymentProcessingRoutes: OpenAPIHono<Env, import("ho
|
|
|
1181
1181
|
clientReference: string | null;
|
|
1182
1182
|
currency: string;
|
|
1183
1183
|
amountCents: number;
|
|
1184
|
-
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
1184
|
+
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other" | null;
|
|
1185
1185
|
payerPersonId: string | null;
|
|
1186
1186
|
payerOrganizationId: string | null;
|
|
1187
1187
|
payerEmail: string | null;
|
|
@@ -1277,7 +1277,7 @@ export declare const financePaymentProcessingRoutes: OpenAPIHono<Env, import("ho
|
|
|
1277
1277
|
externalReference?: string | null | undefined;
|
|
1278
1278
|
idempotencyKey?: string | null | undefined;
|
|
1279
1279
|
clientReference?: string | null | undefined;
|
|
1280
|
-
paymentMethod?: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
1280
|
+
paymentMethod?: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other" | null | undefined;
|
|
1281
1281
|
payerPersonId?: string | null | undefined;
|
|
1282
1282
|
payerOrganizationId?: string | null | undefined;
|
|
1283
1283
|
payerEmail?: string | null | undefined;
|
|
@@ -1364,7 +1364,7 @@ export declare const financePaymentProcessingRoutes: OpenAPIHono<Env, import("ho
|
|
|
1364
1364
|
externalReference?: string | null | undefined;
|
|
1365
1365
|
idempotencyKey?: string | null | undefined;
|
|
1366
1366
|
clientReference?: string | null | undefined;
|
|
1367
|
-
paymentMethod?: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
1367
|
+
paymentMethod?: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other" | null | undefined;
|
|
1368
1368
|
payerPersonId?: string | null | undefined;
|
|
1369
1369
|
payerOrganizationId?: string | null | undefined;
|
|
1370
1370
|
payerEmail?: string | null | undefined;
|
|
@@ -1409,7 +1409,7 @@ export declare const financePaymentProcessingRoutes: OpenAPIHono<Env, import("ho
|
|
|
1409
1409
|
clientReference: string | null;
|
|
1410
1410
|
currency: string;
|
|
1411
1411
|
amountCents: number;
|
|
1412
|
-
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
1412
|
+
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other" | null;
|
|
1413
1413
|
payerPersonId: string | null;
|
|
1414
1414
|
payerOrganizationId: string | null;
|
|
1415
1415
|
payerEmail: string | null;
|
|
@@ -1482,7 +1482,7 @@ export declare const financePaymentProcessingRoutes: OpenAPIHono<Env, import("ho
|
|
|
1482
1482
|
clientReference: string | null;
|
|
1483
1483
|
currency: string;
|
|
1484
1484
|
amountCents: number;
|
|
1485
|
-
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
1485
|
+
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other" | null;
|
|
1486
1486
|
payerPersonId: string | null;
|
|
1487
1487
|
payerOrganizationId: string | null;
|
|
1488
1488
|
payerEmail: string | null;
|
|
@@ -1579,7 +1579,7 @@ export declare const financePaymentProcessingRoutes: OpenAPIHono<Env, import("ho
|
|
|
1579
1579
|
clientReference?: string | null | undefined;
|
|
1580
1580
|
currency?: string | undefined;
|
|
1581
1581
|
amountCents?: number | undefined;
|
|
1582
|
-
paymentMethod?: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
1582
|
+
paymentMethod?: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other" | null | undefined;
|
|
1583
1583
|
payerPersonId?: string | null | undefined;
|
|
1584
1584
|
payerOrganizationId?: string | null | undefined;
|
|
1585
1585
|
payerEmail?: string | null | undefined;
|
|
@@ -1670,7 +1670,7 @@ export declare const financePaymentProcessingRoutes: OpenAPIHono<Env, import("ho
|
|
|
1670
1670
|
clientReference?: string | null | undefined;
|
|
1671
1671
|
currency?: string | undefined;
|
|
1672
1672
|
amountCents?: number | undefined;
|
|
1673
|
-
paymentMethod?: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
1673
|
+
paymentMethod?: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other" | null | undefined;
|
|
1674
1674
|
payerPersonId?: string | null | undefined;
|
|
1675
1675
|
payerOrganizationId?: string | null | undefined;
|
|
1676
1676
|
payerEmail?: string | null | undefined;
|
|
@@ -1761,7 +1761,7 @@ export declare const financePaymentProcessingRoutes: OpenAPIHono<Env, import("ho
|
|
|
1761
1761
|
clientReference?: string | null | undefined;
|
|
1762
1762
|
currency?: string | undefined;
|
|
1763
1763
|
amountCents?: number | undefined;
|
|
1764
|
-
paymentMethod?: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
1764
|
+
paymentMethod?: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other" | null | undefined;
|
|
1765
1765
|
payerPersonId?: string | null | undefined;
|
|
1766
1766
|
payerOrganizationId?: string | null | undefined;
|
|
1767
1767
|
payerEmail?: string | null | undefined;
|
|
@@ -1806,7 +1806,7 @@ export declare const financePaymentProcessingRoutes: OpenAPIHono<Env, import("ho
|
|
|
1806
1806
|
clientReference: string | null;
|
|
1807
1807
|
currency: string;
|
|
1808
1808
|
amountCents: number;
|
|
1809
|
-
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
1809
|
+
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other" | null;
|
|
1810
1810
|
payerPersonId: string | null;
|
|
1811
1811
|
payerOrganizationId: string | null;
|
|
1812
1812
|
payerEmail: string | null;
|
|
@@ -1935,7 +1935,7 @@ export declare const financePaymentProcessingRoutes: OpenAPIHono<Env, import("ho
|
|
|
1935
1935
|
clientReference: string | null;
|
|
1936
1936
|
currency: string;
|
|
1937
1937
|
amountCents: number;
|
|
1938
|
-
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
1938
|
+
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other" | null;
|
|
1939
1939
|
payerPersonId: string | null;
|
|
1940
1940
|
payerOrganizationId: string | null;
|
|
1941
1941
|
payerEmail: string | null;
|
|
@@ -2008,7 +2008,7 @@ export declare const financePaymentProcessingRoutes: OpenAPIHono<Env, import("ho
|
|
|
2008
2008
|
clientReference: string | null;
|
|
2009
2009
|
currency: string;
|
|
2010
2010
|
amountCents: number;
|
|
2011
|
-
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
2011
|
+
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other" | null;
|
|
2012
2012
|
payerPersonId: string | null;
|
|
2013
2013
|
payerOrganizationId: string | null;
|
|
2014
2014
|
payerEmail: string | null;
|
|
@@ -2111,7 +2111,7 @@ export declare const financePaymentProcessingRoutes: OpenAPIHono<Env, import("ho
|
|
|
2111
2111
|
clientReference: string | null;
|
|
2112
2112
|
currency: string;
|
|
2113
2113
|
amountCents: number;
|
|
2114
|
-
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
2114
|
+
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other" | null;
|
|
2115
2115
|
payerPersonId: string | null;
|
|
2116
2116
|
payerOrganizationId: string | null;
|
|
2117
2117
|
payerEmail: string | null;
|
|
@@ -2184,7 +2184,7 @@ export declare const financePaymentProcessingRoutes: OpenAPIHono<Env, import("ho
|
|
|
2184
2184
|
clientReference: string | null;
|
|
2185
2185
|
currency: string;
|
|
2186
2186
|
amountCents: number;
|
|
2187
|
-
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
2187
|
+
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other" | null;
|
|
2188
2188
|
payerPersonId: string | null;
|
|
2189
2189
|
payerOrganizationId: string | null;
|
|
2190
2190
|
payerEmail: string | null;
|
|
@@ -2257,7 +2257,7 @@ export declare const financePaymentProcessingRoutes: OpenAPIHono<Env, import("ho
|
|
|
2257
2257
|
clientReference: string | null;
|
|
2258
2258
|
currency: string;
|
|
2259
2259
|
amountCents: number;
|
|
2260
|
-
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "
|
|
2260
|
+
paymentMethod: "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "wallet" | "direct_bill" | "travel_credit" | "other" | null;
|
|
2261
2261
|
payerPersonId: string | null;
|
|
2262
2262
|
payerOrganizationId: string | null;
|
|
2263
2263
|
payerEmail: string | null;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* (voyant#2114 / voyant#2208 — finance sub-batch 9C). Authored from the Drizzle
|
|
4
4
|
* `$inferSelect` shapes of the payments-family tables (`supplier_payments`,
|
|
5
5
|
* `payment_instruments`, `payment_authorizations`, `payment_captures`,
|
|
6
|
-
* `
|
|
6
|
+
* `travel_credits`, `travel_credit_redemptions`) plus the enriched `UnifiedPaymentRow`
|
|
7
7
|
* projection that `listAllPayments` / `getPaymentById` return.
|
|
8
8
|
*
|
|
9
9
|
* §17: timestamp / `date` columns serialize to strings over the wire; integer
|
|
@@ -62,7 +62,7 @@ export declare const supplierPaymentSchema: z.ZodObject<{
|
|
|
62
62
|
cheque: "cheque";
|
|
63
63
|
wallet: "wallet";
|
|
64
64
|
direct_bill: "direct_bill";
|
|
65
|
-
|
|
65
|
+
travel_credit: "travel_credit";
|
|
66
66
|
other: "other";
|
|
67
67
|
}>;
|
|
68
68
|
paymentInstrumentId: z.ZodNullable<z.ZodString>;
|
|
@@ -98,7 +98,7 @@ export declare const paymentInstrumentSchema: z.ZodObject<{
|
|
|
98
98
|
cash: "cash";
|
|
99
99
|
wallet: "wallet";
|
|
100
100
|
direct_bill: "direct_bill";
|
|
101
|
-
|
|
101
|
+
travel_credit: "travel_credit";
|
|
102
102
|
other: "other";
|
|
103
103
|
bank_account: "bank_account";
|
|
104
104
|
}>;
|
|
@@ -179,7 +179,7 @@ export declare const paymentCaptureSchema: z.ZodObject<{
|
|
|
179
179
|
createdAt: z.ZodString;
|
|
180
180
|
updatedAt: z.ZodString;
|
|
181
181
|
}, z.core.$strip>;
|
|
182
|
-
export declare const
|
|
182
|
+
export declare const travelCreditSchema: z.ZodObject<{
|
|
183
183
|
id: z.ZodString;
|
|
184
184
|
code: z.ZodString;
|
|
185
185
|
seriesCode: z.ZodNullable<z.ZodString>;
|
|
@@ -199,7 +199,8 @@ export declare const voucherSchema: z.ZodObject<{
|
|
|
199
199
|
refund: "refund";
|
|
200
200
|
cancellation_credit: "cancellation_credit";
|
|
201
201
|
gift: "gift";
|
|
202
|
-
|
|
202
|
+
goodwill: "goodwill";
|
|
203
|
+
promotion: "promotion";
|
|
203
204
|
}>;
|
|
204
205
|
sourceBookingId: z.ZodNullable<z.ZodString>;
|
|
205
206
|
sourcePaymentId: z.ZodNullable<z.ZodString>;
|
|
@@ -210,18 +211,61 @@ export declare const voucherSchema: z.ZodObject<{
|
|
|
210
211
|
createdAt: z.ZodString;
|
|
211
212
|
updatedAt: z.ZodString;
|
|
212
213
|
}, z.core.$strip>;
|
|
213
|
-
export declare const
|
|
214
|
+
export declare const travelCreditRedemptionSchema: z.ZodObject<{
|
|
214
215
|
id: z.ZodString;
|
|
215
|
-
|
|
216
|
+
travelCreditId: z.ZodString;
|
|
216
217
|
bookingId: z.ZodString;
|
|
217
218
|
paymentId: z.ZodNullable<z.ZodString>;
|
|
219
|
+
idempotencyKey: z.ZodNullable<z.ZodString>;
|
|
218
220
|
amountCents: z.ZodNumber;
|
|
219
221
|
createdAt: z.ZodString;
|
|
220
222
|
createdByUserId: z.ZodNullable<z.ZodString>;
|
|
221
223
|
}, z.core.$strip>;
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
224
|
+
export declare const travelCreditDetailSchema: z.ZodObject<{
|
|
225
|
+
id: z.ZodString;
|
|
226
|
+
code: z.ZodString;
|
|
227
|
+
seriesCode: z.ZodNullable<z.ZodString>;
|
|
228
|
+
status: z.ZodEnum<{
|
|
229
|
+
void: "void";
|
|
230
|
+
expired: "expired";
|
|
231
|
+
active: "active";
|
|
232
|
+
redeemed: "redeemed";
|
|
233
|
+
}>;
|
|
234
|
+
currency: z.ZodString;
|
|
235
|
+
initialAmountCents: z.ZodNumber;
|
|
236
|
+
remainingAmountCents: z.ZodNumber;
|
|
237
|
+
issuedToPersonId: z.ZodNullable<z.ZodString>;
|
|
238
|
+
issuedToOrganizationId: z.ZodNullable<z.ZodString>;
|
|
239
|
+
sourceType: z.ZodEnum<{
|
|
240
|
+
manual: "manual";
|
|
241
|
+
refund: "refund";
|
|
242
|
+
cancellation_credit: "cancellation_credit";
|
|
243
|
+
gift: "gift";
|
|
244
|
+
goodwill: "goodwill";
|
|
245
|
+
promotion: "promotion";
|
|
246
|
+
}>;
|
|
247
|
+
sourceBookingId: z.ZodNullable<z.ZodString>;
|
|
248
|
+
sourcePaymentId: z.ZodNullable<z.ZodString>;
|
|
249
|
+
validFrom: z.ZodNullable<z.ZodString>;
|
|
250
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
251
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
252
|
+
issuedByUserId: z.ZodNullable<z.ZodString>;
|
|
253
|
+
createdAt: z.ZodString;
|
|
254
|
+
updatedAt: z.ZodString;
|
|
255
|
+
redemptions: z.ZodArray<z.ZodObject<{
|
|
256
|
+
id: z.ZodString;
|
|
257
|
+
travelCreditId: z.ZodString;
|
|
258
|
+
bookingId: z.ZodString;
|
|
259
|
+
paymentId: z.ZodNullable<z.ZodString>;
|
|
260
|
+
idempotencyKey: z.ZodNullable<z.ZodString>;
|
|
261
|
+
amountCents: z.ZodNumber;
|
|
262
|
+
createdAt: z.ZodString;
|
|
263
|
+
createdByUserId: z.ZodNullable<z.ZodString>;
|
|
264
|
+
}, z.core.$strip>>;
|
|
265
|
+
}, z.core.$strip>;
|
|
266
|
+
/** `travelCredits.redeem` returns the updated travel credit and redemption row. */
|
|
267
|
+
export declare const travelCreditRedeemResultSchema: z.ZodObject<{
|
|
268
|
+
travelCredit: z.ZodObject<{
|
|
225
269
|
id: z.ZodString;
|
|
226
270
|
code: z.ZodString;
|
|
227
271
|
seriesCode: z.ZodNullable<z.ZodString>;
|
|
@@ -241,7 +285,8 @@ export declare const voucherRedeemResultSchema: z.ZodObject<{
|
|
|
241
285
|
refund: "refund";
|
|
242
286
|
cancellation_credit: "cancellation_credit";
|
|
243
287
|
gift: "gift";
|
|
244
|
-
|
|
288
|
+
goodwill: "goodwill";
|
|
289
|
+
promotion: "promotion";
|
|
245
290
|
}>;
|
|
246
291
|
sourceBookingId: z.ZodNullable<z.ZodString>;
|
|
247
292
|
sourcePaymentId: z.ZodNullable<z.ZodString>;
|
|
@@ -254,9 +299,10 @@ export declare const voucherRedeemResultSchema: z.ZodObject<{
|
|
|
254
299
|
}, z.core.$strip>;
|
|
255
300
|
redemption: z.ZodNullable<z.ZodObject<{
|
|
256
301
|
id: z.ZodString;
|
|
257
|
-
|
|
302
|
+
travelCreditId: z.ZodString;
|
|
258
303
|
bookingId: z.ZodString;
|
|
259
304
|
paymentId: z.ZodNullable<z.ZodString>;
|
|
305
|
+
idempotencyKey: z.ZodNullable<z.ZodString>;
|
|
260
306
|
amountCents: z.ZodNumber;
|
|
261
307
|
createdAt: z.ZodString;
|
|
262
308
|
createdByUserId: z.ZodNullable<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes-payment-schemas.d.ts","sourceRoot":"","sources":["../src/routes-payment-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"routes-payment-schemas.d.ts","sourceRoot":"","sources":["../src/routes-payment-schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAA;AA4ErC,+FAA+F;AAC/F,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwB/B,CAAA;AAIF,wDAAwD;AACxD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmBhC,CAAA;AAIF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyBlC,CAAA;AAIF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoBrC,CAAA;AAIF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;iBAc/B,CAAA;AAIF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmB7B,CAAA;AAEF,eAAO,MAAM,4BAA4B;;;;;;;;;iBASvC,CAAA;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAEnC,CAAA;AAEF,mFAAmF;AACnF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGzC,CAAA"}
|