@voyantjs/finance-react 0.3.0 → 0.4.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.
@@ -9,7 +9,9 @@ export * from "./use-invoice-notes.js";
9
9
  export * from "./use-invoice-payment-mutation.js";
10
10
  export * from "./use-invoice-payments.js";
11
11
  export * from "./use-invoices.js";
12
+ export * from "./use-public-booking-documents.js";
12
13
  export * from "./use-public-booking-payment-options.js";
14
+ export * from "./use-public-booking-payments.js";
13
15
  export * from "./use-public-payment-session.js";
14
16
  export * from "./use-public-payment-session-mutation.js";
15
17
  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,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,iCAAiC,CAAA;AAC/C,cAAc,0CAA0C,CAAA;AACxD,cAAc,6CAA6C,CAAA;AAC3D,cAAc,oCAAoC,CAAA;AAClD,cAAc,4BAA4B,CAAA"}
@@ -9,7 +9,9 @@ export * from "./use-invoice-notes.js";
9
9
  export * from "./use-invoice-payment-mutation.js";
10
10
  export * from "./use-invoice-payments.js";
11
11
  export * from "./use-invoices.js";
12
+ export * from "./use-public-booking-documents.js";
12
13
  export * from "./use-public-booking-payment-options.js";
14
+ export * from "./use-public-booking-payments.js";
13
15
  export * from "./use-public-payment-session.js";
14
16
  export * from "./use-public-payment-session-mutation.js";
15
17
  export * from "./use-public-voucher-validation-mutation.js";
@@ -0,0 +1,29 @@
1
+ export interface UsePublicBookingDocumentsOptions {
2
+ enabled?: boolean;
3
+ }
4
+ export declare function usePublicBookingDocuments(bookingId: string | null | undefined, options?: UsePublicBookingDocumentsOptions): import("@tanstack/react-query").UseQueryResult<{
5
+ data: {
6
+ bookingId: string;
7
+ documents: {
8
+ invoiceId: string;
9
+ invoiceNumber: string;
10
+ invoiceType: "invoice" | "proforma" | "credit_note";
11
+ invoiceStatus: "draft" | "void" | "sent" | "partially_paid" | "paid" | "overdue";
12
+ currency: string;
13
+ totalCents: number;
14
+ paidCents: number;
15
+ balanceDueCents: number;
16
+ issueDate: string;
17
+ dueDate: string;
18
+ renditionId: string | null;
19
+ documentStatus: "pending" | "failed" | "missing" | "ready" | "stale";
20
+ format: "html" | "pdf" | "xml" | "json" | null;
21
+ language: string | null;
22
+ generatedAt: string | null;
23
+ fileSize: number | null;
24
+ checksum: string | null;
25
+ downloadUrl: string | null;
26
+ }[];
27
+ };
28
+ }, Error>;
29
+ //# sourceMappingURL=use-public-booking-documents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-public-booking-documents.d.ts","sourceRoot":"","sources":["../../src/hooks/use-public-booking-documents.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,gCAAgC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,gCAAqC;;;;;;;;;;;;;;;;;;;;;;;;UAS/C"}
@@ -0,0 +1,12 @@
1
+ "use client";
2
+ import { useQuery } from "@tanstack/react-query";
3
+ import { useVoyantFinanceContext } from "../provider.js";
4
+ import { getPublicBookingDocumentsQueryOptions } from "../query-options.js";
5
+ export function usePublicBookingDocuments(bookingId, options = {}) {
6
+ const { baseUrl, fetcher } = useVoyantFinanceContext();
7
+ const { enabled = true } = options;
8
+ return useQuery({
9
+ ...getPublicBookingDocumentsQueryOptions({ baseUrl, fetcher }, bookingId),
10
+ enabled: enabled && Boolean(bookingId),
11
+ });
12
+ }
@@ -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
+ }
@@ -13,7 +13,7 @@ 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_payment_schedule" | "booking_guarantee" | "booking" | "order" | "invoice";
16
+ targetType: "invoice" | "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order";
17
17
  targetId: string | null;
18
18
  bookingId: string | null;
19
19
  invoiceId: string | null;
@@ -4,7 +4,7 @@ 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_payment_schedule" | "booking_guarantee" | "booking" | "order" | "invoice";
7
+ targetType: "invoice" | "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order";
8
8
  targetId: string | null;
