@voyantjs/finance-react 0.19.0 → 0.21.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/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/use-admin-booking-payments.d.ts +28 -0
- package/dist/hooks/use-admin-booking-payments.d.ts.map +1 -0
- package/dist/hooks/use-admin-booking-payments.js +18 -0
- package/dist/hooks/use-booking-guarantees.d.ts +3 -3
- package/dist/hooks/use-invoice-mutation.d.ts +4 -0
- package/dist/hooks/use-invoice-mutation.d.ts.map +1 -1
- package/dist/hooks/use-invoice-payment-mutation.d.ts +1 -1
- package/dist/hooks/use-invoice-payments.d.ts +1 -1
- package/dist/hooks/use-invoice.d.ts +2 -0
- package/dist/hooks/use-invoice.d.ts.map +1 -1
- package/dist/hooks/use-invoices.d.ts +2 -0
- package/dist/hooks/use-invoices.d.ts.map +1 -1
- package/dist/hooks/use-public-booking-payments.d.ts +1 -1
- package/dist/hooks/use-public-payment-session-mutation.d.ts +3 -2
- package/dist/hooks/use-public-payment-session-mutation.d.ts.map +1 -1
- package/dist/hooks/use-public-payment-session.d.ts +3 -2
- package/dist/hooks/use-public-payment-session.d.ts.map +1 -1
- package/dist/hooks/use-supplier-payment-mutation.d.ts +2 -2
- package/dist/hooks/use-supplier-payments.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/operations.d.ts +34 -7
- package/dist/operations.d.ts.map +1 -1
- package/dist/operations.js +9 -0
- package/dist/query-keys.d.ts +9 -0
- package/dist/query-keys.d.ts.map +1 -1
- package/dist/query-keys.js +1 -0
- package/dist/query-options.d.ts +120 -24
- package/dist/query-options.d.ts.map +1 -1
- package/dist/query-options.js +16 -1
- package/dist/schemas.d.ts +35 -13
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +14 -2
- package/package.json +5 -5
package/dist/schemas.d.ts
CHANGED
|
@@ -25,8 +25,8 @@ export declare const invoiceStatusSchema: z.ZodEnum<{
|
|
|
25
25
|
}>;
|
|
26
26
|
export declare const paymentStatusSchema: z.ZodEnum<{
|
|
27
27
|
pending: "pending";
|
|
28
|
-
completed: "completed";
|
|
29
28
|
failed: "failed";
|
|
29
|
+
completed: "completed";
|
|
30
30
|
refunded: "refunded";
|
|
31
31
|
}>;
|
|
32
32
|
export declare const creditNoteStatusSchema: z.ZodEnum<{
|
|
@@ -34,12 +34,22 @@ export declare const creditNoteStatusSchema: z.ZodEnum<{
|
|
|
34
34
|
issued: "issued";
|
|
35
35
|
applied: "applied";
|
|
36
36
|
}>;
|
|
37
|
+
export declare const invoiceTypeSchema: z.ZodEnum<{
|
|
38
|
+
invoice: "invoice";
|
|
39
|
+
proforma: "proforma";
|
|
40
|
+
credit_note: "credit_note";
|
|
41
|
+
}>;
|
|
37
42
|
export declare const invoiceRecordSchema: z.ZodObject<{
|
|
38
43
|
id: z.ZodString;
|
|
39
44
|
invoiceNumber: z.ZodString;
|
|
40
45
|
bookingId: z.ZodString;
|
|
41
46
|
personId: z.ZodNullable<z.ZodString>;
|
|
42
47
|
organizationId: z.ZodNullable<z.ZodString>;
|
|
48
|
+
invoiceType: z.ZodOptional<z.ZodEnum<{
|
|
49
|
+
invoice: "invoice";
|
|
50
|
+
proforma: "proforma";
|
|
51
|
+
credit_note: "credit_note";
|
|
52
|
+
}>>;
|
|
43
53
|
status: z.ZodEnum<{
|
|
44
54
|
void: "void";
|
|
45
55
|
draft: "draft";
|
|
@@ -59,7 +69,7 @@ export declare const invoiceRecordSchema: z.ZodObject<{
|
|
|
59
69
|
notes: z.ZodNullable<z.ZodString>;
|
|
60
70
|
createdAt: z.ZodString;
|
|
61
71
|
updatedAt: z.ZodString;
|
|
62
|
-
}, z.core.$
|
|
72
|
+
}, z.core.$loose>;
|
|
63
73
|
export type InvoiceRecord = z.infer<typeof invoiceRecordSchema>;
|
|
64
74
|
export declare const lineItemRecordSchema: z.ZodObject<{
|
|
65
75
|
id: z.ZodString;
|
|
@@ -81,8 +91,8 @@ export declare const paymentRecordSchema: z.ZodObject<{
|
|
|
81
91
|
paymentMethod: z.ZodString;
|
|
82
92
|
status: z.ZodEnum<{
|
|
83
93
|
pending: "pending";
|
|
84
|
-
completed: "completed";
|
|
85
94
|
failed: "failed";
|
|
95
|
+
completed: "completed";
|
|
86
96
|
refunded: "refunded";
|
|
87
97
|
}>;
|
|
88
98
|
referenceNumber: z.ZodNullable<z.ZodString>;
|
|
@@ -124,8 +134,8 @@ export declare const supplierPaymentRecordSchema: z.ZodObject<{
|
|
|
124
134
|
paymentMethod: z.ZodString;
|
|
125
135
|
status: z.ZodEnum<{
|
|
126
136
|
pending: "pending";
|
|
127
|
-
completed: "completed";
|
|
128
137
|
failed: "failed";
|
|
138
|
+
completed: "completed";
|
|
129
139
|
refunded: "refunded";
|
|
130
140
|
}>;
|
|
131
141
|
referenceNumber: z.ZodNullable<z.ZodString>;
|
|
@@ -217,10 +227,10 @@ export declare const guaranteeTypeSchema: z.ZodEnum<{
|
|
|
217
227
|
export declare const guaranteeStatusSchema: z.ZodEnum<{
|
|
218
228
|
pending: "pending";
|
|
219
229
|
active: "active";
|
|
230
|
+
failed: "failed";
|
|
220
231
|
expired: "expired";
|
|
221
232
|
cancelled: "cancelled";
|
|
222
233
|
released: "released";
|
|
223
|
-
failed: "failed";
|
|
224
234
|
}>;
|
|
225
235
|
export declare const bookingGuaranteeRecordSchema: z.ZodObject<{
|
|
226
236
|
id: z.ZodString;
|
|
@@ -240,10 +250,10 @@ export declare const bookingGuaranteeRecordSchema: z.ZodObject<{
|
|
|
240
250
|
status: z.ZodEnum<{
|
|
241
251
|
pending: "pending";
|
|
242
252
|
active: "active";
|
|
253
|
+
failed: "failed";
|
|
243
254
|
expired: "expired";
|
|
244
255
|
cancelled: "cancelled";
|
|
245
256
|
released: "released";
|
|
246
|
-
failed: "failed";
|
|
247
257
|
}>;
|
|
248
258
|
currency: z.ZodNullable<z.ZodString>;
|
|
249
259
|
amountCents: z.ZodNullable<z.ZodNumber>;
|
|
@@ -276,10 +286,10 @@ export declare const bookingGuaranteesResponse: z.ZodObject<{
|
|
|
276
286
|
status: z.ZodEnum<{
|
|
277
287
|
pending: "pending";
|
|
278
288
|
active: "active";
|
|
289
|
+
failed: "failed";
|
|
279
290
|
expired: "expired";
|
|
280
291
|
cancelled: "cancelled";
|
|
281
292
|
released: "released";
|
|
282
|
-
failed: "failed";
|
|
283
293
|
}>;
|
|
284
294
|
currency: z.ZodNullable<z.ZodString>;
|
|
285
295
|
amountCents: z.ZodNullable<z.ZodNumber>;
|
|
@@ -300,6 +310,11 @@ export declare const invoiceListResponse: z.ZodObject<{
|
|
|
300
310
|
bookingId: z.ZodString;
|
|
301
311
|
personId: z.ZodNullable<z.ZodString>;
|
|
302
312
|
organizationId: z.ZodNullable<z.ZodString>;
|
|
313
|
+
invoiceType: z.ZodOptional<z.ZodEnum<{
|
|
314
|
+
invoice: "invoice";
|
|
315
|
+
proforma: "proforma";
|
|
316
|
+
credit_note: "credit_note";
|
|
317
|
+
}>>;
|
|
303
318
|
status: z.ZodEnum<{
|
|
304
319
|
void: "void";
|
|
305
320
|
draft: "draft";
|
|
@@ -319,7 +334,7 @@ export declare const invoiceListResponse: z.ZodObject<{
|
|
|
319
334
|
notes: z.ZodNullable<z.ZodString>;
|
|
320
335
|
createdAt: z.ZodString;
|
|
321
336
|
updatedAt: z.ZodString;
|
|
322
|
-
}, z.core.$
|
|
337
|
+
}, z.core.$loose>>;
|
|
323
338
|
total: z.ZodNumber;
|
|
324
339
|
limit: z.ZodNumber;
|
|
325
340
|
offset: z.ZodNumber;
|
|
@@ -334,8 +349,8 @@ export declare const supplierPaymentListResponse: z.ZodObject<{
|
|
|
334
349
|
paymentMethod: z.ZodString;
|
|
335
350
|
status: z.ZodEnum<{
|
|
336
351
|
pending: "pending";
|
|
337
|
-
completed: "completed";
|
|
338
352
|
failed: "failed";
|
|
353
|
+
completed: "completed";
|
|
339
354
|
refunded: "refunded";
|
|
340
355
|
}>;
|
|
341
356
|
referenceNumber: z.ZodNullable<z.ZodString>;
|
|
@@ -354,6 +369,11 @@ export declare const invoiceSingleResponse: z.ZodObject<{
|
|
|
354
369
|
bookingId: z.ZodString;
|
|
355
370
|
personId: z.ZodNullable<z.ZodString>;
|
|
356
371
|
organizationId: z.ZodNullable<z.ZodString>;
|
|
372
|
+
invoiceType: z.ZodOptional<z.ZodEnum<{
|
|
373
|
+
invoice: "invoice";
|
|
374
|
+
proforma: "proforma";
|
|
375
|
+
credit_note: "credit_note";
|
|
376
|
+
}>>;
|
|
357
377
|
status: z.ZodEnum<{
|
|
358
378
|
void: "void";
|
|
359
379
|
draft: "draft";
|
|
@@ -373,7 +393,7 @@ export declare const invoiceSingleResponse: z.ZodObject<{
|
|
|
373
393
|
notes: z.ZodNullable<z.ZodString>;
|
|
374
394
|
createdAt: z.ZodString;
|
|
375
395
|
updatedAt: z.ZodString;
|
|
376
|
-
}, z.core.$
|
|
396
|
+
}, z.core.$loose>;
|
|
377
397
|
}, z.core.$strip>;
|
|
378
398
|
export declare const invoiceLineItemsResponse: z.ZodObject<{
|
|
379
399
|
data: z.ZodArray<z.ZodObject<{
|
|
@@ -397,8 +417,8 @@ export declare const invoicePaymentsResponse: z.ZodObject<{
|
|
|
397
417
|
paymentMethod: z.ZodString;
|
|
398
418
|
status: z.ZodEnum<{
|
|
399
419
|
pending: "pending";
|
|
400
|
-
completed: "completed";
|
|
401
420
|
failed: "failed";
|
|
421
|
+
completed: "completed";
|
|
402
422
|
refunded: "refunded";
|
|
403
423
|
}>;
|
|
404
424
|
referenceNumber: z.ZodNullable<z.ZodString>;
|
|
@@ -613,8 +633,8 @@ export declare const publicBookingFinancePaymentsResponse: z.ZodObject<{
|
|
|
613
633
|
}>;
|
|
614
634
|
status: z.ZodEnum<{
|
|
615
635
|
pending: "pending";
|
|
616
|
-
completed: "completed";
|
|
617
636
|
failed: "failed";
|
|
637
|
+
completed: "completed";
|
|
618
638
|
refunded: "refunded";
|
|
619
639
|
}>;
|
|
620
640
|
paymentMethod: z.ZodEnum<{
|
|
@@ -646,6 +666,7 @@ export declare const publicPaymentSessionResponse: z.ZodObject<{
|
|
|
646
666
|
invoice: "invoice";
|
|
647
667
|
booking_payment_schedule: "booking_payment_schedule";
|
|
648
668
|
booking_guarantee: "booking_guarantee";
|
|
669
|
+
flight_order: "flight_order";
|
|
649
670
|
}>;
|
|
650
671
|
targetId: z.ZodNullable<z.ZodString>;
|
|
651
672
|
bookingId: z.ZodNullable<z.ZodString>;
|
|
@@ -654,9 +675,9 @@ export declare const publicPaymentSessionResponse: z.ZodObject<{
|
|
|
654
675
|
bookingGuaranteeId: z.ZodNullable<z.ZodString>;
|
|
655
676
|
status: z.ZodEnum<{
|
|
656
677
|
pending: "pending";
|
|
678
|
+
failed: "failed";
|
|
657
679
|
expired: "expired";
|
|
658
680
|
cancelled: "cancelled";
|
|
659
|
-
failed: "failed";
|
|
660
681
|
paid: "paid";
|
|
661
682
|
requires_redirect: "requires_redirect";
|
|
662
683
|
processing: "processing";
|
|
@@ -689,6 +710,7 @@ export declare const publicPaymentSessionResponse: z.ZodObject<{
|
|
|
689
710
|
completedAt: z.ZodNullable<z.ZodString>;
|
|
690
711
|
failureCode: z.ZodNullable<z.ZodString>;
|
|
691
712
|
failureMessage: z.ZodNullable<z.ZodString>;
|
|
713
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
692
714
|
}, z.core.$strip>;
|
|
693
715
|
}, z.core.$strip>;
|
|
694
716
|
export declare const publicVoucherValidationResponse: z.ZodObject<{
|
package/dist/schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mCAAmC,EACnC,kCAAkC,EAClC,iCAAiC,EACjC,kCAAkC,EAClC,iCAAiC,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E,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAgD,CAAA"}
|
package/dist/schemas.js
CHANGED
|
@@ -19,12 +19,20 @@ export const invoiceStatusSchema = z.enum([
|
|
|
19
19
|
]);
|
|
20
20
|
export const paymentStatusSchema = z.enum(["pending", "completed", "failed", "refunded"]);
|
|
21
21
|
export const creditNoteStatusSchema = z.enum(["draft", "issued", "applied"]);
|
|
22
|
-
export const
|
|
22
|
+
export const invoiceTypeSchema = z.enum(["invoice", "proforma", "credit_note"]);
|
|
23
|
+
export const invoiceRecordSchema = z
|
|
24
|
+
.object({
|
|
23
25
|
id: z.string(),
|
|
24
26
|
invoiceNumber: z.string(),
|
|
25
27
|
bookingId: z.string(),
|
|
26
28
|
personId: z.string().nullable(),
|
|
27
29
|
organizationId: z.string().nullable(),
|
|
30
|
+
/**
|
|
31
|
+
* `invoice` (final), `proforma` (placeholder pending bank transfer),
|
|
32
|
+
* or `credit_note` (refund / cancellation). Drives the type badge
|
|
33
|
+
* + filename on the booking detail page.
|
|
34
|
+
*/
|
|
35
|
+
invoiceType: invoiceTypeSchema.optional(),
|
|
28
36
|
status: invoiceStatusSchema,
|
|
29
37
|
currency: z.string(),
|
|
30
38
|
subtotalCents: z.number().int(),
|
|
@@ -37,7 +45,11 @@ export const invoiceRecordSchema = z.object({
|
|
|
37
45
|
notes: z.string().nullable(),
|
|
38
46
|
createdAt: z.string(),
|
|
39
47
|
updatedAt: z.string(),
|
|
40
|
-
})
|
|
48
|
+
})
|
|
49
|
+
// Permissive on extra columns the server may return (e.g.
|
|
50
|
+
// `convertedFromInvoiceId`, `baseCurrency`). Adding them all to the
|
|
51
|
+
// schema invites churn; passthrough lets the UI use what it needs.
|
|
52
|
+
.passthrough();
|
|
41
53
|
export const lineItemRecordSchema = z.object({
|
|
42
54
|
id: z.string(),
|
|
43
55
|
invoiceId: z.string(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/finance-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"react": "^19.0.0",
|
|
42
42
|
"react-dom": "^19.0.0",
|
|
43
43
|
"zod": "^4.0.0",
|
|
44
|
-
"@voyantjs/finance": "0.
|
|
44
|
+
"@voyantjs/finance": "0.21.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@tanstack/react-query": "^5.96.2",
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"typescript": "^6.0.2",
|
|
53
53
|
"vitest": "^4.1.2",
|
|
54
54
|
"zod": "^4.3.6",
|
|
55
|
-
"@voyantjs/finance": "0.
|
|
56
|
-
"@voyantjs/react": "0.
|
|
55
|
+
"@voyantjs/finance": "0.21.0",
|
|
56
|
+
"@voyantjs/react": "0.21.0",
|
|
57
57
|
"@voyantjs/voyant-typescript-config": "0.1.0"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@voyantjs/react": "0.
|
|
60
|
+
"@voyantjs/react": "0.21.0"
|
|
61
61
|
},
|
|
62
62
|
"files": [
|
|
63
63
|
"dist"
|