@voyantjs/finance-react 0.2.0 → 0.3.1
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/LICENSE +109 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +20 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +5 -0
- package/dist/hooks/use-public-booking-documents.d.ts +29 -0
- package/dist/hooks/use-public-booking-documents.d.ts.map +1 -0
- package/dist/hooks/use-public-booking-documents.js +12 -0
- package/dist/hooks/use-public-booking-payment-options.d.ts +47 -0
- package/dist/hooks/use-public-booking-payment-options.d.ts.map +1 -0
- package/dist/hooks/use-public-booking-payment-options.js +12 -0
- package/dist/hooks/use-public-payment-session-mutation.d.ts +42 -0
- package/dist/hooks/use-public-payment-session-mutation.d.ts.map +1 -0
- package/dist/hooks/use-public-payment-session-mutation.js +33 -0
- package/dist/hooks/use-public-payment-session.d.ts +33 -0
- package/dist/hooks/use-public-payment-session.d.ts.map +1 -0
- package/dist/hooks/use-public-payment-session.js +12 -0
- package/dist/hooks/use-public-voucher-validation-mutation.d.ts +23 -0
- package/dist/hooks/use-public-voucher-validation-mutation.d.ts.map +1 -0
- package/dist/hooks/use-public-voucher-validation-mutation.js +17 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/operations.d.ts +179 -0
- package/dist/operations.d.ts.map +1 -0
- package/dist/operations.js +21 -0
- package/dist/query-keys.d.ts +12 -0
- package/dist/query-keys.d.ts.map +1 -1
- package/dist/query-keys.js +5 -0
- package/dist/query-options.d.ts +399 -0
- package/dist/query-options.d.ts.map +1 -1
- package/dist/query-options.js +37 -0
- package/dist/schemas.d.ts +208 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +6 -0
- package/package.json +40 -48
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { type FetchWithValidationOptions } from "./client.js";
|
|
2
|
+
import { type PublicStartPaymentSessionInput, type PublicValidateVoucherInput } from "./schemas.js";
|
|
3
|
+
export declare function getPublicBookingDocuments(client: FetchWithValidationOptions, bookingId: string): Promise<{
|
|
4
|
+
data: {
|
|
5
|
+
bookingId: string;
|
|
6
|
+
documents: {
|
|
7
|
+
invoiceId: string;
|
|
8
|
+
invoiceNumber: string;
|
|
9
|
+
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
10
|
+
invoiceStatus: "draft" | "void" | "sent" | "partially_paid" | "paid" | "overdue";
|
|
11
|
+
currency: string;
|
|
12
|
+
totalCents: number;
|
|
13
|
+
paidCents: number;
|
|
14
|
+
balanceDueCents: number;
|
|
15
|
+
issueDate: string;
|
|
16
|
+
dueDate: string;
|
|
17
|
+
renditionId: string | null;
|
|
18
|
+
documentStatus: "pending" | "failed" | "missing" | "ready" | "stale";
|
|
19
|
+
format: "html" | "pdf" | "xml" | "json" | null;
|
|
20
|
+
language: string | null;
|
|
21
|
+
generatedAt: string | null;
|
|
22
|
+
fileSize: number | null;
|
|
23
|
+
checksum: string | null;
|
|
24
|
+
downloadUrl: string | null;
|
|
25
|
+
}[];
|
|
26
|
+
};
|
|
27
|
+
}>;
|
|
28
|
+
export declare function getPublicBookingPaymentOptions(client: FetchWithValidationOptions, bookingId: string, filters?: {
|
|
29
|
+
personId?: string;
|
|
30
|
+
organizationId?: string;
|
|
31
|
+
provider?: string;
|
|
32
|
+
instrumentType?: string;
|
|
33
|
+
includeInactive?: boolean;
|
|
34
|
+
}): Promise<{
|
|
35
|
+
data: {
|
|
36
|
+
bookingId: string;
|
|
37
|
+
accounts: {
|
|
38
|
+
id: string;
|
|
39
|
+
label: string;
|
|
40
|
+
provider: string | null;
|
|
41
|
+
instrumentType: "credit_card" | "debit_card" | "bank_account" | "wallet" | "voucher" | "direct_bill" | "cash" | "other";
|
|
42
|
+
status: "active" | "inactive" | "expired" | "revoked" | "failed_verification";
|
|
43
|
+
brand: string | null;
|
|
44
|
+
last4: string | null;
|
|
45
|
+
expiryMonth: number | null;
|
|
46
|
+
expiryYear: number | null;
|
|
47
|
+
isDefault: boolean;
|
|
48
|
+
}[];
|
|
49
|
+
schedules: {
|
|
50
|
+
id: string;
|
|
51
|
+
scheduleType: "other" | "deposit" | "installment" | "balance" | "hold";
|
|
52
|
+
status: "pending" | "paid" | "expired" | "due" | "waived" | "cancelled";
|
|
53
|
+
dueDate: string;
|
|
54
|
+
currency: string;
|
|
55
|
+
amountCents: number;
|
|
56
|
+
notes: string | null;
|
|
57
|
+
}[];
|
|
58
|
+
guarantees: {
|
|
59
|
+
id: string;
|
|
60
|
+
bookingPaymentScheduleId: string | null;
|
|
61
|
+
guaranteeType: string;
|
|
62
|
+
status: string;
|
|
63
|
+
currency: string | null;
|
|
64
|
+
amountCents: number | null;
|
|
65
|
+
provider: string | null;
|
|
66
|
+
referenceNumber: string | null;
|
|
67
|
+
expiresAt: string | null;
|
|
68
|
+
notes: string | null;
|
|
69
|
+
}[];
|
|
70
|
+
recommendedTarget: {
|
|
71
|
+
targetType: "booking_payment_schedule" | "booking_guarantee" | null;
|
|
72
|
+
targetId: string | null;
|
|
73
|
+
} | null;
|
|
74
|
+
};
|
|
75
|
+
}>;
|
|
76
|
+
export declare function getPublicPaymentSession(client: FetchWithValidationOptions, sessionId: string): Promise<{
|
|
77
|
+
data: {
|
|
78
|
+
id: string;
|
|
79
|
+
targetType: "invoice" | "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order";
|
|
80
|
+
targetId: string | null;
|
|
81
|
+
bookingId: string | null;
|
|
82
|
+
invoiceId: string | null;
|
|
83
|
+
bookingPaymentScheduleId: string | null;
|
|
84
|
+
bookingGuaranteeId: string | null;
|
|
85
|
+
status: "pending" | "failed" | "paid" | "expired" | "cancelled" | "requires_redirect" | "processing" | "authorized";
|
|
86
|
+
provider: string | null;
|
|
87
|
+
providerSessionId: string | null;
|
|
88
|
+
providerPaymentId: string | null;
|
|
89
|
+
externalReference: string | null;
|
|
90
|
+
clientReference: string | null;
|
|
91
|
+
currency: string;
|
|
92
|
+
amountCents: number;
|
|
93
|
+
paymentMethod: "credit_card" | "debit_card" | "wallet" | "voucher" | "direct_bill" | "cash" | "other" | "bank_transfer" | "cheque" | null;
|
|
94
|
+
payerEmail: string | null;
|
|
95
|
+
payerName: string | null;
|
|
96
|
+
redirectUrl: string | null;
|
|
97
|
+
returnUrl: string | null;
|
|
98
|
+
cancelUrl: string | null;
|
|
99
|
+
expiresAt: string | null;
|
|
100
|
+
completedAt: string | null;
|
|
101
|
+
failureCode: string | null;
|
|
102
|
+
failureMessage: string | null;
|
|
103
|
+
};
|
|
104
|
+
}>;
|
|
105
|
+
export declare function startPublicBookingSchedulePaymentSession(client: FetchWithValidationOptions, bookingId: string, scheduleId: string, input: PublicStartPaymentSessionInput): Promise<{
|
|
106
|
+
data: {
|
|
107
|
+
id: string;
|
|
108
|
+
targetType: "invoice" | "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order";
|
|
109
|
+
targetId: string | null;
|
|
110
|
+
bookingId: string | null;
|
|
111
|
+
invoiceId: string | null;
|
|
112
|
+
bookingPaymentScheduleId: string | null;
|
|
113
|
+
bookingGuaranteeId: string | null;
|
|
114
|
+
status: "pending" | "failed" | "paid" | "expired" | "cancelled" | "requires_redirect" | "processing" | "authorized";
|
|
115
|
+
provider: string | null;
|
|
116
|
+
providerSessionId: string | null;
|
|
117
|
+
providerPaymentId: string | null;
|
|
118
|
+
externalReference: string | null;
|
|
119
|
+
clientReference: string | null;
|
|
120
|
+
currency: string;
|
|
121
|
+
amountCents: number;
|
|
122
|
+
paymentMethod: "credit_card" | "debit_card" | "wallet" | "voucher" | "direct_bill" | "cash" | "other" | "bank_transfer" | "cheque" | null;
|
|
123
|
+
payerEmail: string | null;
|
|
124
|
+
payerName: string | null;
|
|
125
|
+
redirectUrl: string | null;
|
|
126
|
+
returnUrl: string | null;
|
|
127
|
+
cancelUrl: string | null;
|
|
128
|
+
expiresAt: string | null;
|
|
129
|
+
completedAt: string | null;
|
|
130
|
+
failureCode: string | null;
|
|
131
|
+
failureMessage: string | null;
|
|
132
|
+
};
|
|
133
|
+
}>;
|
|
134
|
+
export declare function startPublicBookingGuaranteePaymentSession(client: FetchWithValidationOptions, bookingId: string, guaranteeId: string, input: PublicStartPaymentSessionInput): Promise<{
|
|
135
|
+
data: {
|
|
136
|
+
id: string;
|
|
137
|
+
targetType: "invoice" | "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order";
|
|
138
|
+
targetId: string | null;
|
|
139
|
+
bookingId: string | null;
|
|
140
|
+
invoiceId: string | null;
|
|
141
|
+
bookingPaymentScheduleId: string | null;
|
|
142
|
+
bookingGuaranteeId: string | null;
|
|
143
|
+
status: "pending" | "failed" | "paid" | "expired" | "cancelled" | "requires_redirect" | "processing" | "authorized";
|
|
144
|
+
provider: string | null;
|
|
145
|
+
providerSessionId: string | null;
|
|
146
|
+
providerPaymentId: string | null;
|
|
147
|
+
externalReference: string | null;
|
|
148
|
+
clientReference: string | null;
|
|
149
|
+
currency: string;
|
|
150
|
+
amountCents: number;
|
|
151
|
+
paymentMethod: "credit_card" | "debit_card" | "wallet" | "voucher" | "direct_bill" | "cash" | "other" | "bank_transfer" | "cheque" | null;
|
|
152
|
+
payerEmail: string | null;
|
|
153
|
+
payerName: string | null;
|
|
154
|
+
redirectUrl: string | null;
|
|
155
|
+
returnUrl: string | null;
|
|
156
|
+
cancelUrl: string | null;
|
|
157
|
+
expiresAt: string | null;
|
|
158
|
+
completedAt: string | null;
|
|
159
|
+
failureCode: string | null;
|
|
160
|
+
failureMessage: string | null;
|
|
161
|
+
};
|
|
162
|
+
}>;
|
|
163
|
+
export declare function validatePublicVoucher(client: FetchWithValidationOptions, input: PublicValidateVoucherInput): Promise<{
|
|
164
|
+
data: {
|
|
165
|
+
valid: boolean;
|
|
166
|
+
reason: "inactive" | "expired" | "not_found" | "not_started" | "booking_mismatch" | "currency_mismatch" | "insufficient_balance" | null;
|
|
167
|
+
voucher: {
|
|
168
|
+
id: string;
|
|
169
|
+
code: string;
|
|
170
|
+
label: string;
|
|
171
|
+
provider: string | null;
|
|
172
|
+
currency: string | null;
|
|
173
|
+
amountCents: number | null;
|
|
174
|
+
remainingAmountCents: number | null;
|
|
175
|
+
expiresAt: string | null;
|
|
176
|
+
} | null;
|
|
177
|
+
};
|
|
178
|
+
}>;
|
|
179
|
+
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,0BAA0B,EAAwC,MAAM,aAAa,CAAA;AACnG,OAAO,EACL,KAAK,8BAA8B,EACnC,KAAK,0BAA0B,EAKhC,MAAM,cAAc,CAAA;AAErB,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,0BAA0B,EAAE,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;GAM9F;AAED,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAOF;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,0BAA0B,EAAE,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAM5F;AAED,wBAAgB,wCAAwC,CACtD,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAQtC;AAED,wBAAgB,yCAAyC,CACvD,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAQtC;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,0BAA0B,EAClC,KAAK,EAAE,0BAA0B;;;;;;;;;;;;;;;GAQlC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { fetchWithValidation, withQueryParams } from "./client.js";
|
|
3
|
+
import { publicBookingFinanceDocumentsResponse, publicBookingPaymentOptionsResponse, publicPaymentSessionResponse, publicVoucherValidationResponse, } from "./schemas.js";
|
|
4
|
+
export function getPublicBookingDocuments(client, bookingId) {
|
|
5
|
+
return fetchWithValidation(`/v1/public/finance/bookings/${bookingId}/documents`, publicBookingFinanceDocumentsResponse, client);
|
|
6
|
+
}
|
|
7
|
+
export function getPublicBookingPaymentOptions(client, bookingId, filters) {
|
|
8
|
+
return fetchWithValidation(withQueryParams(`/v1/public/finance/bookings/${bookingId}/payment-options`, filters), publicBookingPaymentOptionsResponse, client);
|
|
9
|
+
}
|
|
10
|
+
export function getPublicPaymentSession(client, sessionId) {
|
|
11
|
+
return fetchWithValidation(`/v1/public/finance/payment-sessions/${sessionId}`, publicPaymentSessionResponse, client);
|
|
12
|
+
}
|
|
13
|
+
export function startPublicBookingSchedulePaymentSession(client, bookingId, scheduleId, input) {
|
|
14
|
+
return fetchWithValidation(`/v1/public/finance/bookings/${bookingId}/payment-schedules/${scheduleId}/payment-session`, publicPaymentSessionResponse, client, { method: "POST", body: JSON.stringify(input) });
|
|
15
|
+
}
|
|
16
|
+
export function startPublicBookingGuaranteePaymentSession(client, bookingId, guaranteeId, input) {
|
|
17
|
+
return fetchWithValidation(`/v1/public/finance/bookings/${bookingId}/guarantees/${guaranteeId}/payment-session`, publicPaymentSessionResponse, client, { method: "POST", body: JSON.stringify(input) });
|
|
18
|
+
}
|
|
19
|
+
export function validatePublicVoucher(client, input) {
|
|
20
|
+
return fetchWithValidation("/v1/public/finance/vouchers/validate", publicVoucherValidationResponse, client, { method: "POST", body: JSON.stringify(input) });
|
|
21
|
+
}
|
package/dist/query-keys.d.ts
CHANGED
|
@@ -7,6 +7,13 @@ export interface FinanceSupplierPaymentListFilters {
|
|
|
7
7
|
limit?: number | undefined;
|
|
8
8
|
offset?: number | undefined;
|
|
9
9
|
}
|
|
10
|
+
export interface PublicBookingPaymentOptionsFilters {
|
|
11
|
+
personId?: string | undefined;
|
|
12
|
+
organizationId?: string | undefined;
|
|
13
|
+
provider?: string | undefined;
|
|
14
|
+
instrumentType?: string | undefined;
|
|
15
|
+
includeInactive?: boolean | undefined;
|
|
16
|
+
}
|
|
10
17
|
export declare const financeQueryKeys: {
|
|
11
18
|
readonly all: readonly ["voyant", "finance"];
|
|
12
19
|
readonly invoices: () => readonly ["voyant", "finance", "invoices"];
|
|
@@ -18,5 +25,10 @@ export declare const financeQueryKeys: {
|
|
|
18
25
|
readonly notes: (invoiceId: string) => readonly ["voyant", "finance", "invoices", "detail", string, "notes"];
|
|
19
26
|
readonly supplierPayments: () => readonly ["voyant", "finance", "supplier-payments"];
|
|
20
27
|
readonly supplierPaymentsList: (filters: FinanceSupplierPaymentListFilters) => readonly ["voyant", "finance", "supplier-payments", "list", FinanceSupplierPaymentListFilters];
|
|
28
|
+
readonly publicCheckout: () => readonly ["voyant", "finance", "public-checkout"];
|
|
29
|
+
readonly publicBookingDocuments: (bookingId: string) => readonly ["voyant", "finance", "public-checkout", "booking-documents", string];
|
|
30
|
+
readonly publicBookingPaymentOptions: (bookingId: string, filters: PublicBookingPaymentOptionsFilters) => readonly ["voyant", "finance", "public-checkout", "booking-payment-options", string, PublicBookingPaymentOptionsFilters];
|
|
31
|
+
readonly publicPaymentSession: (sessionId: string) => readonly ["voyant", "finance", "public-checkout", "payment-session", string];
|
|
32
|
+
readonly publicVoucherValidation: () => readonly ["voyant", "finance", "public-checkout", "voucher-validation"];
|
|
21
33
|
};
|
|
22
34
|
//# sourceMappingURL=query-keys.d.ts.map
|
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,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B;AAED,MAAM,WAAW,iCAAiC;IAChD,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B;AAED,eAAO,MAAM,gBAAgB;;;qCAIH,yBAAyB;2BAEnC,MAAM;oCACG,MAAM;mCACP,MAAM;sCACH,MAAM;gCAEZ,MAAM;;6CAGO,iCAAiC;
|
|
1
|
+
{"version":3,"file":"query-keys.d.ts","sourceRoot":"","sources":["../src/query-keys.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,yBAAyB;IACxC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B;AAED,MAAM,WAAW,iCAAiC;IAChD,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B;AAED,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,cAAc,CAAC,EAAE,MAAM,GAAG,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,eAAO,MAAM,gBAAgB;;;qCAIH,yBAAyB;2BAEnC,MAAM;oCACG,MAAM;mCACP,MAAM;sCACH,MAAM;gCAEZ,MAAM;;6CAGO,iCAAiC;;iDAI7B,MAAM;sDAED,MAAM,WAAW,kCAAkC;+CAE1D,MAAM;;CAIhC,CAAA"}
|
package/dist/query-keys.js
CHANGED
|
@@ -9,4 +9,9 @@ export const financeQueryKeys = {
|
|
|
9
9
|
notes: (invoiceId) => [...financeQueryKeys.invoice(invoiceId), "notes"],
|
|
10
10
|
supplierPayments: () => [...financeQueryKeys.all, "supplier-payments"],
|
|
11
11
|
supplierPaymentsList: (filters) => [...financeQueryKeys.supplierPayments(), "list", filters],
|
|
12
|
+
publicCheckout: () => [...financeQueryKeys.all, "public-checkout"],
|
|
13
|
+
publicBookingDocuments: (bookingId) => [...financeQueryKeys.publicCheckout(), "booking-documents", bookingId],
|
|
14
|
+
publicBookingPaymentOptions: (bookingId, filters) => [...financeQueryKeys.publicCheckout(), "booking-payment-options", bookingId, filters],
|
|
15
|
+
publicPaymentSession: (sessionId) => [...financeQueryKeys.publicCheckout(), "payment-session", sessionId],
|
|
16
|
+
publicVoucherValidation: () => [...financeQueryKeys.publicCheckout(), "voucher-validation"],
|
|
12
17
|
};
|
package/dist/query-options.d.ts
CHANGED
|
@@ -5,6 +5,9 @@ import type { UseInvoiceLineItemsOptions } from "./hooks/use-invoice-line-items.
|
|
|
5
5
|
import type { UseInvoiceNotesOptions } from "./hooks/use-invoice-notes.js";
|
|
6
6
|
import type { UseInvoicePaymentsOptions } from "./hooks/use-invoice-payments.js";
|
|
7
7
|
import type { UseInvoicesOptions } from "./hooks/use-invoices.js";
|
|
8
|
+
import type { UsePublicBookingDocumentsOptions } from "./hooks/use-public-booking-documents.js";
|
|
9
|
+
import type { UsePublicBookingPaymentOptionsOptions } from "./hooks/use-public-booking-payment-options.js";
|
|
10
|
+
import type { UsePublicPaymentSessionOptions } from "./hooks/use-public-payment-session.js";
|
|
8
11
|
import type { UseSupplierPaymentsOptions } from "./hooks/use-supplier-payments.js";
|
|
9
12
|
export declare function getInvoicesQueryOptions(client: FetchWithValidationOptions, options?: UseInvoicesOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
|
|
10
13
|
data: {
|
|
@@ -482,4 +485,400 @@ export declare function getInvoiceNotesQueryOptions(client: FetchWithValidationO
|
|
|
482
485
|
[dataTagErrorSymbol]: Error;
|
|
483
486
|
};
|
|
484
487
|
};
|
|
488
|
+
export declare function getPublicBookingPaymentOptionsQueryOptions(client: FetchWithValidationOptions, bookingId: string | null | undefined, options?: UsePublicBookingPaymentOptionsOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
|
|
489
|
+
data: {
|
|
490
|
+
bookingId: string;
|
|
491
|
+
accounts: {
|
|
492
|
+
id: string;
|
|
493
|
+
label: string;
|
|
494
|
+
provider: string | null;
|
|
495
|
+
instrumentType: "credit_card" | "debit_card" | "bank_account" | "wallet" | "voucher" | "direct_bill" | "cash" | "other";
|
|
496
|
+
status: "active" | "inactive" | "expired" | "revoked" | "failed_verification";
|
|
497
|
+
brand: string | null;
|
|
498
|
+
last4: string | null;
|
|
499
|
+
expiryMonth: number | null;
|
|
500
|
+
expiryYear: number | null;
|
|
501
|
+
isDefault: boolean;
|
|
502
|
+
}[];
|
|
503
|
+
schedules: {
|
|
504
|
+
id: string;
|
|
505
|
+
scheduleType: "other" | "deposit" | "installment" | "balance" | "hold";
|
|
506
|
+
status: "pending" | "paid" | "expired" | "due" | "waived" | "cancelled";
|
|
507
|
+
dueDate: string;
|
|
508
|
+
currency: string;
|
|
509
|
+
amountCents: number;
|
|
510
|
+
notes: string | null;
|
|
511
|
+
}[];
|
|
512
|
+
guarantees: {
|
|
513
|
+
id: string;
|
|
514
|
+
bookingPaymentScheduleId: string | null;
|
|
515
|
+
guaranteeType: string;
|
|
516
|
+
status: string;
|
|
517
|
+
currency: string | null;
|
|
518
|
+
amountCents: number | null;
|
|
519
|
+
provider: string | null;
|
|
520
|
+
referenceNumber: string | null;
|
|
521
|
+
expiresAt: string | null;
|
|
522
|
+
notes: string | null;
|
|
523
|
+
}[];
|
|
524
|
+
recommendedTarget: {
|
|
525
|
+
targetType: "booking_payment_schedule" | "booking_guarantee" | null;
|
|
526
|
+
targetId: string | null;
|
|
527
|
+
} | null;
|
|
528
|
+
};
|
|
529
|
+
}, Error, {
|
|
530
|
+
data: {
|
|
531
|
+
bookingId: string;
|
|
532
|
+
accounts: {
|
|
533
|
+
id: string;
|
|
534
|
+
label: string;
|
|
535
|
+
provider: string | null;
|
|
536
|
+
instrumentType: "credit_card" | "debit_card" | "bank_account" | "wallet" | "voucher" | "direct_bill" | "cash" | "other";
|
|
537
|
+
status: "active" | "inactive" | "expired" | "revoked" | "failed_verification";
|
|
538
|
+
brand: string | null;
|
|
539
|
+
last4: string | null;
|
|
540
|
+
expiryMonth: number | null;
|
|
541
|
+
expiryYear: number | null;
|
|
542
|
+
isDefault: boolean;
|
|
543
|
+
}[];
|
|
544
|
+
schedules: {
|
|
545
|
+
id: string;
|
|
546
|
+
scheduleType: "other" | "deposit" | "installment" | "balance" | "hold";
|
|
547
|
+
status: "pending" | "paid" | "expired" | "due" | "waived" | "cancelled";
|
|
548
|
+
dueDate: string;
|
|
549
|
+
currency: string;
|
|
550
|
+
amountCents: number;
|
|
551
|
+
notes: string | null;
|
|
552
|
+
}[];
|
|
553
|
+
guarantees: {
|
|
554
|
+
id: string;
|
|
555
|
+
bookingPaymentScheduleId: string | null;
|
|
556
|
+
guaranteeType: string;
|
|
557
|
+
status: string;
|
|
558
|
+
currency: string | null;
|
|
559
|
+
amountCents: number | null;
|
|
560
|
+
provider: string | null;
|
|
561
|
+
referenceNumber: string | null;
|
|
562
|
+
expiresAt: string | null;
|
|
563
|
+
notes: string | null;
|
|
564
|
+
}[];
|
|
565
|
+
recommendedTarget: {
|
|
566
|
+
targetType: "booking_payment_schedule" | "booking_guarantee" | null;
|
|
567
|
+
targetId: string | null;
|
|
568
|
+
} | null;
|
|
569
|
+
};
|
|
570
|
+
}, readonly ["voyant", "finance", "public-checkout", "booking-payment-options", string, import("./query-keys.js").PublicBookingPaymentOptionsFilters]>, "queryFn"> & {
|
|
571
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<{
|
|
572
|
+
data: {
|
|
573
|
+
bookingId: string;
|
|
574
|
+
accounts: {
|
|
575
|
+
id: string;
|
|
576
|
+
label: string;
|
|
577
|
+
provider: string | null;
|
|
578
|
+
instrumentType: "credit_card" | "debit_card" | "bank_account" | "wallet" | "voucher" | "direct_bill" | "cash" | "other";
|
|
579
|
+
status: "active" | "inactive" | "expired" | "revoked" | "failed_verification";
|
|
580
|
+
brand: string | null;
|
|
581
|
+
last4: string | null;
|
|
582
|
+
expiryMonth: number | null;
|
|
583
|
+
expiryYear: number | null;
|
|
584
|
+
isDefault: boolean;
|
|
585
|
+
}[];
|
|
586
|
+
schedules: {
|
|
587
|
+
id: string;
|
|
588
|
+
scheduleType: "other" | "deposit" | "installment" | "balance" | "hold";
|
|
589
|
+
status: "pending" | "paid" | "expired" | "due" | "waived" | "cancelled";
|
|
590
|
+
dueDate: string;
|
|
591
|
+
currency: string;
|
|
592
|
+
amountCents: number;
|
|
593
|
+
notes: string | null;
|
|
594
|
+
}[];
|
|
595
|
+
guarantees: {
|
|
596
|
+
id: string;
|
|
597
|
+
bookingPaymentScheduleId: string | null;
|
|
598
|
+
guaranteeType: string;
|
|
599
|
+
status: string;
|
|
600
|
+
currency: string | null;
|
|
601
|
+
amountCents: number | null;
|
|
602
|
+
provider: string | null;
|
|
603
|
+
referenceNumber: string | null;
|
|
604
|
+
expiresAt: string | null;
|
|
605
|
+
notes: string | null;
|
|
606
|
+
}[];
|
|
607
|
+
recommendedTarget: {
|
|
608
|
+
targetType: "booking_payment_schedule" | "booking_guarantee" | null;
|
|
609
|
+
targetId: string | null;
|
|
610
|
+
} | null;
|
|
611
|
+
};
|
|
612
|
+
}, readonly ["voyant", "finance", "public-checkout", "booking-payment-options", string, import("./query-keys.js").PublicBookingPaymentOptionsFilters], never> | undefined;
|
|
613
|
+
} & {
|
|
614
|
+
queryKey: readonly ["voyant", "finance", "public-checkout", "booking-payment-options", string, import("./query-keys.js").PublicBookingPaymentOptionsFilters] & {
|
|
615
|
+
[dataTagSymbol]: {
|
|
616
|
+
data: {
|
|
617
|
+
bookingId: string;
|
|
618
|
+
accounts: {
|
|
619
|
+
id: string;
|
|
620
|
+
label: string;
|
|
621
|
+
provider: string | null;
|
|
622
|
+
instrumentType: "credit_card" | "debit_card" | "bank_account" | "wallet" | "voucher" | "direct_bill" | "cash" | "other";
|
|
623
|
+
status: "active" | "inactive" | "expired" | "revoked" | "failed_verification";
|
|
624
|
+
brand: string | null;
|
|
625
|
+
last4: string | null;
|
|
626
|
+
expiryMonth: number | null;
|
|
627
|
+
expiryYear: number | null;
|
|
628
|
+
isDefault: boolean;
|
|
629
|
+
}[];
|
|
630
|
+
schedules: {
|
|
631
|
+
id: string;
|
|
632
|
+
scheduleType: "other" | "deposit" | "installment" | "balance" | "hold";
|
|
633
|
+
status: "pending" | "paid" | "expired" | "due" | "waived" | "cancelled";
|
|
634
|
+
dueDate: string;
|
|
635
|
+
currency: string;
|
|
636
|
+
amountCents: number;
|
|
637
|
+
notes: string | null;
|
|
638
|
+
}[];
|
|
639
|
+
guarantees: {
|
|
640
|
+
id: string;
|
|
641
|
+
bookingPaymentScheduleId: string | null;
|
|
642
|
+
guaranteeType: string;
|
|
643
|
+
status: string;
|
|
644
|
+
currency: string | null;
|
|
645
|
+
amountCents: number | null;
|
|
646
|
+
provider: string | null;
|
|
647
|
+
referenceNumber: string | null;
|
|
648
|
+
expiresAt: string | null;
|
|
649
|
+
notes: string | null;
|
|
650
|
+
}[];
|
|
651
|
+
recommendedTarget: {
|
|
652
|
+
targetType: "booking_payment_schedule" | "booking_guarantee" | null;
|
|
653
|
+
targetId: string | null;
|
|
654
|
+
} | null;
|
|
655
|
+
};
|
|
656
|
+
};
|
|
657
|
+
[dataTagErrorSymbol]: Error;
|
|
658
|
+
};
|
|
659
|
+
};
|
|
660
|
+
export declare function getPublicBookingDocumentsQueryOptions(client: FetchWithValidationOptions, bookingId: string | null | undefined, options?: UsePublicBookingDocumentsOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
|
|
661
|
+
data: {
|
|
662
|
+
bookingId: string;
|
|
663
|
+
documents: {
|
|
664
|
+
invoiceId: string;
|
|
665
|
+
invoiceNumber: string;
|
|
666
|
+
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
667
|
+
invoiceStatus: "draft" | "void" | "sent" | "partially_paid" | "paid" | "overdue";
|
|
668
|
+
currency: string;
|
|
669
|
+
totalCents: number;
|
|
670
|
+
paidCents: number;
|
|
671
|
+
balanceDueCents: number;
|
|
672
|
+
issueDate: string;
|
|
673
|
+
dueDate: string;
|
|
674
|
+
renditionId: string | null;
|
|
675
|
+
documentStatus: "pending" | "failed" | "missing" | "ready" | "stale";
|
|
676
|
+
format: "html" | "pdf" | "xml" | "json" | null;
|
|
677
|
+
language: string | null;
|
|
678
|
+
generatedAt: string | null;
|
|
679
|
+
fileSize: number | null;
|
|
680
|
+
checksum: string | null;
|
|
681
|
+
downloadUrl: string | null;
|
|
682
|
+
}[];
|
|
683
|
+
};
|
|
684
|
+
}, Error, {
|
|
685
|
+
data: {
|
|
686
|
+
bookingId: string;
|
|
687
|
+
documents: {
|
|
688
|
+
invoiceId: string;
|
|
689
|
+
invoiceNumber: string;
|
|
690
|
+
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
691
|
+
invoiceStatus: "draft" | "void" | "sent" | "partially_paid" | "paid" | "overdue";
|
|
692
|
+
currency: string;
|
|
693
|
+
totalCents: number;
|
|
694
|
+
paidCents: number;
|
|
695
|
+
balanceDueCents: number;
|
|
696
|
+
issueDate: string;
|
|
697
|
+
dueDate: string;
|
|
698
|
+
renditionId: string | null;
|
|
699
|
+
documentStatus: "pending" | "failed" | "missing" | "ready" | "stale";
|
|
700
|
+
format: "html" | "pdf" | "xml" | "json" | null;
|
|
701
|
+
language: string | null;
|
|
702
|
+
generatedAt: string | null;
|
|
703
|
+
fileSize: number | null;
|
|
704
|
+
checksum: string | null;
|
|
705
|
+
downloadUrl: string | null;
|
|
706
|
+
}[];
|
|
707
|
+
};
|
|
708
|
+
}, readonly ["voyant", "finance", "public-checkout", "booking-documents", string]>, "queryFn"> & {
|
|
709
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<{
|
|
710
|
+
data: {
|
|
711
|
+
bookingId: string;
|
|
712
|
+
documents: {
|
|
713
|
+
invoiceId: string;
|
|
714
|
+
invoiceNumber: string;
|
|
715
|
+
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
716
|
+
invoiceStatus: "draft" | "void" | "sent" | "partially_paid" | "paid" | "overdue";
|
|
717
|
+
currency: string;
|
|
718
|
+
totalCents: number;
|
|
719
|
+
paidCents: number;
|
|
720
|
+
balanceDueCents: number;
|
|
721
|
+
issueDate: string;
|
|
722
|
+
dueDate: string;
|
|
723
|
+
renditionId: string | null;
|
|
724
|
+
documentStatus: "pending" | "failed" | "missing" | "ready" | "stale";
|
|
725
|
+
format: "html" | "pdf" | "xml" | "json" | null;
|
|
726
|
+
language: string | null;
|
|
727
|
+
generatedAt: string | null;
|
|
728
|
+
fileSize: number | null;
|
|
729
|
+
checksum: string | null;
|
|
730
|
+
downloadUrl: string | null;
|
|
731
|
+
}[];
|
|
732
|
+
};
|
|
733
|
+
}, readonly ["voyant", "finance", "public-checkout", "booking-documents", string], never> | undefined;
|
|
734
|
+
} & {
|
|
735
|
+
queryKey: readonly ["voyant", "finance", "public-checkout", "booking-documents", string] & {
|
|
736
|
+
[dataTagSymbol]: {
|
|
737
|
+
data: {
|
|
738
|
+
bookingId: string;
|
|
739
|
+
documents: {
|
|
740
|
+
invoiceId: string;
|
|
741
|
+
invoiceNumber: string;
|
|
742
|
+
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
743
|
+
invoiceStatus: "draft" | "void" | "sent" | "partially_paid" | "paid" | "overdue";
|
|
744
|
+
currency: string;
|
|
745
|
+
totalCents: number;
|
|
746
|
+
paidCents: number;
|
|
747
|
+
balanceDueCents: number;
|
|
748
|
+
issueDate: string;
|
|
749
|
+
dueDate: string;
|
|
750
|
+
renditionId: string | null;
|
|
751
|
+
documentStatus: "pending" | "failed" | "missing" | "ready" | "stale";
|
|
752
|
+
format: "html" | "pdf" | "xml" | "json" | null;
|
|
753
|
+
language: string | null;
|
|
754
|
+
generatedAt: string | null;
|
|
755
|
+
fileSize: number | null;
|
|
756
|
+
checksum: string | null;
|
|
757
|
+
downloadUrl: string | null;
|
|
758
|
+
}[];
|
|
759
|
+
};
|
|
760
|
+
};
|
|
761
|
+
[dataTagErrorSymbol]: Error;
|
|
762
|
+
};
|
|
763
|
+
};
|
|
764
|
+
export declare function getPublicPaymentSessionQueryOptions(client: FetchWithValidationOptions, sessionId: string | null | undefined, options?: UsePublicPaymentSessionOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
|
|
765
|
+
data: {
|
|
766
|
+
id: string;
|
|
767
|
+
targetType: "invoice" | "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order";
|
|
768
|
+
targetId: string | null;
|
|
769
|
+
bookingId: string | null;
|
|
770
|
+
invoiceId: string | null;
|
|
771
|
+
bookingPaymentScheduleId: string | null;
|
|
772
|
+
bookingGuaranteeId: string | null;
|
|
773
|
+
status: "pending" | "failed" | "paid" | "expired" | "cancelled" | "requires_redirect" | "processing" | "authorized";
|
|
774
|
+
provider: string | null;
|
|
775
|
+
providerSessionId: string | null;
|
|
776
|
+
providerPaymentId: string | null;
|
|
777
|
+
externalReference: string | null;
|
|
778
|
+
clientReference: string | null;
|
|
779
|
+
currency: string;
|
|
780
|
+
amountCents: number;
|
|
781
|
+
paymentMethod: "credit_card" | "debit_card" | "wallet" | "voucher" | "direct_bill" | "cash" | "other" | "bank_transfer" | "cheque" | null;
|
|
782
|
+
payerEmail: string | null;
|
|
783
|
+
payerName: string | null;
|
|
784
|
+
redirectUrl: string | null;
|
|
785
|
+
returnUrl: string | null;
|
|
786
|
+
cancelUrl: string | null;
|
|
787
|
+
expiresAt: string | null;
|
|
788
|
+
completedAt: string | null;
|
|
789
|
+
failureCode: string | null;
|
|
790
|
+
failureMessage: string | null;
|
|
791
|
+
};
|
|
792
|
+
}, Error, {
|
|
793
|
+
data: {
|
|
794
|
+
id: string;
|
|
795
|
+
targetType: "invoice" | "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order";
|
|
796
|
+
targetId: string | null;
|
|
797
|
+
bookingId: string | null;
|
|
798
|
+
invoiceId: string | null;
|
|
799
|
+
bookingPaymentScheduleId: string | null;
|
|
800
|
+
bookingGuaranteeId: string | null;
|
|
801
|
+
status: "pending" | "failed" | "paid" | "expired" | "cancelled" | "requires_redirect" | "processing" | "authorized";
|
|
802
|
+
provider: string | null;
|
|
803
|
+
providerSessionId: string | null;
|
|
804
|
+
providerPaymentId: string | null;
|
|
805
|
+
externalReference: string | null;
|
|
806
|
+
clientReference: string | null;
|
|
807
|
+
currency: string;
|
|
808
|
+
amountCents: number;
|
|
809
|
+
paymentMethod: "credit_card" | "debit_card" | "wallet" | "voucher" | "direct_bill" | "cash" | "other" | "bank_transfer" | "cheque" | null;
|
|
810
|
+
payerEmail: string | null;
|
|
811
|
+
payerName: string | null;
|
|
812
|
+
redirectUrl: string | null;
|
|
813
|
+
returnUrl: string | null;
|
|
814
|
+
cancelUrl: string | null;
|
|
815
|
+
expiresAt: string | null;
|
|
816
|
+
completedAt: string | null;
|
|
817
|
+
failureCode: string | null;
|
|
818
|
+
failureMessage: string | null;
|
|
819
|
+
};
|
|
820
|
+
}, readonly ["voyant", "finance", "public-checkout", "payment-session", string]>, "queryFn"> & {
|
|
821
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<{
|
|
822
|
+
data: {
|
|
823
|
+
id: string;
|
|
824
|
+
targetType: "invoice" | "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order";
|
|
825
|
+
targetId: string | null;
|
|
826
|
+
bookingId: string | null;
|
|
827
|
+
invoiceId: string | null;
|
|
828
|
+
bookingPaymentScheduleId: string | null;
|
|
829
|
+
bookingGuaranteeId: string | null;
|
|
830
|
+
status: "pending" | "failed" | "paid" | "expired" | "cancelled" | "requires_redirect" | "processing" | "authorized";
|
|
831
|
+
provider: string | null;
|
|
832
|
+
providerSessionId: string | null;
|
|
833
|
+
providerPaymentId: string | null;
|
|
834
|
+
externalReference: string | null;
|
|
835
|
+
clientReference: string | null;
|
|
836
|
+
currency: string;
|
|
837
|
+
amountCents: number;
|
|
838
|
+
paymentMethod: "credit_card" | "debit_card" | "wallet" | "voucher" | "direct_bill" | "cash" | "other" | "bank_transfer" | "cheque" | null;
|
|
839
|
+
payerEmail: string | null;
|
|
840
|
+
payerName: string | null;
|
|
841
|
+
redirectUrl: string | null;
|
|
842
|
+
returnUrl: string | null;
|
|
843
|
+
cancelUrl: string | null;
|
|
844
|
+
expiresAt: string | null;
|
|
845
|
+
completedAt: string | null;
|
|
846
|
+
failureCode: string | null;
|
|
847
|
+
failureMessage: string | null;
|
|
848
|
+
};
|
|
849
|
+
}, readonly ["voyant", "finance", "public-checkout", "payment-session", string], never> | undefined;
|
|
850
|
+
} & {
|
|
851
|
+
queryKey: readonly ["voyant", "finance", "public-checkout", "payment-session", string] & {
|
|
852
|
+
[dataTagSymbol]: {
|
|
853
|
+
data: {
|
|
854
|
+
id: string;
|
|
855
|
+
targetType: "invoice" | "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order";
|
|
856
|
+
targetId: string | null;
|
|
857
|
+
bookingId: string | null;
|
|
858
|
+
invoiceId: string | null;
|
|
859
|
+
bookingPaymentScheduleId: string | null;
|
|
860
|
+
bookingGuaranteeId: string | null;
|
|
861
|
+
status: "pending" | "failed" | "paid" | "expired" | "cancelled" | "requires_redirect" | "processing" | "authorized";
|
|
862
|
+
provider: string | null;
|
|
863
|
+
providerSessionId: string | null;
|
|
864
|
+
providerPaymentId: string | null;
|
|
865
|
+
externalReference: string | null;
|
|
866
|
+
clientReference: string | null;
|
|
867
|
+
currency: string;
|
|
868
|
+
amountCents: number;
|
|
869
|
+
paymentMethod: "credit_card" | "debit_card" | "wallet" | "voucher" | "direct_bill" | "cash" | "other" | "bank_transfer" | "cheque" | null;
|
|
870
|
+
payerEmail: string | null;
|
|
871
|
+
payerName: string | null;
|
|
872
|
+
redirectUrl: string | null;
|
|
873
|
+
returnUrl: string | null;
|
|
874
|
+
cancelUrl: string | null;
|
|
875
|
+
expiresAt: string | null;
|
|
876
|
+
completedAt: string | null;
|
|
877
|
+
failureCode: string | null;
|
|
878
|
+
failureMessage: string | null;
|
|
879
|
+
};
|
|
880
|
+
};
|
|
881
|
+
[dataTagErrorSymbol]: Error;
|
|
882
|
+
};
|
|
883
|
+
};
|
|
485
884
|
//# sourceMappingURL=query-options.d.ts.map
|