9
9
  bookingId: string | null;
10
10
  invoiceId: string | null;
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 { getPublicBookingPaymentOptions, getPublicPaymentSession, startPublicBookingGuaranteePaymentSession, startPublicBookingSchedulePaymentSession, validatePublicVoucher, } from "./operations.js";
3
+ export { getPublicBookingDocuments, getPublicBookingPaymentOptions, getPublicBookingPayments, 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, getPublicBookingPaymentOptionsQueryOptions, getPublicPaymentSessionQueryOptions, getSupplierPaymentsQueryOptions, } from "./query-options.js";
6
+ export { getInvoiceCreditNotesQueryOptions, getInvoiceLineItemsQueryOptions, getInvoiceNotesQueryOptions, getInvoicePaymentsQueryOptions, getInvoiceQueryOptions, getInvoicesQueryOptions, getPublicBookingDocumentsQueryOptions, getPublicBookingPaymentOptionsQueryOptions, getPublicBookingPaymentsQueryOptions, getPublicPaymentSessionQueryOptions, getSupplierPaymentsQueryOptions, } from "./query-options.js";
7
7
  export * from "./schemas.js";
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -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,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,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,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,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 { getPublicBookingPaymentOptions, getPublicPaymentSession, startPublicBookingGuaranteePaymentSession, startPublicBookingSchedulePaymentSession, validatePublicVoucher, } from "./operations.js";
3
+ export { getPublicBookingDocuments, getPublicBookingPaymentOptions, getPublicBookingPayments, 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, getPublicBookingPaymentOptionsQueryOptions, getPublicPaymentSessionQueryOptions, getSupplierPaymentsQueryOptions, } from "./query-options.js";
6
+ export { getInvoiceCreditNotesQueryOptions, getInvoiceLineItemsQueryOptions, getInvoiceNotesQueryOptions, getInvoicePaymentsQueryOptions, getInvoiceQueryOptions, getInvoicesQueryOptions, getPublicBookingDocumentsQueryOptions, getPublicBookingPaymentOptionsQueryOptions, getPublicBookingPaymentsQueryOptions, getPublicPaymentSessionQueryOptions, getSupplierPaymentsQueryOptions, } from "./query-options.js";
7
7
  export * from "./schemas.js";
@@ -1,5 +1,48 @@
1
1
  import { type FetchWithValidationOptions } from "./client.js";
