@voyantjs/finance-react 0.4.4 → 0.5.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 +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/use-booking-guarantees.d.ts +82 -0
- package/dist/hooks/use-booking-guarantees.d.ts.map +1 -0
- package/dist/hooks/use-booking-guarantees.js +46 -0
- package/dist/hooks/use-booking-payment-schedules.d.ts +63 -0
- package/dist/hooks/use-booking-payment-schedules.d.ts.map +1 -0
- package/dist/hooks/use-booking-payment-schedules.js +46 -0
- package/dist/hooks/use-invoice-mutation.d.ts +2 -2
- 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 +1 -1
- package/dist/hooks/use-invoices.d.ts +1 -1
- package/dist/hooks/use-public-booking-documents.d.ts +3 -3
- package/dist/hooks/use-public-booking-payment-options.d.ts +3 -3
- package/dist/hooks/use-public-booking-payments.d.ts +2 -2
- package/dist/hooks/use-public-finance-document-by-reference.d.ts +3 -3
- package/dist/hooks/use-public-payment-session-mutation.d.ts +3 -3
- package/dist/hooks/use-public-payment-session.d.ts +3 -3
- package/dist/hooks/use-public-voucher-validation-mutation.d.ts +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 +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/operations.d.ts +21 -21
- package/dist/query-keys.d.ts +2 -0
- package/dist/query-keys.d.ts.map +1 -1
- package/dist/query-keys.js +2 -0
- package/dist/query-options.d.ts +222 -72
- package/dist/query-options.d.ts.map +1 -1
- package/dist/query-options.js +15 -1
- package/dist/schemas.d.ts +202 -43
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +66 -0
- package/package.json +5 -5
package/dist/operations.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare function getPublicFinanceDocumentByReference(client: FetchWithVal
|
|
|
5
5
|
invoiceId: string;
|
|
6
6
|
invoiceNumber: string;
|
|
7
7
|
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
8
|
-
invoiceStatus: "draft" | "
|
|
8
|
+
invoiceStatus: "draft" | "sent" | "partially_paid" | "paid" | "overdue" | "void";
|
|
9
9
|
currency: string;
|
|
10
10
|
totalCents: number;
|
|
11
11
|
paidCents: number;
|
|
@@ -13,8 +13,8 @@ export declare function getPublicFinanceDocumentByReference(client: FetchWithVal
|
|
|
13
13
|
issueDate: string;
|
|
14
14
|
dueDate: string;
|
|
15
15
|
renditionId: string | null;
|
|
16
|
-
documentStatus: "pending" | "failed" | "
|
|
17
|
-
format: "
|
|
16
|
+
documentStatus: "pending" | "failed" | "ready" | "stale" | "missing";
|
|
17
|
+
format: "json" | "pdf" | "html" | "xml" | null;
|
|
18
18
|
language: string | null;
|
|
19
19
|
generatedAt: string | null;
|
|
20
20
|
fileSize: number | null;
|
|
@@ -30,7 +30,7 @@ export declare function getPublicBookingDocuments(client: FetchWithValidationOpt
|
|
|
30
30
|
invoiceId: string;
|
|
31
31
|
invoiceNumber: string;
|
|
32
32
|
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
33
|
-
invoiceStatus: "draft" | "
|
|
33
|
+
invoiceStatus: "draft" | "sent" | "partially_paid" | "paid" | "overdue" | "void";
|
|
34
34
|
currency: string;
|
|
35
35
|
totalCents: number;
|
|
36
36
|
paidCents: number;
|
|
@@ -38,8 +38,8 @@ export declare function getPublicBookingDocuments(client: FetchWithValidationOpt
|
|
|
38
38
|
issueDate: string;
|
|
39
39
|
dueDate: string;
|
|
40
40
|
renditionId: string | null;
|
|
41
|
-
documentStatus: "pending" | "failed" | "
|
|
42
|
-
format: "
|
|
41
|
+
documentStatus: "pending" | "failed" | "ready" | "stale" | "missing";
|
|
42
|
+
format: "json" | "pdf" | "html" | "xml" | null;
|
|
43
43
|
language: string | null;
|
|
44
44
|
generatedAt: string | null;
|
|
45
45
|
fileSize: number | null;
|
|
@@ -56,8 +56,8 @@ export declare function getPublicBookingPayments(client: FetchWithValidationOpti
|
|
|
56
56
|
invoiceId: string;
|
|
57
57
|
invoiceNumber: string;
|
|
58
58
|
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
59
|
-
status: "
|
|
60
|
-
paymentMethod: "
|
|
59
|
+
status: "completed" | "pending" | "failed" | "refunded";
|
|
60
|
+
paymentMethod: "other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill";
|
|
61
61
|
amountCents: number;
|
|
62
62
|
currency: string;
|
|
63
63
|
paymentDate: string;
|
|
@@ -79,8 +79,8 @@ export declare function getPublicBookingPaymentOptions(client: FetchWithValidati
|
|
|
79
79
|
id: string;
|
|
80
80
|
label: string;
|
|
81
81
|
provider: string | null;
|
|
82
|
-
instrumentType: "
|
|
83
|
-
status: "
|
|
82
|
+
instrumentType: "other" | "voucher" | "wallet" | "credit_card" | "debit_card" | "cash" | "direct_bill" | "bank_account";
|
|
83
|
+
status: "expired" | "revoked" | "active" | "inactive" | "failed_verification";
|
|
84
84
|
brand: string | null;
|
|
85
85
|
last4: string | null;
|
|
86
86
|
expiryMonth: number | null;
|
|
@@ -90,7 +90,7 @@ export declare function getPublicBookingPaymentOptions(client: FetchWithValidati
|
|
|
90
90
|
schedules: {
|
|
91
91
|
id: string;
|
|
92
92
|
scheduleType: "other" | "deposit" | "installment" | "balance" | "hold";
|
|
93
|
-
status: "
|
|
93
|
+
status: "expired" | "cancelled" | "pending" | "paid" | "due" | "waived";
|
|
94
94
|
dueDate: string;
|
|
95
95
|
currency: string;
|
|
96
96
|
amountCents: number;
|
|
@@ -117,13 +117,13 @@ export declare function getPublicBookingPaymentOptions(client: FetchWithValidati
|
|
|
117
117
|
export declare function getPublicPaymentSession(client: FetchWithValidationOptions, sessionId: string): Promise<{
|
|
118
118
|
data: {
|
|
119
119
|
id: string;
|
|
120
|
-
targetType: "
|
|
120
|
+
targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
|
|
121
121
|
targetId: string | null;
|
|
122
122
|
bookingId: string | null;
|
|
123
123
|
invoiceId: string | null;
|
|
124
124
|
bookingPaymentScheduleId: string | null;
|
|
125
125
|
bookingGuaranteeId: string | null;
|
|
126
|
-
status: "
|
|
126
|
+
status: "expired" | "cancelled" | "pending" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
|
|
127
127
|
provider: string | null;
|
|
128
128
|
providerSessionId: string | null;
|
|
129
129
|
providerPaymentId: string | null;
|
|
@@ -131,7 +131,7 @@ export declare function getPublicPaymentSession(client: FetchWithValidationOptio
|
|
|
131
131
|
clientReference: string | null;
|
|
132
132
|
currency: string;
|
|
133
133
|
amountCents: number;
|
|
134
|
-
paymentMethod: "
|
|
134
|
+
paymentMethod: "other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill" | null;
|
|
135
135
|
payerEmail: string | null;
|
|
136
136
|
payerName: string | null;
|
|
137
137
|
redirectUrl: string | null;
|
|
@@ -146,13 +146,13 @@ export declare function getPublicPaymentSession(client: FetchWithValidationOptio
|
|
|
146
146
|
export declare function startPublicBookingSchedulePaymentSession(client: FetchWithValidationOptions, bookingId: string, scheduleId: string, input: PublicStartPaymentSessionInput): Promise<{
|
|
147
147
|
data: {
|
|
148
148
|
id: string;
|
|
149
|
-
targetType: "
|
|
149
|
+
targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
|
|
150
150
|
targetId: string | null;
|
|
151
151
|
bookingId: string | null;
|
|
152
152
|
invoiceId: string | null;
|
|
153
153
|
bookingPaymentScheduleId: string | null;
|
|
154
154
|
bookingGuaranteeId: string | null;
|
|
155
|
-
status: "
|
|
155
|
+
status: "expired" | "cancelled" | "pending" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
|
|
156
156
|
provider: string | null;
|
|
157
157
|
providerSessionId: string | null;
|
|
158
158
|
providerPaymentId: string | null;
|
|
@@ -160,7 +160,7 @@ export declare function startPublicBookingSchedulePaymentSession(client: FetchWi
|
|
|
160
160
|
clientReference: string | null;
|
|
161
161
|
currency: string;
|
|
162
162
|
amountCents: number;
|
|
163
|
-
paymentMethod: "
|
|
163
|
+
paymentMethod: "other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill" | null;
|
|
164
164
|
payerEmail: string | null;
|
|
165
165
|
payerName: string | null;
|
|
166
166
|
redirectUrl: string | null;
|
|
@@ -175,13 +175,13 @@ export declare function startPublicBookingSchedulePaymentSession(client: FetchWi
|
|
|
175
175
|
export declare function startPublicBookingGuaranteePaymentSession(client: FetchWithValidationOptions, bookingId: string, guaranteeId: string, input: PublicStartPaymentSessionInput): Promise<{
|
|
176
176
|
data: {
|
|
177
177
|
id: string;
|
|
178
|
-
targetType: "
|
|
178
|
+
targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
|
|
179
179
|
targetId: string | null;
|
|
180
180
|
bookingId: string | null;
|
|
181
181
|
invoiceId: string | null;
|
|
182
182
|
bookingPaymentScheduleId: string | null;
|
|
183
183
|
bookingGuaranteeId: string | null;
|
|
184
|
-
status: "
|
|
184
|
+
status: "expired" | "cancelled" | "pending" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
|
|
185
185
|
provider: string | null;
|
|
186
186
|
providerSessionId: string | null;
|
|
187
187
|
providerPaymentId: string | null;
|
|
@@ -189,7 +189,7 @@ export declare function startPublicBookingGuaranteePaymentSession(client: FetchW
|
|
|
189
189
|
clientReference: string | null;
|
|
190
190
|
currency: string;
|
|
191
191
|
amountCents: number;
|
|
192
|
-
paymentMethod: "
|
|
192
|
+
paymentMethod: "other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill" | null;
|
|
193
193
|
payerEmail: string | null;
|
|
194
194
|
payerName: string | null;
|
|
195
195
|
redirectUrl: string | null;
|
|
@@ -204,7 +204,7 @@ export declare function startPublicBookingGuaranteePaymentSession(client: FetchW
|
|
|
204
204
|
export declare function validatePublicVoucher(client: FetchWithValidationOptions, input: PublicValidateVoucherInput): Promise<{
|
|
205
205
|
data: {
|
|
206
206
|
valid: boolean;
|
|
207
|
-
reason: "
|
|
207
|
+
reason: "expired" | "inactive" | "not_found" | "not_started" | "booking_mismatch" | "currency_mismatch" | "insufficient_balance" | null;
|
|
208
208
|
voucher: {
|
|
209
209
|
id: string;
|
|
210
210
|
code: string;
|
package/dist/query-keys.d.ts
CHANGED
|
@@ -26,6 +26,8 @@ export declare const financeQueryKeys: {
|
|
|
26
26
|
readonly payments: (invoiceId: string) => readonly ["voyant", "finance", "invoices", "detail", string, "payments"];
|
|
27
27
|
readonly creditNotes: (invoiceId: string) => readonly ["voyant", "finance", "invoices", "detail", string, "credit-notes"];
|
|
28
28
|
readonly notes: (invoiceId: string) => readonly ["voyant", "finance", "invoices", "detail", string, "notes"];
|
|
29
|
+
readonly bookingPaymentSchedules: (bookingId: string) => readonly ["voyant", "finance", "booking-payment-schedules", string];
|
|
30
|
+
readonly bookingGuarantees: (bookingId: string) => readonly ["voyant", "finance", "booking-guarantees", string];
|
|
29
31
|
readonly supplierPayments: () => readonly ["voyant", "finance", "supplier-payments"];
|
|
30
32
|
readonly supplierPaymentsList: (filters: FinanceSupplierPaymentListFilters) => readonly ["voyant", "finance", "supplier-payments", "list", FinanceSupplierPaymentListFilters];
|
|
31
33
|
readonly publicCheckout: () => readonly ["voyant", "finance", "public-checkout"];
|
package/dist/query-keys.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-keys.d.ts","sourceRoot":"","sources":["../src/query-keys.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,yBAAyB;IACxC,MAAM,CAAC,E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G,SAAS,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CACtC;AAED,MAAM,WAAW,kCAAkC;IACjD,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC/B;AAED,eAAO,MAAM,gBAAgB;;;qCAIH,yBAAyB;2BAEnC,MAAM;oCACG,MAAM;mCACP,MAAM;sCACH,MAAM;gCAEZ,MAAM;kDAEY,MAAM;4CAEZ,MAAM;;6CAIL,iCAAiC;;oDAI1B,kCAAkC;iDAErC,MAAM;gDAEP,MAAM;sDAEA,MAAM,WAAW,kCAAkC;+CAE1D,MAAM;;CAIhC,CAAA"}
|
package/dist/query-keys.js
CHANGED
|
@@ -7,6 +7,8 @@ export const financeQueryKeys = {
|
|
|
7
7
|
payments: (invoiceId) => [...financeQueryKeys.invoice(invoiceId), "payments"],
|
|
8
8
|
creditNotes: (invoiceId) => [...financeQueryKeys.invoice(invoiceId), "credit-notes"],
|
|
9
9
|
notes: (invoiceId) => [...financeQueryKeys.invoice(invoiceId), "notes"],
|
|
10
|
+
bookingPaymentSchedules: (bookingId) => [...financeQueryKeys.all, "booking-payment-schedules", bookingId],
|
|
11
|
+
bookingGuarantees: (bookingId) => [...financeQueryKeys.all, "booking-guarantees", bookingId],
|
|
10
12
|
supplierPayments: () => [...financeQueryKeys.all, "supplier-payments"],
|
|
11
13
|
supplierPaymentsList: (filters) => [...financeQueryKeys.supplierPayments(), "list", filters],
|
|
12
14
|
publicCheckout: () => [...financeQueryKeys.all, "public-checkout"],
|