@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/hooks/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAA;AAC3C,cAAc,oCAAoC,CAAA;AAClD,cAAc,kBAAkB,CAAA;AAChC,cAAc,uCAAuC,CAAA;AACrD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,qCAAqC,CAAA;AACnD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wBAAwB,CAAA;AACtC,cAAc,mCAAmC,CAAA;AACjD,cAAc,2BAA2B,CAAA;AACzC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mCAAmC,CAAA;AACjD,cAAc,yCAAyC,CAAA;AACvD,cAAc,kCAAkC,CAAA;AAChD,cAAc,+CAA+C,CAAA;AAC7D,cAAc,iCAAiC,CAAA;AAC/C,cAAc,0CAA0C,CAAA;AACxD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,oCAAoC,CAAA;AAClD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kBAAkB,CAAA;AAChC,cAAc,2BAA2B,CAAA;AACzC,cAAc,mBAAmB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA;AAC/C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,oCAAoC,CAAA;AAClD,cAAc,kBAAkB,CAAA;AAChC,cAAc,uCAAuC,CAAA;AACrD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,qCAAqC,CAAA;AACnD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wBAAwB,CAAA;AACtC,cAAc,mCAAmC,CAAA;AACjD,cAAc,2BAA2B,CAAA;AACzC,cAAc,mBAAmB,CAAA;AACjC,cAAc,mCAAmC,CAAA;AACjD,cAAc,yCAAyC,CAAA;AACvD,cAAc,kCAAkC,CAAA;AAChD,cAAc,+CAA+C,CAAA;AAC7D,cAAc,iCAAiC,CAAA;AAC/C,cAAc,0CAA0C,CAAA;AACxD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,oCAAoC,CAAA;AAClD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kBAAkB,CAAA;AAChC,cAAc,2BAA2B,CAAA;AACzC,cAAc,mBAAmB,CAAA"}
|
package/dist/hooks/index.js
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface UseAdminBookingPaymentsOptions {
|
|
2
|
+
enabled?: boolean;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Admin variant of `usePublicBookingPayments`. Same response shape;
|
|
6
|
+
* targets the admin endpoint so a staff session is authorized to
|
|
7
|
+
* read. Use this from the operator dashboard's booking detail page;
|
|
8
|
+
* the customer-portal stays on the public hook.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useAdminBookingPayments(bookingId: string | null | undefined, options?: UseAdminBookingPaymentsOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
11
|
+
data: {
|
|
12
|
+
bookingId: string;
|
|
13
|
+
payments: {
|
|
14
|
+
id: string;
|
|
15
|
+
invoiceId: string;
|
|
16
|
+
invoiceNumber: string;
|
|
17
|
+
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
18
|
+
status: "pending" | "failed" | "completed" | "refunded";
|
|
19
|
+
paymentMethod: "other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill";
|
|
20
|
+
amountCents: number;
|
|
21
|
+
currency: string;
|
|
22
|
+
paymentDate: string;
|
|
23
|
+
referenceNumber: string | null;
|
|
24
|
+
notes: string | null;
|
|
25
|
+
}[];
|
|
26
|
+
};
|
|
27
|
+
}, Error>;
|
|
28
|
+
//# sourceMappingURL=use-admin-booking-payments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-admin-booking-payments.d.ts","sourceRoot":"","sources":["../../src/hooks/use-admin-booking-payments.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,8BAA8B;IAC7C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,8BAAmC;;;;;;;;;;;;;;;;;UAS7C"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { useVoyantFinanceContext } from "../provider.js";
|
|
4
|
+
import { getAdminBookingPaymentsQueryOptions } from "../query-options.js";
|
|
5
|
+
/**
|
|
6
|
+
* Admin variant of `usePublicBookingPayments`. Same response shape;
|
|
7
|
+
* targets the admin endpoint so a staff session is authorized to
|
|
8
|
+
* read. Use this from the operator dashboard's booking detail page;
|
|
9
|
+
* the customer-portal stays on the public hook.
|
|
10
|
+
*/
|
|
11
|
+
export function useAdminBookingPayments(bookingId, options = {}) {
|
|
12
|
+
const { baseUrl, fetcher } = useVoyantFinanceContext();
|
|
13
|
+
const { enabled = true } = options;
|
|
14
|
+
return useQuery({
|
|
15
|
+
...getAdminBookingPaymentsQueryOptions({ baseUrl, fetcher }, bookingId),
|
|
16
|
+
enabled: enabled && Boolean(bookingId),
|
|
17
|
+
});
|
|
18
|
+
}
|
|
@@ -8,7 +8,7 @@ export declare function useBookingGuarantees(bookingId: string | null | undefine
|
|
|
8
8
|
bookingPaymentScheduleId: string | null;
|
|
9
9
|
bookingItemId: string | null;
|
|
10
10
|
guaranteeType: "other" | "voucher" | "bank_transfer" | "credit_card" | "deposit" | "preauth" | "card_on_file" | "agency_letter";
|
|
11
|
-
status: "pending" | "active" | "
|
|
11
|
+
status: "pending" | "active" | "failed" | "expired" | "cancelled" | "released";
|
|
12
12
|
currency: string | null;
|
|
13
13
|
amountCents: number | null;
|
|
14
14
|
provider: string | null;
|
|
@@ -42,7 +42,7 @@ export declare function useBookingGuaranteeMutation(bookingId: string): {
|
|
|
42
42
|
bookingPaymentScheduleId: string | null;
|
|
43
43
|
bookingItemId: string | null;
|
|
44
44
|
guaranteeType: "other" | "voucher" | "bank_transfer" | "credit_card" | "deposit" | "preauth" | "card_on_file" | "agency_letter";
|
|
45
|
-
status: "pending" | "active" | "
|
|
45
|
+
status: "pending" | "active" | "failed" | "expired" | "cancelled" | "released";
|
|
46
46
|
currency: string | null;
|
|
47
47
|
amountCents: number | null;
|
|
48
48
|
provider: string | null;
|
|
@@ -60,7 +60,7 @@ export declare function useBookingGuaranteeMutation(bookingId: string): {
|
|
|
60
60
|
bookingPaymentScheduleId: string | null;
|
|
61
61
|
bookingItemId: string | null;
|
|
62
62
|
guaranteeType: "other" | "voucher" | "bank_transfer" | "credit_card" | "deposit" | "preauth" | "card_on_file" | "agency_letter";
|
|
63
|
-
status: "pending" | "active" | "
|
|
63
|
+
status: "pending" | "active" | "failed" | "expired" | "cancelled" | "released";
|
|
64
64
|
currency: string | null;
|
|
65
65
|
amountCents: number | null;
|
|
66
66
|
provider: string | null;
|
|
@@ -18,6 +18,7 @@ export interface CreateInvoiceInput {
|
|
|
18
18
|
export type UpdateInvoiceInput = Partial<CreateInvoiceInput>;
|
|
19
19
|
export declare function useInvoiceMutation(): {
|
|
20
20
|
create: import("@tanstack/react-query").UseMutationResult<{
|
|
21
|
+
[x: string]: unknown;
|
|
21
22
|
id: string;
|
|
22
23
|
invoiceNumber: string;
|
|
23
24
|
bookingId: string;
|
|
@@ -35,8 +36,10 @@ export declare function useInvoiceMutation(): {
|
|
|
35
36
|
notes: string | null;
|
|
36
37
|
createdAt: string;
|
|
37
38
|
updatedAt: string;
|
|
39
|
+
invoiceType?: "invoice" | "proforma" | "credit_note" | undefined;
|
|
38
40
|
}, Error, CreateInvoiceInput, unknown>;
|
|
39
41
|
update: import("@tanstack/react-query").UseMutationResult<{
|
|
42
|
+
[x: string]: unknown;
|
|
40
43
|
id: string;
|
|
41
44
|
invoiceNumber: string;
|
|
42
45
|
bookingId: string;
|
|
@@ -54,6 +57,7 @@ export declare function useInvoiceMutation(): {
|
|
|
54
57
|
notes: string | null;
|
|
55
58
|
createdAt: string;
|
|
56
59
|
updatedAt: string;
|
|
60
|
+
invoiceType?: "invoice" | "proforma" | "credit_note" | undefined;
|
|
57
61
|
}, Error, {
|
|
58
62
|
id: string;
|
|
59
63
|
input: UpdateInvoiceInput;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-invoice-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-invoice-mutation.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,aAAa,EAA0C,MAAM,eAAe,CAAA;AAE1F,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,MAAM,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAA;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB;AAED,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;AAE5D,wBAAgB,kBAAkB
|
|
1
|
+
{"version":3,"file":"use-invoice-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-invoice-mutation.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,aAAa,EAA0C,MAAM,eAAe,CAAA;AAE1F,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,MAAM,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAA;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB;AAED,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;AAE5D,wBAAgB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAqBU,MAAM;eAAS,kBAAkB;;;;;EAoC5E"}
|
|
@@ -13,7 +13,7 @@ export declare function useInvoicePaymentMutation(invoiceId: string): import("@t
|
|
|
13
13
|
amountCents: number;
|
|
14
14
|
currency: string;
|
|
15
15
|
paymentMethod: string;
|
|
16
|
-
status: "pending" | "
|
|
16
|
+
status: "pending" | "failed" | "completed" | "refunded";
|
|
17
17
|
referenceNumber: string | null;
|
|
18
18
|
paymentDate: string;
|
|
19
19
|
notes: string | null;
|
|
@@ -8,7 +8,7 @@ export declare function useInvoicePayments(invoiceId: string | null | undefined,
|
|
|
8
8
|
amountCents: number;
|
|
9
9
|
currency: string;
|
|
10
10
|
paymentMethod: string;
|
|
11
|
-
status: "pending" | "
|
|
11
|
+
status: "pending" | "failed" | "completed" | "refunded";
|
|
12
12
|
referenceNumber: string | null;
|
|
13
13
|
paymentDate: string;
|
|
14
14
|
notes: string | null;
|
|
@@ -3,6 +3,7 @@ export interface UseInvoiceOptions {
|
|
|
3
3
|
}
|
|
4
4
|
export declare function useInvoice(id: string | null | undefined, options?: UseInvoiceOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
5
|
data: {
|
|
6
|
+
[x: string]: unknown;
|
|
6
7
|
id: string;
|
|
7
8
|
invoiceNumber: string;
|
|
8
9
|
bookingId: string;
|
|
@@ -20,6 +21,7 @@ export declare function useInvoice(id: string | null | undefined, options?: UseI
|
|
|
20
21
|
notes: string | null;
|
|
21
22
|
createdAt: string;
|
|
22
23
|
updatedAt: string;
|
|
24
|
+
invoiceType?: "invoice" | "proforma" | "credit_note" | undefined;
|
|
23
25
|
};
|
|
24
26
|
}, Error>;
|
|
25
27
|
//# sourceMappingURL=use-invoice.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-invoice.d.ts","sourceRoot":"","sources":["../../src/hooks/use-invoice.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,OAAO,GAAE,iBAAsB
|
|
1
|
+
{"version":3,"file":"use-invoice.d.ts","sourceRoot":"","sources":["../../src/hooks/use-invoice.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,OAAO,GAAE,iBAAsB;;;;;;;;;;;;;;;;;;;;;;UAQxF"}
|
|
@@ -4,6 +4,7 @@ export interface UseInvoicesOptions extends FinanceInvoiceListFilters {
|
|
|
4
4
|
}
|
|
5
5
|
export declare function useInvoices(options?: UseInvoicesOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
6
6
|
data: {
|
|
7
|
+
[x: string]: unknown;
|
|
7
8
|
id: string;
|
|
8
9
|
invoiceNumber: string;
|
|
9
10
|
bookingId: string;
|
|
@@ -21,6 +22,7 @@ export declare function useInvoices(options?: UseInvoicesOptions): import("@tans
|
|
|
21
22
|
notes: string | null;
|
|
22
23
|
createdAt: string;
|
|
23
24
|
updatedAt: string;
|
|
25
|
+
invoiceType?: "invoice" | "proforma" | "credit_note" | undefined;
|
|
24
26
|
}[];
|
|
25
27
|
total: number;
|
|
26
28
|
limit: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-invoices.d.ts","sourceRoot":"","sources":["../../src/hooks/use-invoices.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAA;AAGjE,MAAM,WAAW,kBAAmB,SAAQ,yBAAyB;IACnE,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,WAAW,CAAC,OAAO,GAAE,kBAAuB
|
|
1
|
+
{"version":3,"file":"use-invoices.d.ts","sourceRoot":"","sources":["../../src/hooks/use-invoices.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAA;AAGjE,MAAM,WAAW,kBAAmB,SAAQ,yBAAyB;IACnE,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,WAAW,CAAC,OAAO,GAAE,kBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;UAQ3D"}
|
|
@@ -9,7 +9,7 @@ export declare function usePublicBookingPayments(bookingId: string | null | unde
|
|
|
9
9
|
invoiceId: string;
|
|
10
10
|
invoiceNumber: string;
|
|
11
11
|
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
12
|
-
status: "pending" | "
|
|
12
|
+
status: "pending" | "failed" | "completed" | "refunded";
|
|
13
13
|
paymentMethod: "other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill";
|
|
14
14
|
amountCents: number;
|
|
15
15
|
currency: string;
|
|
@@ -13,13 +13,13 @@ export type StartPublicPaymentSessionTarget = {
|
|
|
13
13
|
export declare function usePublicPaymentSessionMutation(): import("@tanstack/react-query").UseMutationResult<{
|
|
14
14
|
data: {
|
|
15
15
|
id: string;
|
|
16
|
-
targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
|
|
16
|
+
targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "flight_order";
|
|
17
17
|
targetId: string | null;
|
|
18
18
|
bookingId: string | null;
|
|
19
19
|
invoiceId: string | null;
|
|
20
20
|
bookingPaymentScheduleId: string | null;
|
|
21
21
|
bookingGuaranteeId: string | null;
|
|
22
|
-
status: "pending" | "
|
|
22
|
+
status: "pending" | "failed" | "expired" | "cancelled" | "paid" | "requires_redirect" | "processing" | "authorized";
|
|
23
23
|
provider: string | null;
|
|
24
24
|
providerSessionId: string | null;
|
|
25
25
|
providerPaymentId: string | null;
|
|
@@ -37,6 +37,7 @@ export declare function usePublicPaymentSessionMutation(): import("@tanstack/rea
|
|
|
37
37
|
completedAt: string | null;
|
|
38
38
|
failureCode: string | null;
|
|
39
39
|
failureMessage: string | null;
|
|
40
|
+
notes: string | null;
|
|
40
41
|
};
|
|
41
42
|
}, Error, StartPublicPaymentSessionTarget, unknown>;
|
|
42
43
|
//# sourceMappingURL=use-public-payment-session-mutation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-public-payment-session-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-public-payment-session-mutation.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,eAAe,CAAA;AAEnE,MAAM,MAAM,+BAA+B,GACvC;IACE,UAAU,EAAE,0BAA0B,CAAA;IACtC,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,8BAA8B,CAAA;CACtC,GACD;IACE,UAAU,EAAE,mBAAmB,CAAA;IAC/B,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,8BAA8B,CAAA;CACtC,CAAA;AAEL,wBAAgB,+BAA+B
|
|
1
|
+
{"version":3,"file":"use-public-payment-session-mutation.d.ts","sourceRoot":"","sources":["../../src/hooks/use-public-payment-session-mutation.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,eAAe,CAAA;AAEnE,MAAM,MAAM,+BAA+B,GACvC;IACE,UAAU,EAAE,0BAA0B,CAAA;IACtC,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,8BAA8B,CAAA;CACtC,GACD;IACE,UAAU,EAAE,mBAAmB,CAAA;IAC/B,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,8BAA8B,CAAA;CACtC,CAAA;AAEL,wBAAgB,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDAsC9C"}
|
|
@@ -4,13 +4,13 @@ export interface UsePublicPaymentSessionOptions {
|
|
|
4
4
|
export declare function usePublicPaymentSession(sessionId: string | null | undefined, options?: UsePublicPaymentSessionOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
5
|
data: {
|
|
6
6
|
id: string;
|
|
7
|
-
targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
|
|
7
|
+
targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "flight_order";
|
|
8
8
|
targetId: string | null;
|
|
9
9
|
bookingId: string | null;
|
|
10
10
|
invoiceId: string | null;
|
|
11
11
|
bookingPaymentScheduleId: string | null;
|
|
12
12
|
bookingGuaranteeId: string | null;
|
|
13
|
-
status: "pending" | "
|
|
13
|
+
status: "pending" | "failed" | "expired" | "cancelled" | "paid" | "requires_redirect" | "processing" | "authorized";
|
|
14
14
|
provider: string | null;
|
|
15
15
|
providerSessionId: string | null;
|
|
16
16
|
providerPaymentId: string | null;
|
|
@@ -28,6 +28,7 @@ export declare function usePublicPaymentSession(sessionId: string | null | undef
|
|
|
28
28
|
completedAt: string | null;
|
|
29
29
|
failureCode: string | null;
|
|
30
30
|
failureMessage: string | null;
|
|
31
|
+
notes: string | null;
|
|
31
32
|
};
|
|
32
33
|
}, Error>;
|
|
33
34
|
//# sourceMappingURL=use-public-payment-session.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-public-payment-session.d.ts","sourceRoot":"","sources":["../../src/hooks/use-public-payment-session.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,8BAA8B;IAC7C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,8BAAmC
|
|
1
|
+
{"version":3,"file":"use-public-payment-session.d.ts","sourceRoot":"","sources":["../../src/hooks/use-public-payment-session.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,8BAA8B;IAC7C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,8BAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAS7C"}
|
|
@@ -18,7 +18,7 @@ export declare function useSupplierPaymentMutation(): {
|
|
|
18
18
|
amountCents: number;
|
|
19
19
|
currency: string;
|
|
20
20
|
paymentMethod: string;
|
|
21
|
-
status: "pending" | "
|
|
21
|
+
status: "pending" | "failed" | "completed" | "refunded";
|
|
22
22
|
referenceNumber: string | null;
|
|
23
23
|
paymentDate: string;
|
|
24
24
|
createdAt: string;
|
|
@@ -31,7 +31,7 @@ export declare function useSupplierPaymentMutation(): {
|
|
|
31
31
|
amountCents: number;
|
|
32
32
|
currency: string;
|
|
33
33
|
paymentMethod: string;
|
|
34
|
-
status: "pending" | "
|
|
34
|
+
status: "pending" | "failed" | "completed" | "refunded";
|
|
35
35
|
referenceNumber: string | null;
|
|
36
36
|
paymentDate: string;
|
|
37
37
|
createdAt: string;
|
|
@@ -10,7 +10,7 @@ export declare function useSupplierPayments(options?: UseSupplierPaymentsOptions
|
|
|
10
10
|
amountCents: number;
|
|
11
11
|
currency: string;
|
|
12
12
|
paymentMethod: string;
|
|
13
|
-
status: "pending" | "
|
|
13
|
+
status: "pending" | "failed" | "completed" | "refunded";
|
|
14
14
|
referenceNumber: string | null;
|
|
15
15
|
paymentDate: string;
|
|
16
16
|
createdAt: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { defaultFetcher, fetchWithValidation, VoyantApiError, type VoyantFetcher, withQueryParams, } from "./client.js";
|
|
2
2
|
export * from "./hooks/index.js";
|
|
3
|
-
export { getPublicBookingDocuments, getPublicBookingPaymentOptions, getPublicBookingPayments, getPublicFinanceDocumentByReference, getPublicPaymentSession, startPublicBookingGuaranteePaymentSession, startPublicBookingSchedulePaymentSession, validatePublicVoucher, } from "./operations.js";
|
|
3
|
+
export { getAdminBookingPayments, getPublicBookingDocuments, getPublicBookingPaymentOptions, getPublicBookingPayments, getPublicFinanceDocumentByReference, getPublicPaymentSession, startPublicBookingGuaranteePaymentSession, startPublicBookingSchedulePaymentSession, validatePublicVoucher, } from "./operations.js";
|
|
4
4
|
export { useVoyantFinanceContext, type VoyantFinanceContextValue, VoyantFinanceProvider, type VoyantFinanceProviderProps, } from "./provider.js";
|
|
5
5
|
export { financeQueryKeys } from "./query-keys.js";
|
|
6
|
-
export { getBookingGuaranteesQueryOptions, getBookingPaymentSchedulesQueryOptions, getInvoiceCreditNotesQueryOptions, getInvoiceLineItemsQueryOptions, getInvoiceNotesQueryOptions, getInvoicePaymentsQueryOptions, getInvoiceQueryOptions, getInvoicesQueryOptions, getPublicBookingDocumentsQueryOptions, getPublicBookingPaymentOptionsQueryOptions, getPublicBookingPaymentsQueryOptions, getPublicFinanceDocumentByReferenceQueryOptions, getPublicPaymentSessionQueryOptions, getSupplierPaymentsQueryOptions, getVoucherQueryOptions, getVouchersQueryOptions, } from "./query-options.js";
|
|
6
|
+
export { getAdminBookingPaymentsQueryOptions, getBookingGuaranteesQueryOptions, getBookingPaymentSchedulesQueryOptions, getInvoiceCreditNotesQueryOptions, getInvoiceLineItemsQueryOptions, getInvoiceNotesQueryOptions, getInvoicePaymentsQueryOptions, getInvoiceQueryOptions, getInvoicesQueryOptions, getPublicBookingDocumentsQueryOptions, getPublicBookingPaymentOptionsQueryOptions, getPublicBookingPaymentsQueryOptions, getPublicFinanceDocumentByReferenceQueryOptions, getPublicPaymentSessionQueryOptions, getSupplierPaymentsQueryOptions, getVoucherQueryOptions, getVouchersQueryOptions, } from "./query-options.js";
|
|
7
7
|
export * from "./schemas.js";
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,KAAK,aAAa,EAClB,eAAe,GAChB,MAAM,aAAa,CAAA;AACpB,cAAc,kBAAkB,CAAA;AAChC,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC9B,wBAAwB,EACxB,mCAAmC,EACnC,uBAAuB,EACvB,yCAAyC,EACzC,wCAAwC,EACxC,qBAAqB,GACtB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,uBAAuB,EACvB,KAAK,yBAAyB,EAC9B,qBAAqB,EACrB,KAAK,0BAA0B,GAChC,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EACL,gCAAgC,EAChC,sCAAsC,EACtC,iCAAiC,EACjC,+BAA+B,EAC/B,2BAA2B,EAC3B,8BAA8B,EAC9B,sBAAsB,EACtB,uBAAuB,EACvB,qCAAqC,EACrC,0CAA0C,EAC1C,oCAAoC,EACpC,+CAA+C,EAC/C,mCAAmC,EACnC,+BAA+B,EAC/B,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,oBAAoB,CAAA;AAC3B,cAAc,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,KAAK,aAAa,EAClB,eAAe,GAChB,MAAM,aAAa,CAAA;AACpB,cAAc,kBAAkB,CAAA;AAChC,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,8BAA8B,EAC9B,wBAAwB,EACxB,mCAAmC,EACnC,uBAAuB,EACvB,yCAAyC,EACzC,wCAAwC,EACxC,qBAAqB,GACtB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,uBAAuB,EACvB,KAAK,yBAAyB,EAC9B,qBAAqB,EACrB,KAAK,0BAA0B,GAChC,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClD,OAAO,EACL,mCAAmC,EACnC,gCAAgC,EAChC,sCAAsC,EACtC,iCAAiC,EACjC,+BAA+B,EAC/B,2BAA2B,EAC3B,8BAA8B,EAC9B,sBAAsB,EACtB,uBAAuB,EACvB,qCAAqC,EACrC,0CAA0C,EAC1C,oCAAoC,EACpC,+CAA+C,EAC/C,mCAAmC,EACnC,+BAA+B,EAC/B,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,oBAAoB,CAAA;AAC3B,cAAc,cAAc,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { defaultFetcher, fetchWithValidation, VoyantApiError, withQueryParams, } from "./client.js";
|
|
2
2
|
export * from "./hooks/index.js";
|
|
3
|
-
export { getPublicBookingDocuments, getPublicBookingPaymentOptions, getPublicBookingPayments, getPublicFinanceDocumentByReference, getPublicPaymentSession, startPublicBookingGuaranteePaymentSession, startPublicBookingSchedulePaymentSession, validatePublicVoucher, } from "./operations.js";
|
|
3
|
+
export { getAdminBookingPayments, getPublicBookingDocuments, getPublicBookingPaymentOptions, getPublicBookingPayments, getPublicFinanceDocumentByReference, getPublicPaymentSession, startPublicBookingGuaranteePaymentSession, startPublicBookingSchedulePaymentSession, validatePublicVoucher, } from "./operations.js";
|
|
4
4
|
export { useVoyantFinanceContext, VoyantFinanceProvider, } from "./provider.js";
|
|
5
5
|
export { financeQueryKeys } from "./query-keys.js";
|
|
6
|
-
export { getBookingGuaranteesQueryOptions, getBookingPaymentSchedulesQueryOptions, getInvoiceCreditNotesQueryOptions, getInvoiceLineItemsQueryOptions, getInvoiceNotesQueryOptions, getInvoicePaymentsQueryOptions, getInvoiceQueryOptions, getInvoicesQueryOptions, getPublicBookingDocumentsQueryOptions, getPublicBookingPaymentOptionsQueryOptions, getPublicBookingPaymentsQueryOptions, getPublicFinanceDocumentByReferenceQueryOptions, getPublicPaymentSessionQueryOptions, getSupplierPaymentsQueryOptions, getVoucherQueryOptions, getVouchersQueryOptions, } from "./query-options.js";
|
|
6
|
+
export { getAdminBookingPaymentsQueryOptions, getBookingGuaranteesQueryOptions, getBookingPaymentSchedulesQueryOptions, getInvoiceCreditNotesQueryOptions, getInvoiceLineItemsQueryOptions, getInvoiceNotesQueryOptions, getInvoicePaymentsQueryOptions, getInvoiceQueryOptions, getInvoicesQueryOptions, getPublicBookingDocumentsQueryOptions, getPublicBookingPaymentOptionsQueryOptions, getPublicBookingPaymentsQueryOptions, getPublicFinanceDocumentByReferenceQueryOptions, getPublicPaymentSessionQueryOptions, getSupplierPaymentsQueryOptions, getVoucherQueryOptions, getVouchersQueryOptions, } from "./query-options.js";
|
|
7
7
|
export * from "./schemas.js";
|
package/dist/operations.d.ts
CHANGED
|
@@ -56,7 +56,31 @@ export declare function getPublicBookingPayments(client: FetchWithValidationOpti
|
|
|
56
56
|
invoiceId: string;
|
|
57
57
|
invoiceNumber: string;
|
|
58
58
|
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
59
|
-
status: "pending" | "
|
|
59
|
+
status: "pending" | "failed" | "completed" | "refunded";
|
|
60
|
+
paymentMethod: "other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill";
|
|
61
|
+
amountCents: number;
|
|
62
|
+
currency: string;
|
|
63
|
+
paymentDate: string;
|
|
64
|
+
referenceNumber: string | null;
|
|
65
|
+
notes: string | null;
|
|
66
|
+
}[];
|
|
67
|
+
};
|
|
68
|
+
}>;
|
|
69
|
+
/**
|
|
70
|
+
* Admin variant — same response shape as `getPublicBookingPayments`,
|
|
71
|
+
* but hits the admin endpoint (`/v1/admin/finance/bookings/:id/payments`)
|
|
72
|
+
* so a staff actor can read it. The customer-portal continues to use
|
|
73
|
+
* the public path; the operator dashboard uses this one.
|
|
74
|
+
*/
|
|
75
|
+
export declare function getAdminBookingPayments(client: FetchWithValidationOptions, bookingId: string): Promise<{
|
|
76
|
+
data: {
|
|
77
|
+
bookingId: string;
|
|
78
|
+
payments: {
|
|
79
|
+
id: string;
|
|
80
|
+
invoiceId: string;
|
|
81
|
+
invoiceNumber: string;
|
|
82
|
+
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
83
|
+
status: "pending" | "failed" | "completed" | "refunded";
|
|
60
84
|
paymentMethod: "other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill";
|
|
61
85
|
amountCents: number;
|
|
62
86
|
currency: string;
|
|
@@ -117,13 +141,13 @@ export declare function getPublicBookingPaymentOptions(client: FetchWithValidati
|
|
|
117
141
|
export declare function getPublicPaymentSession(client: FetchWithValidationOptions, sessionId: string): Promise<{
|
|
118
142
|
data: {
|
|
119
143
|
id: string;
|
|
120
|
-
targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
|
|
144
|
+
targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "flight_order";
|
|
121
145
|
targetId: string | null;
|
|
122
146
|
bookingId: string | null;
|
|
123
147
|
invoiceId: string | null;
|
|
124
148
|
bookingPaymentScheduleId: string | null;
|
|
125
149
|
bookingGuaranteeId: string | null;
|
|
126
|
-
status: "pending" | "
|
|
150
|
+
status: "pending" | "failed" | "expired" | "cancelled" | "paid" | "requires_redirect" | "processing" | "authorized";
|
|
127
151
|
provider: string | null;
|
|
128
152
|
providerSessionId: string | null;
|
|
129
153
|
providerPaymentId: string | null;
|
|
@@ -141,18 +165,19 @@ export declare function getPublicPaymentSession(client: FetchWithValidationOptio
|
|
|
141
165
|
completedAt: string | null;
|
|
142
166
|
failureCode: string | null;
|
|
143
167
|
failureMessage: string | null;
|
|
168
|
+
notes: string | null;
|
|
144
169
|
};
|
|
145
170
|
}>;
|
|
146
171
|
export declare function startPublicBookingSchedulePaymentSession(client: FetchWithValidationOptions, bookingId: string, scheduleId: string, input: PublicStartPaymentSessionInput): Promise<{
|
|
147
172
|
data: {
|
|
148
173
|
id: string;
|
|
149
|
-
targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
|
|
174
|
+
targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "flight_order";
|
|
150
175
|
targetId: string | null;
|
|
151
176
|
bookingId: string | null;
|
|
152
177
|
invoiceId: string | null;
|
|
153
178
|
bookingPaymentScheduleId: string | null;
|
|
154
179
|
bookingGuaranteeId: string | null;
|
|
155
|
-
status: "pending" | "
|
|
180
|
+
status: "pending" | "failed" | "expired" | "cancelled" | "paid" | "requires_redirect" | "processing" | "authorized";
|
|
156
181
|
provider: string | null;
|
|
157
182
|
providerSessionId: string | null;
|
|
158
183
|
providerPaymentId: string | null;
|
|
@@ -170,18 +195,19 @@ export declare function startPublicBookingSchedulePaymentSession(client: FetchWi
|
|
|
170
195
|
completedAt: string | null;
|
|
171
196
|
failureCode: string | null;
|
|
172
197
|
failureMessage: string | null;
|
|
198
|
+
notes: string | null;
|
|
173
199
|
};
|
|
174
200
|
}>;
|
|
175
201
|
export declare function startPublicBookingGuaranteePaymentSession(client: FetchWithValidationOptions, bookingId: string, guaranteeId: string, input: PublicStartPaymentSessionInput): Promise<{
|
|
176
202
|
data: {
|
|
177
203
|
id: string;
|
|
178
|
-
targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
|
|
204
|
+
targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "flight_order";
|
|
179
205
|
targetId: string | null;
|
|
180
206
|
bookingId: string | null;
|
|
181
207
|
invoiceId: string | null;
|
|
182
208
|
bookingPaymentScheduleId: string | null;
|
|
183
209
|
bookingGuaranteeId: string | null;
|
|
184
|
-
status: "pending" | "
|
|
210
|
+
status: "pending" | "failed" | "expired" | "cancelled" | "paid" | "requires_redirect" | "processing" | "authorized";
|
|
185
211
|
provider: string | null;
|
|
186
212
|
providerSessionId: string | null;
|
|
187
213
|
providerPaymentId: string | null;
|
|
@@ -199,6 +225,7 @@ export declare function startPublicBookingGuaranteePaymentSession(client: FetchW
|
|
|
199
225
|
completedAt: string | null;
|
|
200
226
|
failureCode: string | null;
|
|
201
227
|
failureMessage: string | null;
|
|
228
|
+
notes: string | null;
|
|
202
229
|
};
|
|
203
230
|
}>;
|
|
204
231
|
export declare function validatePublicVoucher(client: FetchWithValidationOptions, input: PublicValidateVoucherInput): Promise<{
|
package/dist/operations.d.ts.map
CHANGED
|
@@ -1 +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,gCAAgC,EACrC,KAAK,8BAA8B,EACnC,KAAK,0BAA0B,EAOhC,MAAM,cAAc,CAAA;AAErB,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,0BAA0B,EAClC,KAAK,EAAE,gCAAgC;;;;;;;;;;;;;;;;;;;;;;GAOxC;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,0BAA0B,EAAE,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;GAM9F;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,0BAA0B,EAAE,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;GAM7F;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
|
|
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,gCAAgC,EACrC,KAAK,8BAA8B,EACnC,KAAK,0BAA0B,EAOhC,MAAM,cAAc,CAAA;AAErB,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,0BAA0B,EAClC,KAAK,EAAE,gCAAgC;;;;;;;;;;;;;;;;;;;;;;GAOxC;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,0BAA0B,EAAE,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;GAM9F;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,0BAA0B,EAAE,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;GAM7F;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,0BAA0B,EAAE,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;GAM5F;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"}
|
package/dist/operations.js
CHANGED
|
@@ -10,6 +10,15 @@ export function getPublicBookingDocuments(client, bookingId) {
|
|
|
10
10
|
export function getPublicBookingPayments(client, bookingId) {
|
|
11
11
|
return fetchWithValidation(`/v1/public/finance/bookings/${bookingId}/payments`, publicBookingFinancePaymentsResponse, client);
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Admin variant — same response shape as `getPublicBookingPayments`,
|
|
15
|
+
* but hits the admin endpoint (`/v1/admin/finance/bookings/:id/payments`)
|
|
16
|
+
* so a staff actor can read it. The customer-portal continues to use
|
|
17
|
+
* the public path; the operator dashboard uses this one.
|
|
18
|
+
*/
|
|
19
|
+
export function getAdminBookingPayments(client, bookingId) {
|
|
20
|
+
return fetchWithValidation(`/v1/admin/finance/bookings/${bookingId}/payments`, publicBookingFinancePaymentsResponse, client);
|
|
21
|
+
}
|
|
13
22
|
export function getPublicBookingPaymentOptions(client, bookingId, filters) {
|
|
14
23
|
return fetchWithValidation(withQueryParams(`/v1/public/finance/bookings/${bookingId}/payment-options`, filters), publicBookingPaymentOptionsResponse, client);
|
|
15
24
|
}
|
package/dist/query-keys.d.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
export interface FinanceInvoiceListFilters {
|
|
2
2
|
search?: string | undefined;
|
|
3
|
+
/**
|
|
4
|
+
* Filter to invoices for a specific booking. Drives the booking
|
|
5
|
+
* detail page's "Facturi" card. Server-side check is by exact
|
|
6
|
+
* `bookings.id`, no fuzzy matching.
|
|
7
|
+
*/
|
|
8
|
+
bookingId?: string | undefined;
|
|
9
|
+
/** Filter by invoice status (draft, sent, paid, …). */
|
|
10
|
+
status?: string | undefined;
|
|
3
11
|
limit?: number | undefined;
|
|
4
12
|
offset?: number | undefined;
|
|
5
13
|
}
|
|
@@ -43,6 +51,7 @@ export declare const financeQueryKeys: {
|
|
|
43
51
|
readonly publicFinanceDocumentLookup: (filters: PublicFinanceDocumentLookupFilters) => readonly ["voyant", "finance", "public-checkout", "document-lookup", PublicFinanceDocumentLookupFilters];
|
|
44
52
|
readonly publicBookingDocuments: (bookingId: string) => readonly ["voyant", "finance", "public-checkout", "booking-documents", string];
|
|
45
53
|
readonly publicBookingPayments: (bookingId: string) => readonly ["voyant", "finance", "public-checkout", "booking-payments", string];
|
|
54
|
+
readonly adminBookingPayments: (bookingId: string) => readonly ["voyant", "finance", "admin-booking-payments", string];
|
|
46
55
|
readonly publicBookingPaymentOptions: (bookingId: string, filters: PublicBookingPaymentOptionsFilters) => readonly ["voyant", "finance", "public-checkout", "booking-payment-options", string, PublicBookingPaymentOptionsFilters];
|
|
47
56
|
readonly publicPaymentSession: (sessionId: string) => readonly ["voyant", "finance", "public-checkout", "payment-session", string];
|
|
48
57
|
readonly publicVoucherValidation: () => readonly ["voyant", "finance", "public-checkout", "voucher-validation"];
|
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,MAAM,WAAW,yBAAyB;IACxC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,sBAAsB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3C,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAChC,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,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;
|
|
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;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,uDAAuD;IACvD,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,yBAAyB;IACxC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,gBAAgB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,sBAAsB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3C,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IAChC,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,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;+CAEP,MAAM;sDAEC,MAAM,WAAW,kCAAkC;+CAE1D,MAAM;;;qCAMhB,yBAAyB;2BAEnC,MAAM;CACZ,CAAA"}
|
package/dist/query-keys.js
CHANGED
|
@@ -15,6 +15,7 @@ export const financeQueryKeys = {
|
|
|
15
15
|
publicFinanceDocumentLookup: (filters) => [...financeQueryKeys.publicCheckout(), "document-lookup", filters],
|
|
16
16
|
publicBookingDocuments: (bookingId) => [...financeQueryKeys.publicCheckout(), "booking-documents", bookingId],
|
|
17
17
|
publicBookingPayments: (bookingId) => [...financeQueryKeys.publicCheckout(), "booking-payments", bookingId],
|
|
18
|
+
adminBookingPayments: (bookingId) => [...financeQueryKeys.all, "admin-booking-payments", bookingId],
|
|
18
19
|
publicBookingPaymentOptions: (bookingId, filters) => [...financeQueryKeys.publicCheckout(), "booking-payment-options", bookingId, filters],
|
|
19
20
|
publicPaymentSession: (sessionId) => [...financeQueryKeys.publicCheckout(), "payment-session", sessionId],
|
|
20
21
|
publicVoucherValidation: () => [...financeQueryKeys.publicCheckout(), "voucher-validation"],
|