@voyantjs/finance-react 0.3.1 → 0.4.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/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-public-booking-payments.d.ts +22 -0
- package/dist/hooks/use-public-booking-payments.d.ts.map +1 -0
- package/dist/hooks/use-public-booking-payments.js +12 -0
- package/dist/hooks/use-public-finance-document-by-reference.d.ts +27 -0
- package/dist/hooks/use-public-finance-document-by-reference.d.ts.map +1 -0
- package/dist/hooks/use-public-finance-document-by-reference.js +12 -0
- 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 +42 -1
- package/dist/operations.d.ts.map +1 -1
- package/dist/operations.js +7 -1
- package/dist/query-keys.d.ts +5 -0
- package/dist/query-keys.d.ts.map +1 -1
- package/dist/query-keys.js +2 -0
- package/dist/query-options.d.ts +174 -0
- package/dist/query-options.d.ts.map +1 -1
- package/dist/query-options.js +25 -1
- package/dist/schemas.d.ts +88 -2
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +4 -2
- package/package.json +5 -5
package/dist/hooks/index.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ export * from "./use-invoice-payments.js";
|
|
|
11
11
|
export * from "./use-invoices.js";
|
|
12
12
|
export * from "./use-public-booking-documents.js";
|
|
13
13
|
export * from "./use-public-booking-payment-options.js";
|
|
14
|
+
export * from "./use-public-booking-payments.js";
|
|
15
|
+
export * from "./use-public-finance-document-by-reference.js";
|
|
14
16
|
export * from "./use-public-payment-session.js";
|
|
15
17
|
export * from "./use-public-payment-session-mutation.js";
|
|
16
18
|
export * from "./use-public-voucher-validation-mutation.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,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,iCAAiC,CAAA;AAC/C,cAAc,0CAA0C,CAAA;AACxD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,oCAAoC,CAAA;AAClD,cAAc,4BAA4B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,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"}
|
package/dist/hooks/index.js
CHANGED
|
@@ -11,6 +11,8 @@ export * from "./use-invoice-payments.js";
|
|
|
11
11
|
export * from "./use-invoices.js";
|
|
12
12
|
export * from "./use-public-booking-documents.js";
|
|
13
13
|
export * from "./use-public-booking-payment-options.js";
|
|
14
|
+
export * from "./use-public-booking-payments.js";
|
|
15
|
+
export * from "./use-public-finance-document-by-reference.js";
|
|
14
16
|
export * from "./use-public-payment-session.js";
|
|
15
17
|
export * from "./use-public-payment-session-mutation.js";
|
|
16
18
|
export * from "./use-public-voucher-validation-mutation.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface UsePublicBookingPaymentsOptions {
|
|
2
|
+
enabled?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare function usePublicBookingPayments(bookingId: string | null | undefined, options?: UsePublicBookingPaymentsOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
|
+
data: {
|
|
6
|
+
bookingId: string;
|
|
7
|
+
payments: {
|
|
8
|
+
id: string;
|
|
9
|
+
invoiceId: string;
|
|
10
|
+
invoiceNumber: string;
|
|
11
|
+
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
12
|
+
status: "pending" | "completed" | "failed" | "refunded";
|
|
13
|
+
paymentMethod: "credit_card" | "debit_card" | "wallet" | "voucher" | "direct_bill" | "cash" | "other" | "bank_transfer" | "cheque";
|
|
14
|
+
amountCents: number;
|
|
15
|
+
currency: string;
|
|
16
|
+
paymentDate: string;
|
|
17
|
+
referenceNumber: string | null;
|
|
18
|
+
notes: string | null;
|
|
19
|
+
}[];
|
|
20
|
+
};
|
|
21
|
+
}, Error>;
|
|
22
|
+
//# sourceMappingURL=use-public-booking-payments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-public-booking-payments.d.ts","sourceRoot":"","sources":["../../src/hooks/use-public-booking-payments.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,+BAA+B;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,+BAAoC;;;;;;;;;;;;;;;;;UAS9C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { useVoyantFinanceContext } from "../provider.js";
|
|
4
|
+
import { getPublicBookingPaymentsQueryOptions } from "../query-options.js";
|
|
5
|
+
export function usePublicBookingPayments(bookingId, options = {}) {
|
|
6
|
+
const { baseUrl, fetcher } = useVoyantFinanceContext();
|
|
7
|
+
const { enabled = true } = options;
|
|
8
|
+
return useQuery({
|
|
9
|
+
...getPublicBookingPaymentsQueryOptions({ baseUrl, fetcher }, bookingId),
|
|
10
|
+
enabled: enabled && Boolean(bookingId),
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface UsePublicFinanceDocumentByReferenceOptions {
|
|
2
|
+
enabled?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export declare function usePublicFinanceDocumentByReference(reference: string | null | undefined, options?: UsePublicFinanceDocumentByReferenceOptions): import("@tanstack/react-query").UseQueryResult<{
|
|
5
|
+
data: {
|
|
6
|
+
invoiceId: string;
|
|
7
|
+
invoiceNumber: string;
|
|
8
|
+
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
9
|
+
invoiceStatus: "draft" | "void" | "sent" | "partially_paid" | "paid" | "overdue";
|
|
10
|
+
currency: string;
|
|
11
|
+
totalCents: number;
|
|
12
|
+
paidCents: number;
|
|
13
|
+
balanceDueCents: number;
|
|
14
|
+
issueDate: string;
|
|
15
|
+
dueDate: string;
|
|
16
|
+
renditionId: string | null;
|
|
17
|
+
documentStatus: "pending" | "failed" | "missing" | "ready" | "stale";
|
|
18
|
+
format: "html" | "pdf" | "xml" | "json" | null;
|
|
19
|
+
language: string | null;
|
|
20
|
+
generatedAt: string | null;
|
|
21
|
+
fileSize: number | null;
|
|
22
|
+
checksum: string | null;
|
|
23
|
+
downloadUrl: string | null;
|
|
24
|
+
bookingId: string;
|
|
25
|
+
};
|
|
26
|
+
}, Error>;
|
|
27
|
+
//# sourceMappingURL=use-public-finance-document-by-reference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-public-finance-document-by-reference.d.ts","sourceRoot":"","sources":["../../src/hooks/use-public-finance-document-by-reference.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,0CAA0C;IACzD,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,mCAAmC,CACjD,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,0CAA+C;;;;;;;;;;;;;;;;;;;;;;UASzD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { useVoyantFinanceContext } from "../provider.js";
|
|
4
|
+
import { getPublicFinanceDocumentByReferenceQueryOptions } from "../query-options.js";
|
|
5
|
+
export function usePublicFinanceDocumentByReference(reference, options = {}) {
|
|
6
|
+
const { baseUrl, fetcher } = useVoyantFinanceContext();
|
|
7
|
+
const { enabled = true } = options;
|
|
8
|
+
return useQuery({
|
|
9
|
+
...getPublicFinanceDocumentByReferenceQueryOptions({ baseUrl, fetcher }, reference),
|
|
10
|
+
enabled: enabled && Boolean(reference),
|
|
11
|
+
});
|
|
12
|
+
}
|
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, getPublicPaymentSession, startPublicBookingGuaranteePaymentSession, startPublicBookingSchedulePaymentSession, validatePublicVoucher, } from "./operations.js";
|
|
3
|
+
export { 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 { getInvoiceCreditNotesQueryOptions, getInvoiceLineItemsQueryOptions, getInvoiceNotesQueryOptions, getInvoicePaymentsQueryOptions, getInvoiceQueryOptions, getInvoicesQueryOptions, getPublicBookingDocumentsQueryOptions, getPublicBookingPaymentOptionsQueryOptions, getPublicPaymentSessionQueryOptions, getSupplierPaymentsQueryOptions, } from "./query-options.js";
|
|
6
|
+
export { getInvoiceCreditNotesQueryOptions, getInvoiceLineItemsQueryOptions, getInvoiceNotesQueryOptions, getInvoicePaymentsQueryOptions, getInvoiceQueryOptions, getInvoicesQueryOptions, getPublicBookingDocumentsQueryOptions, getPublicBookingPaymentOptionsQueryOptions, getPublicBookingPaymentsQueryOptions, getPublicFinanceDocumentByReferenceQueryOptions, getPublicPaymentSessionQueryOptions, getSupplierPaymentsQueryOptions, } 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,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,iCAAiC,EACjC,+BAA+B,EAC/B,2BAA2B,EAC3B,8BAA8B,EAC9B,sBAAsB,EACtB,uBAAuB,EACvB,qCAAqC,EACrC,0CAA0C,EAC1C,mCAAmC,EACnC,+BAA+B,GAChC,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,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,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,GAChC,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, getPublicPaymentSession, startPublicBookingGuaranteePaymentSession, startPublicBookingSchedulePaymentSession, validatePublicVoucher, } from "./operations.js";
|
|
3
|
+
export { 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 { getInvoiceCreditNotesQueryOptions, getInvoiceLineItemsQueryOptions, getInvoiceNotesQueryOptions, getInvoicePaymentsQueryOptions, getInvoiceQueryOptions, getInvoicesQueryOptions, getPublicBookingDocumentsQueryOptions, getPublicBookingPaymentOptionsQueryOptions, getPublicPaymentSessionQueryOptions, getSupplierPaymentsQueryOptions, } from "./query-options.js";
|
|
6
|
+
export { getInvoiceCreditNotesQueryOptions, getInvoiceLineItemsQueryOptions, getInvoiceNotesQueryOptions, getInvoicePaymentsQueryOptions, getInvoiceQueryOptions, getInvoicesQueryOptions, getPublicBookingDocumentsQueryOptions, getPublicBookingPaymentOptionsQueryOptions, getPublicBookingPaymentsQueryOptions, getPublicFinanceDocumentByReferenceQueryOptions, getPublicPaymentSessionQueryOptions, getSupplierPaymentsQueryOptions, } from "./query-options.js";
|
|
7
7
|
export * from "./schemas.js";
|
package/dist/operations.d.ts
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
import { type FetchWithValidationOptions } from "./client.js";
|
|
2
|
-
import { type PublicStartPaymentSessionInput, type PublicValidateVoucherInput } from "./schemas.js";
|
|
2
|
+
import { type PublicFinanceDocumentLookupQuery, type PublicStartPaymentSessionInput, type PublicValidateVoucherInput } from "./schemas.js";
|
|
3
|
+
export declare function getPublicFinanceDocumentByReference(client: FetchWithValidationOptions, query: PublicFinanceDocumentLookupQuery): Promise<{
|
|
4
|
+
data: {
|
|
5
|
+
invoiceId: string;
|
|
6
|
+
invoiceNumber: string;
|
|
7
|
+
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
8
|
+
invoiceStatus: "draft" | "void" | "sent" | "partially_paid" | "paid" | "overdue";
|
|
9
|
+
currency: string;
|
|
10
|
+
totalCents: number;
|
|
11
|
+
paidCents: number;
|
|
12
|
+
balanceDueCents: number;
|
|
13
|
+
issueDate: string;
|
|
14
|
+
dueDate: string;
|
|
15
|
+
renditionId: string | null;
|
|
16
|
+
documentStatus: "pending" | "failed" | "missing" | "ready" | "stale";
|
|
17
|
+
format: "html" | "pdf" | "xml" | "json" | null;
|
|
18
|
+
language: string | null;
|
|
19
|
+
generatedAt: string | null;
|
|
20
|
+
fileSize: number | null;
|
|
21
|
+
checksum: string | null;
|
|
22
|
+
downloadUrl: string | null;
|
|
23
|
+
bookingId: string;
|
|
24
|
+
};
|
|
25
|
+
}>;
|
|
3
26
|
export declare function getPublicBookingDocuments(client: FetchWithValidationOptions, bookingId: string): Promise<{
|
|
4
27
|
data: {
|
|
5
28
|
bookingId: string;
|
|
@@ -25,6 +48,24 @@ export declare function getPublicBookingDocuments(client: FetchWithValidationOpt
|
|
|
25
48
|
}[];
|
|
26
49
|
};
|
|
27
50
|
}>;
|
|
51
|
+
export declare function getPublicBookingPayments(client: FetchWithValidationOptions, bookingId: string): Promise<{
|
|
52
|
+
data: {
|
|
53
|
+
bookingId: string;
|
|
54
|
+
payments: {
|
|
55
|
+
id: string;
|
|
56
|
+
invoiceId: string;
|
|
57
|
+
invoiceNumber: string;
|
|
58
|
+
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
59
|
+
status: "pending" | "completed" | "failed" | "refunded";
|
|
60
|
+
paymentMethod: "credit_card" | "debit_card" | "wallet" | "voucher" | "direct_bill" | "cash" | "other" | "bank_transfer" | "cheque";
|
|
61
|
+
amountCents: number;
|
|
62
|
+
currency: string;
|
|
63
|
+
paymentDate: string;
|
|
64
|
+
referenceNumber: string | null;
|
|
65
|
+
notes: string | null;
|
|
66
|
+
}[];
|
|
67
|
+
};
|
|
68
|
+
}>;
|
|
28
69
|
export declare function getPublicBookingPaymentOptions(client: FetchWithValidationOptions, bookingId: string, filters?: {
|
|
29
70
|
personId?: string;
|
|
30
71
|
organizationId?: string;
|
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,8BAA8B,EACnC,KAAK,0BAA0B,
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { fetchWithValidation, withQueryParams } from "./client.js";
|
|
3
|
-
import { publicBookingFinanceDocumentsResponse, publicBookingPaymentOptionsResponse, publicPaymentSessionResponse, publicVoucherValidationResponse, } from "./schemas.js";
|
|
3
|
+
import { publicBookingFinanceDocumentsResponse, publicBookingFinancePaymentsResponse, publicBookingPaymentOptionsResponse, publicFinanceDocumentLookupResponse, publicPaymentSessionResponse, publicVoucherValidationResponse, } from "./schemas.js";
|
|
4
|
+
export function getPublicFinanceDocumentByReference(client, query) {
|
|
5
|
+
return fetchWithValidation(withQueryParams("/v1/public/finance/documents/by-reference", query), publicFinanceDocumentLookupResponse, client);
|
|
6
|
+
}
|
|
4
7
|
export function getPublicBookingDocuments(client, bookingId) {
|
|
5
8
|
return fetchWithValidation(`/v1/public/finance/bookings/${bookingId}/documents`, publicBookingFinanceDocumentsResponse, client);
|
|
6
9
|
}
|
|
10
|
+
export function getPublicBookingPayments(client, bookingId) {
|
|
11
|
+
return fetchWithValidation(`/v1/public/finance/bookings/${bookingId}/payments`, publicBookingFinancePaymentsResponse, client);
|
|
12
|
+
}
|
|
7
13
|
export function getPublicBookingPaymentOptions(client, bookingId, filters) {
|
|
8
14
|
return fetchWithValidation(withQueryParams(`/v1/public/finance/bookings/${bookingId}/payment-options`, filters), publicBookingPaymentOptionsResponse, client);
|
|
9
15
|
}
|
package/dist/query-keys.d.ts
CHANGED
|
@@ -14,6 +14,9 @@ export interface PublicBookingPaymentOptionsFilters {
|
|
|
14
14
|
instrumentType?: string | undefined;
|
|
15
15
|
includeInactive?: boolean | undefined;
|
|
16
16
|
}
|
|
17
|
+
export interface PublicFinanceDocumentLookupFilters {
|
|
18
|
+
reference?: string | undefined;
|
|
19
|
+
}
|
|
17
20
|
export declare const financeQueryKeys: {
|
|
18
21
|
readonly all: readonly ["voyant", "finance"];
|
|
19
22
|
readonly invoices: () => readonly ["voyant", "finance", "invoices"];
|
|
@@ -26,7 +29,9 @@ export declare const financeQueryKeys: {
|
|
|
26
29
|
readonly supplierPayments: () => readonly ["voyant", "finance", "supplier-payments"];
|
|
27
30
|
readonly supplierPaymentsList: (filters: FinanceSupplierPaymentListFilters) => readonly ["voyant", "finance", "supplier-payments", "list", FinanceSupplierPaymentListFilters];
|
|
28
31
|
readonly publicCheckout: () => readonly ["voyant", "finance", "public-checkout"];
|
|
32
|
+
readonly publicFinanceDocumentLookup: (filters: PublicFinanceDocumentLookupFilters) => readonly ["voyant", "finance", "public-checkout", "document-lookup", PublicFinanceDocumentLookupFilters];
|
|
29
33
|
readonly publicBookingDocuments: (bookingId: string) => readonly ["voyant", "finance", "public-checkout", "booking-documents", string];
|
|
34
|
+
readonly publicBookingPayments: (bookingId: string) => readonly ["voyant", "finance", "public-checkout", "booking-payments", string];
|
|
30
35
|
readonly publicBookingPaymentOptions: (bookingId: string, filters: PublicBookingPaymentOptionsFilters) => readonly ["voyant", "finance", "public-checkout", "booking-payment-options", string, PublicBookingPaymentOptionsFilters];
|
|
31
36
|
readonly publicPaymentSession: (sessionId: string) => readonly ["voyant", "finance", "public-checkout", "payment-session", string];
|
|
32
37
|
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,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;;
|
|
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,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;;6CAGO,iCAAiC;;oDAI1B,kCAAkC;iDAErC,MAAM;gDAEP,MAAM;sDAEA,MAAM,WAAW,kCAAkC;+CAE1D,MAAM;;CAIhC,CAAA"}
|
package/dist/query-keys.js
CHANGED
|
@@ -10,7 +10,9 @@ export const financeQueryKeys = {
|
|
|
10
10
|
supplierPayments: () => [...financeQueryKeys.all, "supplier-payments"],
|
|
11
11
|
supplierPaymentsList: (filters) => [...financeQueryKeys.supplierPayments(), "list", filters],
|
|
12
12
|
publicCheckout: () => [...financeQueryKeys.all, "public-checkout"],
|
|
13
|
+
publicFinanceDocumentLookup: (filters) => [...financeQueryKeys.publicCheckout(), "document-lookup", filters],
|
|
13
14
|
publicBookingDocuments: (bookingId) => [...financeQueryKeys.publicCheckout(), "booking-documents", bookingId],
|
|
15
|
+
publicBookingPayments: (bookingId) => [...financeQueryKeys.publicCheckout(), "booking-payments", bookingId],
|
|
14
16
|
publicBookingPaymentOptions: (bookingId, filters) => [...financeQueryKeys.publicCheckout(), "booking-payment-options", bookingId, filters],
|
|
15
17
|
publicPaymentSession: (sessionId) => [...financeQueryKeys.publicCheckout(), "payment-session", sessionId],
|
|
16
18
|
publicVoucherValidation: () => [...financeQueryKeys.publicCheckout(), "voucher-validation"],
|
package/dist/query-options.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ import type { UseInvoicePaymentsOptions } from "./hooks/use-invoice-payments.js"
|
|
|
7
7
|
import type { UseInvoicesOptions } from "./hooks/use-invoices.js";
|
|
8
8
|
import type { UsePublicBookingDocumentsOptions } from "./hooks/use-public-booking-documents.js";
|
|
9
9
|
import type { UsePublicBookingPaymentOptionsOptions } from "./hooks/use-public-booking-payment-options.js";
|
|
10
|
+
import type { UsePublicBookingPaymentsOptions } from "./hooks/use-public-booking-payments.js";
|
|
11
|
+
import type { UsePublicFinanceDocumentByReferenceOptions } from "./hooks/use-public-finance-document-by-reference.js";
|
|
10
12
|
import type { UsePublicPaymentSessionOptions } from "./hooks/use-public-payment-session.js";
|
|
11
13
|
import type { UseSupplierPaymentsOptions } from "./hooks/use-supplier-payments.js";
|
|
12
14
|
export declare function getInvoicesQueryOptions(client: FetchWithValidationOptions, options?: UseInvoicesOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
|
|
@@ -761,6 +763,178 @@ export declare function getPublicBookingDocumentsQueryOptions(client: FetchWithV
|
|
|
761
763
|
[dataTagErrorSymbol]: Error;
|
|
762
764
|
};
|
|
763
765
|
};
|
|
766
|
+
export declare function getPublicFinanceDocumentByReferenceQueryOptions(client: FetchWithValidationOptions, reference: string | null | undefined, options?: UsePublicFinanceDocumentByReferenceOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
|
|
767
|
+
data: {
|
|
768
|
+
invoiceId: string;
|
|
769
|
+
invoiceNumber: string;
|
|
770
|
+
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
771
|
+
invoiceStatus: "draft" | "void" | "sent" | "partially_paid" | "paid" | "overdue";
|
|
772
|
+
currency: string;
|
|
773
|
+
totalCents: number;
|
|
774
|
+
paidCents: number;
|
|
775
|
+
balanceDueCents: number;
|
|
776
|
+
issueDate: string;
|
|
777
|
+
dueDate: string;
|
|
778
|
+
renditionId: string | null;
|
|
779
|
+
documentStatus: "pending" | "failed" | "missing" | "ready" | "stale";
|
|
780
|
+
format: "html" | "pdf" | "xml" | "json" | null;
|
|
781
|
+
language: string | null;
|
|
782
|
+
generatedAt: string | null;
|
|
783
|
+
fileSize: number | null;
|
|
784
|
+
checksum: string | null;
|
|
785
|
+
downloadUrl: string | null;
|
|
786
|
+
bookingId: string;
|
|
787
|
+
};
|
|
788
|
+
}, Error, {
|
|
789
|
+
data: {
|
|
790
|
+
invoiceId: string;
|
|
791
|
+
invoiceNumber: string;
|
|
792
|
+
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
793
|
+
invoiceStatus: "draft" | "void" | "sent" | "partially_paid" | "paid" | "overdue";
|
|
794
|
+
currency: string;
|
|
795
|
+
totalCents: number;
|
|
796
|
+
paidCents: number;
|
|
797
|
+
balanceDueCents: number;
|
|
798
|
+
issueDate: string;
|
|
799
|
+
dueDate: string;
|
|
800
|
+
renditionId: string | null;
|
|
801
|
+
documentStatus: "pending" | "failed" | "missing" | "ready" | "stale";
|
|
802
|
+
format: "html" | "pdf" | "xml" | "json" | null;
|
|
803
|
+
language: string | null;
|
|
804
|
+
generatedAt: string | null;
|
|
805
|
+
fileSize: number | null;
|
|
806
|
+
checksum: string | null;
|
|
807
|
+
downloadUrl: string | null;
|
|
808
|
+
bookingId: string;
|
|
809
|
+
};
|
|
810
|
+
}, readonly ["voyant", "finance", "public-checkout", "document-lookup", import("./query-keys.js").PublicFinanceDocumentLookupFilters]>, "queryFn"> & {
|
|
811
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<{
|
|
812
|
+
data: {
|
|
813
|
+
invoiceId: string;
|
|
814
|
+
invoiceNumber: string;
|
|
815
|
+
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
816
|
+
invoiceStatus: "draft" | "void" | "sent" | "partially_paid" | "paid" | "overdue";
|
|
817
|
+
currency: string;
|
|
818
|
+
totalCents: number;
|
|
819
|
+
paidCents: number;
|
|
820
|
+
balanceDueCents: number;
|
|
821
|
+
issueDate: string;
|
|
822
|
+
dueDate: string;
|
|
823
|
+
renditionId: string | null;
|
|
824
|
+
documentStatus: "pending" | "failed" | "missing" | "ready" | "stale";
|
|
825
|
+
format: "html" | "pdf" | "xml" | "json" | null;
|
|
826
|
+
language: string | null;
|
|
827
|
+
generatedAt: string | null;
|
|
828
|
+
fileSize: number | null;
|
|
829
|
+
checksum: string | null;
|
|
830
|
+
downloadUrl: string | null;
|
|
831
|
+
bookingId: string;
|
|
832
|
+
};
|
|
833
|
+
}, readonly ["voyant", "finance", "public-checkout", "document-lookup", import("./query-keys.js").PublicFinanceDocumentLookupFilters], never> | undefined;
|
|
834
|
+
} & {
|
|
835
|
+
queryKey: readonly ["voyant", "finance", "public-checkout", "document-lookup", import("./query-keys.js").PublicFinanceDocumentLookupFilters] & {
|
|
836
|
+
[dataTagSymbol]: {
|
|
837
|
+
data: {
|
|
838
|
+
invoiceId: string;
|
|
839
|
+
invoiceNumber: string;
|
|
840
|
+
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
841
|
+
invoiceStatus: "draft" | "void" | "sent" | "partially_paid" | "paid" | "overdue";
|
|
842
|
+
currency: string;
|
|
843
|
+
totalCents: number;
|
|
844
|
+
paidCents: number;
|
|
845
|
+
balanceDueCents: number;
|
|
846
|
+
issueDate: string;
|
|
847
|
+
dueDate: string;
|
|
848
|
+
renditionId: string | null;
|
|
849
|
+
documentStatus: "pending" | "failed" | "missing" | "ready" | "stale";
|
|
850
|
+
format: "html" | "pdf" | "xml" | "json" | null;
|
|
851
|
+
language: string | null;
|
|
852
|
+
generatedAt: string | null;
|
|
853
|
+
fileSize: number | null;
|
|
854
|
+
checksum: string | null;
|
|
855
|
+
downloadUrl: string | null;
|
|
856
|
+
bookingId: string;
|
|
857
|
+
};
|
|
858
|
+
};
|
|
859
|
+
[dataTagErrorSymbol]: Error;
|
|
860
|
+
};
|
|
861
|
+
};
|
|
862
|
+
export declare function getPublicBookingPaymentsQueryOptions(client: FetchWithValidationOptions, bookingId: string | null | undefined, options?: UsePublicBookingPaymentsOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
|
|
863
|
+
data: {
|
|
864
|
+
bookingId: string;
|
|
865
|
+
payments: {
|
|
866
|
+
id: string;
|
|
867
|
+
invoiceId: string;
|
|
868
|
+
invoiceNumber: string;
|
|
869
|
+
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
870
|
+
status: "pending" | "completed" | "failed" | "refunded";
|
|
871
|
+
paymentMethod: "credit_card" | "debit_card" | "wallet" | "voucher" | "direct_bill" | "cash" | "other" | "bank_transfer" | "cheque";
|
|
872
|
+
amountCents: number;
|
|
873
|
+
currency: string;
|
|
874
|
+
paymentDate: string;
|
|
875
|
+
referenceNumber: string | null;
|
|
876
|
+
notes: string | null;
|
|
877
|
+
}[];
|
|
878
|
+
};
|
|
879
|
+
}, Error, {
|
|
880
|
+
data: {
|
|
881
|
+
bookingId: string;
|
|
882
|
+
payments: {
|
|
883
|
+
id: string;
|
|
884
|
+
invoiceId: string;
|
|
885
|
+
invoiceNumber: string;
|
|
886
|
+
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
887
|
+
status: "pending" | "completed" | "failed" | "refunded";
|
|
888
|
+
paymentMethod: "credit_card" | "debit_card" | "wallet" | "voucher" | "direct_bill" | "cash" | "other" | "bank_transfer" | "cheque";
|
|
889
|
+
amountCents: number;
|
|
890
|
+
currency: string;
|
|
891
|
+
paymentDate: string;
|
|
892
|
+
referenceNumber: string | null;
|
|
893
|
+
notes: string | null;
|
|
894
|
+
}[];
|
|
895
|
+
};
|
|
896
|
+
}, readonly ["voyant", "finance", "public-checkout", "booking-payments", string]>, "queryFn"> & {
|
|
897
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<{
|
|
898
|
+
data: {
|
|
899
|
+
bookingId: string;
|
|
900
|
+
payments: {
|
|
901
|
+
id: string;
|
|
902
|
+
invoiceId: string;
|
|
903
|
+
invoiceNumber: string;
|
|
904
|
+
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
905
|
+
status: "pending" | "completed" | "failed" | "refunded";
|
|
906
|
+
paymentMethod: "credit_card" | "debit_card" | "wallet" | "voucher" | "direct_bill" | "cash" | "other" | "bank_transfer" | "cheque";
|
|
907
|
+
amountCents: number;
|
|
908
|
+
currency: string;
|
|
909
|
+
paymentDate: string;
|
|
910
|
+
referenceNumber: string | null;
|
|
911
|
+
notes: string | null;
|
|
912
|
+
}[];
|
|
913
|
+
};
|
|
914
|
+
}, readonly ["voyant", "finance", "public-checkout", "booking-payments", string], never> | undefined;
|
|
915
|
+
} & {
|
|
916
|
+
queryKey: readonly ["voyant", "finance", "public-checkout", "booking-payments", string] & {
|
|
917
|
+
[dataTagSymbol]: {
|
|
918
|
+
data: {
|
|
919
|
+
bookingId: string;
|
|
920
|
+
payments: {
|
|
921
|
+
id: string;
|
|
922
|
+
invoiceId: string;
|
|
923
|
+
invoiceNumber: string;
|
|
924
|
+
invoiceType: "invoice" | "proforma" | "credit_note";
|
|
925
|
+
status: "pending" | "completed" | "failed" | "refunded";
|
|
926
|
+
paymentMethod: "credit_card" | "debit_card" | "wallet" | "voucher" | "direct_bill" | "cash" | "other" | "bank_transfer" | "cheque";
|
|
927
|
+
amountCents: number;
|
|
928
|
+
currency: string;
|
|
929
|
+
paymentDate: string;
|
|
930
|
+
referenceNumber: string | null;
|
|
931
|
+
notes: string | null;
|
|
932
|
+
}[];
|
|
933
|
+
};
|
|
934
|
+
};
|
|
935
|
+
[dataTagErrorSymbol]: Error;
|
|
936
|
+
};
|
|
937
|
+
};
|
|
764
938
|
export declare function getPublicPaymentSessionQueryOptions(client: FetchWithValidationOptions, sessionId: string | null | undefined, options?: UsePublicPaymentSessionOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
|
|
765
939
|
data: {
|
|
766
940
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-options.d.ts","sourceRoot":"","sources":["../src/query-options.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,0BAA0B,EAAuB,MAAM,aAAa,CAAA;AAClF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAA;AACvF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AACnF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AAC1E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AAChF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,yCAAyC,CAAA;AAC/F,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,+CAA+C,CAAA;AAC1G,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,uCAAuC,CAAA;AAC3F,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAA;
|
|
1
|
+
{"version":3,"file":"query-options.d.ts","sourceRoot":"","sources":["../src/query-options.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,0BAA0B,EAAuB,MAAM,aAAa,CAAA;AAClF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAA;AACvF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AACnF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AAC1E,OAAO,KAAK,EAAE,yBAAyB,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SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,0CAA+C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAczD;AAED,wBAAgB,oCAAoC,CAClD,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,+BAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc9C;AAED,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,8BAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc7C"}
|
package/dist/query-options.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { queryOptions } from "@tanstack/react-query";
|
|
3
3
|
import { fetchWithValidation } from "./client.js";
|
|
4
|
-
import { getPublicBookingDocuments, getPublicBookingPaymentOptions, getPublicPaymentSession, } from "./operations.js";
|
|
4
|
+
import { getPublicBookingDocuments, getPublicBookingPaymentOptions, getPublicBookingPayments, getPublicFinanceDocumentByReference, getPublicPaymentSession, } from "./operations.js";
|
|
5
5
|
import { financeQueryKeys } from "./query-keys.js";
|
|
6
6
|
import { invoiceCreditNotesResponse, invoiceLineItemsResponse, invoiceListResponse, invoiceNotesResponse, invoicePaymentsResponse, invoiceSingleResponse, supplierPaymentListResponse, } from "./schemas.js";
|
|
7
7
|
export function getInvoicesQueryOptions(client, options = {}) {
|
|
@@ -115,6 +115,30 @@ export function getPublicBookingDocumentsQueryOptions(client, bookingId, options
|
|
|
115
115
|
},
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
|
+
export function getPublicFinanceDocumentByReferenceQueryOptions(client, reference, options = {}) {
|
|
119
|
+
const { enabled: _enabled = true } = options;
|
|
120
|
+
return queryOptions({
|
|
121
|
+
queryKey: financeQueryKeys.publicFinanceDocumentLookup({ reference: reference ?? undefined }),
|
|
122
|
+
queryFn: async () => {
|
|
123
|
+
if (!reference) {
|
|
124
|
+
throw new Error("getPublicFinanceDocumentByReferenceQueryOptions requires a reference");
|
|
125
|
+
}
|
|
126
|
+
return getPublicFinanceDocumentByReference(client, { reference });
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
export function getPublicBookingPaymentsQueryOptions(client, bookingId, options = {}) {
|
|
131
|
+
const { enabled: _enabled = true } = options;
|
|
132
|
+
return queryOptions({
|
|
133
|
+
queryKey: financeQueryKeys.publicBookingPayments(bookingId ?? ""),
|
|
134
|
+
queryFn: async () => {
|
|
135
|
+
if (!bookingId) {
|
|
136
|
+
throw new Error("getPublicBookingPaymentsQueryOptions requires a bookingId");
|
|
137
|
+
}
|
|
138
|
+
return getPublicBookingPayments(client, bookingId);
|
|
139
|
+
},
|
|
140
|
+
});
|
|
141
|
+
}
|
|
118
142
|
export function getPublicPaymentSessionQueryOptions(client, sessionId, options = {}) {
|
|
119
143
|
const { enabled: _enabled = true } = options;
|
|
120
144
|
return queryOptions({
|
package/dist/schemas.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { publicBookingFinanceDocumentsSchema, publicBookingPaymentOptionsSchema, publicFinanceBookingDocumentSchema, publicPaymentOptionsQuerySchema, publicPaymentSessionSchema, publicStartPaymentSessionSchema, publicValidateVoucherSchema, publicVoucherValidationSchema } from "@voyantjs/finance";
|
|
1
|
+
import { publicBookingFinanceDocumentsSchema, publicBookingFinancePaymentsSchema, publicBookingPaymentOptionsSchema, publicFinanceBookingDocumentSchema, publicFinanceBookingPaymentSchema, publicFinanceDocumentLookupQuerySchema, publicFinanceDocumentLookupSchema, publicPaymentOptionsQuerySchema, publicPaymentSessionSchema, publicStartPaymentSessionSchema, publicValidateVoucherSchema, publicVoucherValidationSchema } from "@voyantjs/finance";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
export declare const paginatedEnvelope: <T extends z.ZodTypeAny>(item: T) => z.ZodObject<{
|
|
4
4
|
data: z.ZodArray<T>;
|
|
@@ -274,7 +274,7 @@ export declare const invoiceNotesResponse: z.ZodObject<{
|
|
|
274
274
|
createdAt: z.ZodString;
|
|
275
275
|
}, z.core.$strip>>;
|
|
276
276
|
}, z.core.$strip>;
|
|
277
|
-
export { publicBookingFinanceDocumentsSchema, publicBookingPaymentOptionsSchema, publicFinanceBookingDocumentSchema, publicPaymentOptionsQuerySchema, publicPaymentSessionSchema, publicStartPaymentSessionSchema, publicValidateVoucherSchema, publicVoucherValidationSchema, };
|
|
277
|
+
export { publicBookingFinanceDocumentsSchema, publicBookingFinancePaymentsSchema, publicBookingPaymentOptionsSchema, publicFinanceBookingDocumentSchema, publicFinanceBookingPaymentSchema, publicFinanceDocumentLookupQuerySchema, publicFinanceDocumentLookupSchema, publicPaymentOptionsQuerySchema, publicPaymentSessionSchema, publicStartPaymentSessionSchema, publicValidateVoucherSchema, publicVoucherValidationSchema, };
|
|
278
278
|
export declare const publicBookingPaymentOptionsResponse: z.ZodObject<{
|
|
279
279
|
data: z.ZodObject<{
|
|
280
280
|
bookingId: z.ZodString;
|
|
@@ -395,6 +395,88 @@ export declare const publicBookingFinanceDocumentsResponse: z.ZodObject<{
|
|
|
395
395
|
}, z.core.$strip>>;
|
|
396
396
|
}, z.core.$strip>;
|
|
397
397
|
}, z.core.$strip>;
|
|
398
|
+
export declare const publicFinanceDocumentLookupResponse: z.ZodObject<{
|
|
399
|
+
data: z.ZodObject<{
|
|
400
|
+
invoiceId: z.ZodString;
|
|
401
|
+
invoiceNumber: z.ZodString;
|
|
402
|
+
invoiceType: z.ZodEnum<{
|
|
403
|
+
invoice: "invoice";
|
|
404
|
+
proforma: "proforma";
|
|
405
|
+
credit_note: "credit_note";
|
|
406
|
+
}>;
|
|
407
|
+
invoiceStatus: z.ZodEnum<{
|
|
408
|
+
draft: "draft";
|
|
409
|
+
void: "void";
|
|
410
|
+
sent: "sent";
|
|
411
|
+
partially_paid: "partially_paid";
|
|
412
|
+
paid: "paid";
|
|
413
|
+
overdue: "overdue";
|
|
414
|
+
}>;
|
|
415
|
+
currency: z.ZodString;
|
|
416
|
+
totalCents: z.ZodNumber;
|
|
417
|
+
paidCents: z.ZodNumber;
|
|
418
|
+
balanceDueCents: z.ZodNumber;
|
|
419
|
+
issueDate: z.ZodString;
|
|
420
|
+
dueDate: z.ZodString;
|
|
421
|
+
renditionId: z.ZodNullable<z.ZodString>;
|
|
422
|
+
documentStatus: z.ZodEnum<{
|
|
423
|
+
pending: "pending";
|
|
424
|
+
failed: "failed";
|
|
425
|
+
missing: "missing";
|
|
426
|
+
ready: "ready";
|
|
427
|
+
stale: "stale";
|
|
428
|
+
}>;
|
|
429
|
+
format: z.ZodNullable<z.ZodEnum<{
|
|
430
|
+
html: "html";
|
|
431
|
+
pdf: "pdf";
|
|
432
|
+
xml: "xml";
|
|
433
|
+
json: "json";
|
|
434
|
+
}>>;
|
|
435
|
+
language: z.ZodNullable<z.ZodString>;
|
|
436
|
+
generatedAt: z.ZodNullable<z.ZodString>;
|
|
437
|
+
fileSize: z.ZodNullable<z.ZodNumber>;
|
|
438
|
+
checksum: z.ZodNullable<z.ZodString>;
|
|
439
|
+
downloadUrl: z.ZodNullable<z.ZodString>;
|
|
440
|
+
bookingId: z.ZodString;
|
|
441
|
+
}, z.core.$strip>;
|
|
442
|
+
}, z.core.$strip>;
|
|
443
|
+
export declare const publicBookingFinancePaymentsResponse: z.ZodObject<{
|
|
444
|
+
data: z.ZodObject<{
|
|
445
|
+
bookingId: z.ZodString;
|
|
446
|
+
payments: z.ZodArray<z.ZodObject<{
|
|
447
|
+
id: z.ZodString;
|
|
448
|
+
invoiceId: z.ZodString;
|
|
449
|
+
invoiceNumber: z.ZodString;
|
|
450
|
+
invoiceType: z.ZodEnum<{
|
|
451
|
+
invoice: "invoice";
|
|
452
|
+
proforma: "proforma";
|
|
453
|
+
credit_note: "credit_note";
|
|
454
|
+
}>;
|
|
455
|
+
status: z.ZodEnum<{
|
|
456
|
+
pending: "pending";
|
|
457
|
+
completed: "completed";
|
|
458
|
+
failed: "failed";
|
|
459
|
+
refunded: "refunded";
|
|
460
|
+
}>;
|
|
461
|
+
paymentMethod: z.ZodEnum<{
|
|
462
|
+
credit_card: "credit_card";
|
|
463
|
+
debit_card: "debit_card";
|
|
464
|
+
wallet: "wallet";
|
|
465
|
+
voucher: "voucher";
|
|
466
|
+
direct_bill: "direct_bill";
|
|
467
|
+
cash: "cash";
|
|
468
|
+
other: "other";
|
|
469
|
+
bank_transfer: "bank_transfer";
|
|
470
|
+
cheque: "cheque";
|
|
471
|
+
}>;
|
|
472
|
+
amountCents: z.ZodNumber;
|
|
473
|
+
currency: z.ZodString;
|
|
474
|
+
paymentDate: z.ZodString;
|
|
475
|
+
referenceNumber: z.ZodNullable<z.ZodString>;
|
|
476
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
477
|
+
}, z.core.$strip>>;
|
|
478
|
+
}, z.core.$strip>;
|
|
479
|
+
}, z.core.$strip>;
|
|
398
480
|
export declare const publicPaymentSessionResponse: z.ZodObject<{
|
|
399
481
|
data: z.ZodObject<{
|
|
400
482
|
id: z.ZodString;
|
|
@@ -476,7 +558,11 @@ export declare const publicVoucherValidationResponse: z.ZodObject<{
|
|
|
476
558
|
}, z.core.$strip>;
|
|
477
559
|
export type PublicBookingPaymentOptionsRecord = z.infer<typeof publicBookingPaymentOptionsSchema>;
|
|
478
560
|
export type PublicBookingFinanceDocumentsRecord = z.infer<typeof publicBookingFinanceDocumentsSchema>;
|
|
561
|
+
export type PublicFinanceDocumentLookupQuery = z.input<typeof publicFinanceDocumentLookupQuerySchema>;
|
|
562
|
+
export type PublicFinanceDocumentLookupRecord = z.infer<typeof publicFinanceDocumentLookupSchema>;
|
|
563
|
+
export type PublicBookingFinancePaymentsRecord = z.infer<typeof publicBookingFinancePaymentsSchema>;
|
|
479
564
|
export type PublicFinanceBookingDocumentRecord = z.infer<typeof publicFinanceBookingDocumentSchema>;
|
|
565
|
+
export type PublicFinanceBookingPaymentRecord = z.infer<typeof publicFinanceBookingPaymentSchema>;
|
|
480
566
|
export type PublicPaymentSessionRecord = z.infer<typeof publicPaymentSessionSchema>;
|
|
481
567
|
export type PublicStartPaymentSessionInput = z.input<typeof publicStartPaymentSessionSchema>;
|
|
482
568
|
export type PublicValidateVoucherInput = z.input<typeof publicValidateVoucherSchema>;
|
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,iCAAiC,EACjC,kCAAkC,EAClC,+BAA+B,EAC/B,0BAA0B,EAC1B,+BAA+B,EAC/B,2BAA2B,EAC3B,6BAA6B,EAC9B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;;;;;iBAM7D,CAAA;AAEJ,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;;iBAA6B,CAAA;AAC3F,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC;;iBAAsC,CAAA;AACnG,eAAO,MAAM,eAAe;;iBAAqC,CAAA;AAEjE,eAAO,MAAM,mBAAmB;;;;;;;EAO9B,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;;;EAA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MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA"}
|
package/dist/schemas.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { publicBookingFinanceDocumentsSchema, publicBookingPaymentOptionsSchema, publicFinanceBookingDocumentSchema, publicPaymentOptionsQuerySchema, publicPaymentSessionSchema, publicStartPaymentSessionSchema, publicValidateVoucherSchema, publicVoucherValidationSchema, } from "@voyantjs/finance";
|
|
1
|
+
import { publicBookingFinanceDocumentsSchema, publicBookingFinancePaymentsSchema, publicBookingPaymentOptionsSchema, publicFinanceBookingDocumentSchema, publicFinanceBookingPaymentSchema, publicFinanceDocumentLookupQuerySchema, publicFinanceDocumentLookupSchema, publicPaymentOptionsQuerySchema, publicPaymentSessionSchema, publicStartPaymentSessionSchema, publicValidateVoucherSchema, publicVoucherValidationSchema, } from "@voyantjs/finance";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
export const paginatedEnvelope = (item) => z.object({
|
|
4
4
|
data: z.array(item),
|
|
@@ -99,8 +99,10 @@ export const invoiceLineItemsResponse = arrayEnvelope(lineItemRecordSchema);
|
|
|
99
99
|
export const invoicePaymentsResponse = arrayEnvelope(paymentRecordSchema);
|
|
100
100
|
export const invoiceCreditNotesResponse = arrayEnvelope(creditNoteRecordSchema);
|
|
101
101
|
export const invoiceNotesResponse = arrayEnvelope(financeNoteRecordSchema);
|
|
102
|
-
export { publicBookingFinanceDocumentsSchema, publicBookingPaymentOptionsSchema, publicFinanceBookingDocumentSchema, publicPaymentOptionsQuerySchema, publicPaymentSessionSchema, publicStartPaymentSessionSchema, publicValidateVoucherSchema, publicVoucherValidationSchema, };
|
|
102
|
+
export { publicBookingFinanceDocumentsSchema, publicBookingFinancePaymentsSchema, publicBookingPaymentOptionsSchema, publicFinanceBookingDocumentSchema, publicFinanceBookingPaymentSchema, publicFinanceDocumentLookupQuerySchema, publicFinanceDocumentLookupSchema, publicPaymentOptionsQuerySchema, publicPaymentSessionSchema, publicStartPaymentSessionSchema, publicValidateVoucherSchema, publicVoucherValidationSchema, };
|
|
103
103
|
export const publicBookingPaymentOptionsResponse = singleEnvelope(publicBookingPaymentOptionsSchema);
|
|
104
104
|
export const publicBookingFinanceDocumentsResponse = singleEnvelope(publicBookingFinanceDocumentsSchema);
|
|
105
|
+
export const publicFinanceDocumentLookupResponse = singleEnvelope(publicFinanceDocumentLookupSchema);
|
|
106
|
+
export const publicBookingFinancePaymentsResponse = singleEnvelope(publicBookingFinancePaymentsSchema);
|
|
105
107
|
export const publicPaymentSessionResponse = singleEnvelope(publicPaymentSessionSchema);
|
|
106
108
|
export const publicVoucherValidationResponse = singleEnvelope(publicVoucherValidationSchema);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/finance-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"license": "FSL-1.1-Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"react": "^19.0.0",
|
|
36
36
|
"react-dom": "^19.0.0",
|
|
37
37
|
"zod": "^4.0.0",
|
|
38
|
-
"@voyantjs/finance": "0.
|
|
38
|
+
"@voyantjs/finance": "0.4.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@tanstack/react-query": "^5.96.2",
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
"typescript": "^6.0.2",
|
|
47
47
|
"vitest": "^4.1.2",
|
|
48
48
|
"zod": "^4.3.6",
|
|
49
|
-
"@voyantjs/finance": "0.
|
|
50
|
-
"@voyantjs/react": "0.
|
|
49
|
+
"@voyantjs/finance": "0.4.1",
|
|
50
|
+
"@voyantjs/react": "0.4.1",
|
|
51
51
|
"@voyantjs/voyant-typescript-config": "0.1.0"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@voyantjs/react": "0.
|
|
54
|
+
"@voyantjs/react": "0.4.1"
|
|
55
55
|
},
|
|
56
56
|
"files": [
|
|
57
57
|
"dist"
|