2
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 getPublicBookingPayments(client: FetchWithValidationOptions, bookingId: string): Promise<{
29
+ data: {
30
+ bookingId: string;
31
+ payments: {
32
+ id: string;
33
+ invoiceId: string;
34
+ invoiceNumber: string;
35
+ invoiceType: "invoice" | "proforma" | "credit_note";
36
+ status: "pending" | "completed" | "failed" | "refunded";
37
+ paymentMethod: "credit_card" | "debit_card" | "wallet" | "voucher" | "direct_bill" | "cash" | "other" | "bank_transfer" | "cheque";
38
+ amountCents: number;
39
+ currency: string;
40
+ paymentDate: string;
41
+ referenceNumber: string | null;
42
+ notes: string | null;
43
+ }[];
44
+ };
45
+ }>;
3
46
  export declare function getPublicBookingPaymentOptions(client: FetchWithValidationOptions, bookingId: string, filters?: {
4
47
  personId?: string;
5
48
  organizationId?: string;
@@ -51,7 +94,7 @@ export declare function getPublicBookingPaymentOptions(client: FetchWithValidati
51
94
  export declare function getPublicPaymentSession(client: FetchWithValidationOptions, sessionId: string): Promise<{
52
95
  data: {
53
96
  id: string;
54
- targetType: "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order" | "invoice";
97
+ targetType: "invoice" | "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order";
55
98
  targetId: string | null;
56
99
  bookingId: string | null;
57
100
  invoiceId: string | null;
@@ -80,7 +123,7 @@ export declare function getPublicPaymentSession(client: FetchWithValidationOptio
80
123
  export declare function startPublicBookingSchedulePaymentSession(client: FetchWithValidationOptions, bookingId: string, scheduleId: string, input: PublicStartPaymentSessionInput): Promise<{
81
124
  data: {
82
125
  id: string;
83
- targetType: "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order" | "invoice";
126
+ targetType: "invoice" | "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order";
84
127
  targetId: string | null;
85
128
  bookingId: string | null;
86
129
  invoiceId: string | null;
@@ -109,7 +152,7 @@ export declare function startPublicBookingSchedulePaymentSession(client: FetchWi
109
152
  export declare function startPublicBookingGuaranteePaymentSession(client: FetchWithValidationOptions, bookingId: string, guaranteeId: string, input: PublicStartPaymentSessionInput): Promise<{
110
153
  data: {
111
154
  id: string;
112
- targetType: "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order" | "invoice";
155
+ targetType: "invoice" | "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order";
113
156
  targetId: string | null;
114
157
  bookingId: string | null;
115
158
  invoiceId: string | null;
@@ -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,EAIhC,MAAM,cAAc,CAAA;AAErB,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,EA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AAS,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"}
@@ -1,6 +1,12 @@
1
1
  "use client";
2
2
  import { fetchWithValidation, withQueryParams } from "./client.js";
3
- import { publicBookingPaymentOptionsResponse, publicPaymentSessionResponse, publicVoucherValidationResponse, } from "./schemas.js";
3
+ import { publicBookingFinanceDocumentsResponse, publicBookingFinancePaymentsResponse, 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 getPublicBookingPayments(client, bookingId) {
8
+ return fetchWithValidation(`/v1/public/finance/bookings/${bookingId}/payments`, publicBookingFinancePaymentsResponse, client);
9
+ }
4
10
  export function getPublicBookingPaymentOptions(client, bookingId, filters) {
5
11
  return fetchWithValidation(withQueryParams(`/v1/public/finance/bookings/${bookingId}/payment-options`, filters), publicBookingPaymentOptionsResponse, client);
6
12
  }
@@ -26,6 +26,8 @@ export declare const financeQueryKeys: {
26
26
  readonly supplierPayments: () => readonly ["voyant", "finance", "supplier-payments"];
27
27
  readonly supplierPaymentsList: (filters: FinanceSupplierPaymentListFilters) => readonly ["voyant", "finance", "supplier-payments", "list", FinanceSupplierPaymentListFilters];
28
28
  readonly publicCheckout: () => readonly ["voyant", "finance", "public-checkout"];
29
+ readonly publicBookingDocuments: (bookingId: string) => readonly ["voyant", "finance", "public-checkout", "booking-documents", string];
30
+ readonly publicBookingPayments: (bookingId: string) => readonly ["voyant", "finance", "public-checkout", "booking-payments", string];
29
31
  readonly publicBookingPaymentOptions: (bookingId: string, filters: PublicBookingPaymentOptionsFilters) => readonly ["voyant", "finance", "public-checkout", "booking-payment-options", string, PublicBookingPaymentOptionsFilters];
30
32
  readonly publicPaymentSession: (sessionId: string) => readonly ["voyant", "finance", "public-checkout", "payment-session", string];
31
33
  readonly publicVoucherValidation: () => readonly ["voyant", "finance", "public-checkout", "voucher-validation"];
@@ -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;;sDAIxB,MAAM,WAAW,kCAAkC;+CAE1D,MAAM;;CAIhC,CAAA"}
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;gDAEP,MAAM;sDAEA,MAAM,WAAW,kCAAkC;+CAE1D,MAAM;;CAIhC,CAAA"}
@@ -10,6 +10,8 @@ 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
+ publicBookingDocuments: (bookingId) => [...financeQueryKeys.publicCheckout(), "booking-documents", bookingId],
14
+ publicBookingPayments: (bookingId) => [...financeQueryKeys.publicCheckout(), "booking-payments", bookingId],
13
15
  publicBookingPaymentOptions: (bookingId, filters) => [...financeQueryKeys.publicCheckout(), "booking-payment-options", bookingId, filters],
14
16
  publicPaymentSession: (sessionId) => [...financeQueryKeys.publicCheckout(), "payment-session", sessionId],
15
17
  publicVoucherValidation: () => [...financeQueryKeys.publicCheckout(), "voucher-validation"],
@@ -5,7 +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";
8
9
  import type { UsePublicBookingPaymentOptionsOptions } from "./hooks/use-public-booking-payment-options.js";
10
+ import type { UsePublicBookingPaymentsOptions } from "./hooks/use-public-booking-payments.js";
9
11
  import type { UsePublicPaymentSessionOptions } from "./hooks/use-public-payment-session.js";
10
12
  import type { UseSupplierPaymentsOptions } from "./hooks/use-supplier-payments.js";
11
13
  export declare function getInvoicesQueryOptions(client: FetchWithValidationOptions, options?: UseInvoicesOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
@@ -656,10 +658,190 @@ export declare function getPublicBookingPaymentOptionsQueryOptions(client: Fetch
656
658
  [dataTagErrorSymbol]: Error;
657
659
  };
658
660
  };
661
+ export declare function getPublicBookingDocumentsQueryOptions(client: FetchWithValidationOptions, bookingId: string | null | undefined, options?: UsePublicBookingDocumentsOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
662
+ data: {
663
+ bookingId: string;
664
+ documents: {
665
+ invoiceId: string;
666
+ invoiceNumber: string;
667
+ invoiceType: "invoice" | "proforma" | "credit_note";
668
+ invoiceStatus: "draft" | "void" | "sent" | "partially_paid" | "paid" | "overdue";
669
+ currency: string;
670
+ totalCents: number;
671
+ paidCents: number;
672
+ balanceDueCents: number;
673
+ issueDate: string;
674
+ dueDate: string;
675
+ renditionId: string | null;
676
+ documentStatus: "pending" | "failed" | "missing" | "ready" | "stale";
677
+ format: "html" | "pdf" | "xml" | "json" | null;
678
+ language: string | null;
679
+ generatedAt: string | null;
680
+ fileSize: number | null;
681
+ checksum: string | null;
682
+ downloadUrl: string | null;
683
+ }[];
684
+ };
685
+ }, Error, {
686
+ data: {
687
+ bookingId: string;
688
+ documents: {
689
+ invoiceId: string;
690
+ invoiceNumber: string;
691
+ invoiceType: "invoice" | "proforma" | "credit_note";
692
+ invoiceStatus: "draft" | "void" | "sent" | "partially_paid" | "paid" | "overdue";
693
+ currency: string;
694
+ totalCents: number;
695
+ paidCents: number;
696
+ balanceDueCents: number;
697
+ issueDate: string;
698
+ dueDate: string;
699
+ renditionId: string | null;
700
+ documentStatus: "pending" | "failed" | "missing" | "ready" | "stale";
701
+ format: "html" | "pdf" | "xml" | "json" | null;
702
+ language: string | null;
703
+ generatedAt: string | null;
704
+ fileSize: number | null;
705
+ checksum: string | null;
706
+ downloadUrl: string | null;
707
+ }[];
708
+ };
709
+ }, readonly ["voyant", "finance", "public-checkout", "booking-documents", string]>, "queryFn"> & {
710
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
711
+ data: {
712
+ bookingId: string;
713
+ documents: {
714
+ invoiceId: string;
715
+ invoiceNumber: string;
716
+ invoiceType: "invoice" | "proforma" | "credit_note";
717
+ invoiceStatus: "draft" | "void" | "sent" | "partially_paid" | "paid" | "overdue";
718
+ currency: string;
719
+ totalCents: number;
720
+ paidCents: number;
721
+ balanceDueCents: number;
722
+ issueDate: string;
723
+ dueDate: string;
724
+ renditionId: string | null;
725
+ documentStatus: "pending" | "failed" | "missing" | "ready" | "stale";
726
+ format: "html" | "pdf" | "xml" | "json" | null;
727
+ language: string | null;
728
+ generatedAt: string | null;
729
+ fileSize: number | null;
730
+ checksum: string | null;
731
+ downloadUrl: string | null;
732
+ }[];
733
+ };
734
+ }, readonly ["voyant", "finance", "public-checkout", "booking-documents", string], never> | undefined;
735
+ } & {
736
+ queryKey: readonly ["voyant", "finance", "public-checkout", "booking-documents", string] & {
737
+ [dataTagSymbol]: {
738
+ data: {
739
+ bookingId: string;
740
+ documents: {
741
+ invoiceId: string;
742
+ invoiceNumber: string;
743
+ invoiceType: "invoice" | "proforma" | "credit_note";
744
+ invoiceStatus: "draft" | "void" | "sent" | "partially_paid" | "paid" | "overdue";
745
+ currency: string;
746
+ totalCents: number;
747
+ paidCents: number;
748
+ balanceDueCents: number;
749
+ issueDate: string;
750
+ dueDate: string;
751
+ renditionId: string | null;
752
+ documentStatus: "pending" | "failed" | "missing" | "ready" | "stale";
753
+ format: "html" | "pdf" | "xml" | "json" | null;
754
+ language: string | null;
755
+ generatedAt: string | null;
756
+ fileSize: number | null;
757
+ checksum: string | null;
758
+ downloadUrl: string | null;
759
+ }[];
760
+ };
761
+ };
762
+ [dataTagErrorSymbol]: Error;
763
+ };
764
+ };
765
+ export declare function getPublicBookingPaymentsQueryOptions(client: FetchWithValidationOptions, bookingId: string | null | undefined, options?: UsePublicBookingPaymentsOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
766
+ data: {
767
+ bookingId: string;
768
+ payments: {
769
+ id: string;
770
+ invoiceId: string;
771
+ invoiceNumber: string;
772
+ invoiceType: "invoice" | "proforma" | "credit_note";
773
+ status: "pending" | "completed" | "failed" | "refunded";
774
+ paymentMethod: "credit_card" | "debit_card" | "wallet" | "voucher" | "direct_bill" | "cash" | "other" | "bank_transfer" | "cheque";
775
+ amountCents: number;
776
+ currency: string;
777
+ paymentDate: string;
778
+ referenceNumber: string | null;
779
+ notes: string | null;
780
+ }[];
781
+ };
782
+ }, Error, {
783
+ data: {
784
+ bookingId: string;
785
+ payments: {
786
+ id: string;
787
+ invoiceId: string;
788
+ invoiceNumber: string;
789
+ invoiceType: "invoice" | "proforma" | "credit_note";
790
+ status: "pending" | "completed" | "failed" | "refunded";
791
+ paymentMethod: "credit_card" | "debit_card" | "wallet" | "voucher" | "direct_bill" | "cash" | "other" | "bank_transfer" | "cheque";
792
+ amountCents: number;
793
+ currency: string;
794
+ paymentDate: string;
795
+ referenceNumber: string | null;
796
+ notes: string | null;
797
+ }[];
798
+ };
799
+ }, readonly ["voyant", "finance", "public-checkout", "booking-payments", string]>, "queryFn"> & {
800
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
801
+ data: {
802
+ bookingId: string;
803
+ payments: {
804
+ id: string;
805
+ invoiceId: string;
806
+ invoiceNumber: string;
807
+ invoiceType: "invoice" | "proforma" | "credit_note";
808
+ status: "pending" | "completed" | "failed" | "refunded";
809
+ paymentMethod: "credit_card" | "debit_card" | "wallet" | "voucher" | "direct_bill" | "cash" | "other" | "bank_transfer" | "cheque";
810
+ amountCents: number;
811
+ currency: string;
812
+ paymentDate: string;
813
+ referenceNumber: string | null;
814
+ notes: string | null;
815
+ }[];
816
+ };
817
+ }, readonly ["voyant", "finance", "public-checkout", "booking-payments", string], never> | undefined;
818
+ } & {
819
+ queryKey: readonly ["voyant", "finance", "public-checkout", "booking-payments", string] & {
820
+ [dataTagSymbol]: {
821
+ data: {
822
+ bookingId: string;
823
+ payments: {
824
+ id: string;
825
+ invoiceId: string;
826
+ invoiceNumber: string;
827
+ invoiceType: "invoice" | "proforma" | "credit_note";
828
+ status: "pending" | "completed" | "failed" | "refunded";
829
+ paymentMethod: "credit_card" | "debit_card" | "wallet" | "voucher" | "direct_bill" | "cash" | "other" | "bank_transfer" | "cheque";
830
+ amountCents: number;
831
+ currency: string;
832
+ paymentDate: string;
833
+ referenceNumber: string | null;
834
+ notes: string | null;
835
+ }[];
836
+ };
837
+ };
838
+ [dataTagErrorSymbol]: Error;
839
+ };
840
+ };
659
841
  export declare function getPublicPaymentSessionQueryOptions(client: FetchWithValidationOptions, sessionId: string | null | undefined, options?: UsePublicPaymentSessionOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
660
842
  data: {
661
843
  id: string;
662
- targetType: "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order" | "invoice";
844
+ targetType: "invoice" | "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order";
663
845
  targetId: string | null;
664
846
  bookingId: string | null;
665
847
  invoiceId: string | null;
@@ -687,7 +869,7 @@ export declare function getPublicPaymentSessionQueryOptions(client: FetchWithVal
687
869
  }, Error, {
688
870
  data: {
689
871
  id: string;
690
- targetType: "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order" | "invoice";
872
+ targetType: "invoice" | "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order";
691
873
  targetId: string | null;
692
874
  bookingId: string | null;
693
875
  invoiceId: string | null;
@@ -716,7 +898,7 @@ export declare function getPublicPaymentSessionQueryOptions(client: FetchWithVal
716
898
  queryFn?: import("@tanstack/react-query").QueryFunction<{
717
899
  data: {
718
900
  id: string;
719
- targetType: "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order" | "invoice";
901
+ targetType: "invoice" | "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order";
720
902
  targetId: string | null;
721
903
  bookingId: string | null;
722
904
  invoiceId: string | null;
@@ -747,7 +929,7 @@ export declare function getPublicPaymentSessionQueryOptions(client: FetchWithVal
747
929
  [dataTagSymbol]: {
748
930
  data: {
749
931
  id: string;
750
- targetType: "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order" | "invoice";
932
+ targetType: "invoice" | "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order";
751
933
  targetId: string | null;
752
934
  bookingId: string | null;
753
935
  invoiceId: string | null;
@@ -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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AAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,gCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc/C;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"}
@@ -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 { getPublicBookingPaymentOptions, getPublicPaymentSession } from "./operations.js";
4
+ import { getPublicBookingDocuments, getPublicBookingPaymentOptions, getPublicBookingPayments, 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 = {}) {
@@ -103,6 +103,30 @@ export function getPublicBookingPaymentOptionsQueryOptions(client, bookingId, op
103
103
  },
104
104
  });
105
105
  }
106
+ export function getPublicBookingDocumentsQueryOptions(client, bookingId, options = {}) {
107
+ const { enabled: _enabled = true } = options;
108
+ return queryOptions({
109
+ queryKey: financeQueryKeys.publicBookingDocuments(bookingId ?? ""),
110
+ queryFn: async () => {
111
+ if (!bookingId) {
112
+ throw new Error("getPublicBookingDocumentsQueryOptions requires a bookingId");
113
+ }
114
+ return getPublicBookingDocuments(client, bookingId);
115
+ },
116
+ });
117
+ }
118
+ export function getPublicBookingPaymentsQueryOptions(client, bookingId, options = {}) {
119
+ const { enabled: _enabled = true } = options;
120
+ return queryOptions({
121
+ queryKey: financeQueryKeys.publicBookingPayments(bookingId ?? ""),
122
+ queryFn: async () => {
123
+ if (!bookingId) {
124
+ throw new Error("getPublicBookingPaymentsQueryOptions requires a bookingId");
125
+ }
126
+ return getPublicBookingPayments(client, bookingId);
127
+ },
128
+ });
129
+ }
106
130
  export function getPublicPaymentSessionQueryOptions(client, sessionId, options = {}) {
107
131
  const { enabled: _enabled = true } = options;
108
132
  return queryOptions({
package/dist/schemas.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { publicBookingPaymentOptionsSchema, publicPaymentOptionsQuerySchema, publicPaymentSessionSchema, publicStartPaymentSessionSchema, publicValidateVoucherSchema, publicVoucherValidationSchema } from "@voyantjs/finance";
1
+ import { publicBookingFinanceDocumentsSchema, publicBookingFinancePaymentsSchema, publicBookingPaymentOptionsSchema, publicFinanceBookingDocumentSchema, publicFinanceBookingPaymentSchema, 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 { publicBookingPaymentOptionsSchema, publicPaymentOptionsQuerySchema, publicPaymentSessionSchema, publicStartPaymentSessionSchema, publicValidateVoucherSchema, publicVoucherValidationSchema, };
277
+ export { publicBookingFinanceDocumentsSchema, publicBookingFinancePaymentsSchema, publicBookingPaymentOptionsSchema, publicFinanceBookingDocumentSchema, publicFinanceBookingPaymentSchema, publicPaymentOptionsQuerySchema, publicPaymentSessionSchema, publicStartPaymentSessionSchema, publicValidateVoucherSchema, publicVoucherValidationSchema, };
278
278
  export declare const publicBookingPaymentOptionsResponse: z.ZodObject<{
279
279
  data: z.ZodObject<{
280
280
  bookingId: z.ZodString;
@@ -348,16 +348,100 @@ export declare const publicBookingPaymentOptionsResponse: z.ZodObject<{
348
348
  }, z.core.$strip>>;
349
349
  }, z.core.$strip>;
350
350
  }, z.core.$strip>;
351
+ export declare const publicBookingFinanceDocumentsResponse: z.ZodObject<{
352
+ data: z.ZodObject<{
353
+ bookingId: z.ZodString;
354
+ documents: z.ZodArray<z.ZodObject<{
355
+ invoiceId: z.ZodString;
356
+ invoiceNumber: z.ZodString;
357
+ invoiceType: z.ZodEnum<{
358
+ invoice: "invoice";
359
+ proforma: "proforma";
360
+ credit_note: "credit_note";
361
+ }>;
362
+ invoiceStatus: z.ZodEnum<{
363
+ draft: "draft";
364
+ void: "void";
365
+ sent: "sent";
366
+ partially_paid: "partially_paid";
367
+ paid: "paid";
368
+ overdue: "overdue";
369
+ }>;
370
+ currency: z.ZodString;
371
+ totalCents: z.ZodNumber;
372
+ paidCents: z.ZodNumber;
373
+ balanceDueCents: z.ZodNumber;
374
+ issueDate: z.ZodString;
375
+ dueDate: z.ZodString;
376
+ renditionId: z.ZodNullable<z.ZodString>;
377
+ documentStatus: z.ZodEnum<{
378
+ pending: "pending";
379
+ failed: "failed";
380
+ missing: "missing";
381
+ ready: "ready";
382
+ stale: "stale";
383
+ }>;
384
+ format: z.ZodNullable<z.ZodEnum<{
385
+ html: "html";
386
+ pdf: "pdf";
387
+ xml: "xml";
388
+ json: "json";
389
+ }>>;
390
+ language: z.ZodNullable<z.ZodString>;
391
+ generatedAt: z.ZodNullable<z.ZodString>;
392
+ fileSize: z.ZodNullable<z.ZodNumber>;
393
+ checksum: z.ZodNullable<z.ZodString>;
394
+ downloadUrl: z.ZodNullable<z.ZodString>;
395
+ }, z.core.$strip>>;
396
+ }, z.core.$strip>;
397
+ }, z.core.$strip>;
398
+ export declare const publicBookingFinancePaymentsResponse: z.ZodObject<{
399
+ data: z.ZodObject<{
400
+ bookingId: z.ZodString;
401
+ payments: z.ZodArray<z.ZodObject<{
402
+ id: z.ZodString;
403
+ invoiceId: z.ZodString;
404
+ invoiceNumber: z.ZodString;
405
+ invoiceType: z.ZodEnum<{
406
+ invoice: "invoice";
407
+ proforma: "proforma";
408
+ credit_note: "credit_note";
409
+ }>;
410
+ status: z.ZodEnum<{
411
+ pending: "pending";
412
+ completed: "completed";
413
+ failed: "failed";
414
+ refunded: "refunded";
415
+ }>;
416
+ paymentMethod: z.ZodEnum<{
417
+ credit_card: "credit_card";
418
+ debit_card: "debit_card";
419
+ wallet: "wallet";
420
+ voucher: "voucher";
421
+ direct_bill: "direct_bill";
422
+ cash: "cash";
423
+ other: "other";
424
+ bank_transfer: "bank_transfer";
425
+ cheque: "cheque";
426
+ }>;
427
+ amountCents: z.ZodNumber;
428
+ currency: z.ZodString;
429
+ paymentDate: z.ZodString;
430
+ referenceNumber: z.ZodNullable<z.ZodString>;
431
+ notes: z.ZodNullable<z.ZodString>;
432
+ }, z.core.$strip>>;
433
+ }, z.core.$strip>;
434
+ }, z.core.$strip>;
351
435
  export declare const publicPaymentSessionResponse: z.ZodObject<{
352
436
  data: z.ZodObject<{
353
437
  id: z.ZodString;
354
438
  targetType: z.ZodEnum<{
439
+ invoice: "invoice";
355
440
  other: "other";
356
441
  booking_payment_schedule: "booking_payment_schedule";
357
442
  booking_guarantee: "booking_guarantee";
358
443
  booking: "booking";
359
444
  order: "order";
360
- invoice: "invoice";
361
445
  }>;
362
446
  targetId: z.ZodNullable<z.ZodString>;
363
447
  bookingId: z.ZodNullable<z.ZodString>;
@@ -428,6 +512,10 @@ export declare const publicVoucherValidationResponse: z.ZodObject<{
428
512
  }, z.core.$strip>;
429
513
  }, z.core.$strip>;
430
514
  export type PublicBookingPaymentOptionsRecord = z.infer<typeof publicBookingPaymentOptionsSchema>;
515
+ export type PublicBookingFinanceDocumentsRecord = z.infer<typeof publicBookingFinanceDocumentsSchema>;
516
+ export type PublicBookingFinancePaymentsRecord = z.infer<typeof publicBookingFinancePaymentsSchema>;
517
+ export type PublicFinanceBookingDocumentRecord = z.infer<typeof publicFinanceBookingDocumentSchema>;
518
+ export type PublicFinanceBookingPaymentRecord = z.infer<typeof publicFinanceBookingPaymentSchema>;
431
519
  export type PublicPaymentSessionRecord = z.infer<typeof publicPaymentSessionSchema>;
432
520
  export type PublicStartPaymentSessionInput = z.input<typeof publicStartPaymentSessionSchema>;
433
521
  export type PublicValidateVoucherInput = z.input<typeof publicValidateVoucherSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,EACjC,+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,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AC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAA;AACjG,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,mCAAmC,CAC3C,CAAA;AACD,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAA;AACnG,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAA;AACnG,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAA;AACjG,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAA;AACnF,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA;AAC5F,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA;AACpF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA"}
package/dist/schemas.js CHANGED
@@ -1,4 +1,4 @@
1
- import { publicBookingPaymentOptionsSchema, publicPaymentOptionsQuerySchema, publicPaymentSessionSchema, publicStartPaymentSessionSchema, publicValidateVoucherSchema, publicVoucherValidationSchema, } from "@voyantjs/finance";
1
+ import { publicBookingFinanceDocumentsSchema, publicBookingFinancePaymentsSchema, publicBookingPaymentOptionsSchema, publicFinanceBookingDocumentSchema, publicFinanceBookingPaymentSchema, 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,7 +99,9 @@ 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 { publicBookingPaymentOptionsSchema, publicPaymentOptionsQuerySchema, publicPaymentSessionSchema, publicStartPaymentSessionSchema, publicValidateVoucherSchema, publicVoucherValidationSchema, };
102
+ export { publicBookingFinanceDocumentsSchema, publicBookingFinancePaymentsSchema, publicBookingPaymentOptionsSchema, publicFinanceBookingDocumentSchema, publicFinanceBookingPaymentSchema, publicPaymentOptionsQuerySchema, publicPaymentSessionSchema, publicStartPaymentSessionSchema, publicValidateVoucherSchema, publicVoucherValidationSchema, };
103
103
  export const publicBookingPaymentOptionsResponse = singleEnvelope(publicBookingPaymentOptionsSchema);
104
+ export const publicBookingFinanceDocumentsResponse = singleEnvelope(publicBookingFinanceDocumentsSchema);
105
+ export const publicBookingFinancePaymentsResponse = singleEnvelope(publicBookingFinancePaymentsSchema);
104
106
  export const publicPaymentSessionResponse = singleEnvelope(publicPaymentSessionSchema);
105
107
  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.0",
3
+ "version": "0.4.0",
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.3.0"
38
+ "@voyantjs/finance": "0.4.0"
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.3.0",
50
- "@voyantjs/react": "0.3.0",
49
+ "@voyantjs/finance": "0.4.0",
50
+ "@voyantjs/react": "0.4.0",
51
51
  "@voyantjs/voyant-typescript-config": "0.1.0"
52
52
  },
53
53
  "dependencies": {
54
- "@voyantjs/react": "0.3.0"
54
+ "@voyantjs/react": "0.4.0"
55
55
  },
56
56
  "files": [
57
57
  "dist"