@voyantjs/finance-react 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +109 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +20 -0
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +4 -0
- package/dist/hooks/use-public-booking-payment-options.d.ts +47 -0
- package/dist/hooks/use-public-booking-payment-options.d.ts.map +1 -0
- package/dist/hooks/use-public-booking-payment-options.js +12 -0
- package/dist/hooks/use-public-payment-session-mutation.d.ts +42 -0
- package/dist/hooks/use-public-payment-session-mutation.d.ts.map +1 -0
- package/dist/hooks/use-public-payment-session-mutation.js +33 -0
- package/dist/hooks/use-public-payment-session.d.ts +33 -0
- package/dist/hooks/use-public-payment-session.d.ts.map +1 -0
- package/dist/hooks/use-public-payment-session.js +12 -0
- package/dist/hooks/use-public-voucher-validation-mutation.d.ts +23 -0
- package/dist/hooks/use-public-voucher-validation-mutation.d.ts.map +1 -0
- package/dist/hooks/use-public-voucher-validation-mutation.js +17 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/operations.d.ts +154 -0
- package/dist/operations.d.ts.map +1 -0
- package/dist/operations.js +18 -0
- package/dist/query-keys.d.ts +11 -0
- package/dist/query-keys.d.ts.map +1 -1
- package/dist/query-keys.js +4 -0
- package/dist/query-options.d.ts +294 -0
- package/dist/query-options.d.ts.map +1 -1
- package/dist/query-options.js +25 -0
- package/dist/schemas.d.ts +159 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +5 -0
- package/package.json +40 -48
package/dist/query-keys.d.ts
CHANGED
|
@@ -7,6 +7,13 @@ export interface FinanceSupplierPaymentListFilters {
|
|
|
7
7
|
limit?: number | undefined;
|
|
8
8
|
offset?: number | undefined;
|
|
9
9
|
}
|
|
10
|
+
export interface PublicBookingPaymentOptionsFilters {
|
|
11
|
+
personId?: string | undefined;
|
|
12
|
+
organizationId?: string | undefined;
|
|
13
|
+
provider?: string | undefined;
|
|
14
|
+
instrumentType?: string | undefined;
|
|
15
|
+
includeInactive?: boolean | undefined;
|
|
16
|
+
}
|
|
10
17
|
export declare const financeQueryKeys: {
|
|
11
18
|
readonly all: readonly ["voyant", "finance"];
|
|
12
19
|
readonly invoices: () => readonly ["voyant", "finance", "invoices"];
|
|
@@ -18,5 +25,9 @@ export declare const financeQueryKeys: {
|
|
|
18
25
|
readonly notes: (invoiceId: string) => readonly ["voyant", "finance", "invoices", "detail", string, "notes"];
|
|
19
26
|
readonly supplierPayments: () => readonly ["voyant", "finance", "supplier-payments"];
|
|
20
27
|
readonly supplierPaymentsList: (filters: FinanceSupplierPaymentListFilters) => readonly ["voyant", "finance", "supplier-payments", "list", FinanceSupplierPaymentListFilters];
|
|
28
|
+
readonly publicCheckout: () => readonly ["voyant", "finance", "public-checkout"];
|
|
29
|
+
readonly publicBookingPaymentOptions: (bookingId: string, filters: PublicBookingPaymentOptionsFilters) => readonly ["voyant", "finance", "public-checkout", "booking-payment-options", string, PublicBookingPaymentOptionsFilters];
|
|
30
|
+
readonly publicPaymentSession: (sessionId: string) => readonly ["voyant", "finance", "public-checkout", "payment-session", string];
|
|
31
|
+
readonly publicVoucherValidation: () => readonly ["voyant", "finance", "public-checkout", "voucher-validation"];
|
|
21
32
|
};
|
|
22
33
|
//# sourceMappingURL=query-keys.d.ts.map
|
package/dist/query-keys.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-keys.d.ts","sourceRoot":"","sources":["../src/query-keys.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,yBAAyB;IACxC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B;AAED,MAAM,WAAW,iCAAiC;IAChD,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B;AAED,eAAO,MAAM,gBAAgB;;;qCAIH,yBAAyB;2BAEnC,MAAM;oCACG,MAAM;mCACP,MAAM;sCACH,MAAM;gCAEZ,MAAM;;6CAGO,iCAAiC
|
|
1
|
+
{"version":3,"file":"query-keys.d.ts","sourceRoot":"","sources":["../src/query-keys.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,yBAAyB;IACxC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B;AAED,MAAM,WAAW,iCAAiC;IAChD,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B;AAED,MAAM,WAAW,kCAAkC;IACjD,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CACtC;AAED,eAAO,MAAM,gBAAgB;;;qCAIH,yBAAyB;2BAEnC,MAAM;oCACG,MAAM;mCACP,MAAM;sCACH,MAAM;gCAEZ,MAAM;;6CAGO,iCAAiC;;sDAIxB,MAAM,WAAW,kCAAkC;+CAE1D,MAAM;;CAIhC,CAAA"}
|
package/dist/query-keys.js
CHANGED
|
@@ -9,4 +9,8 @@ export const financeQueryKeys = {
|
|
|
9
9
|
notes: (invoiceId) => [...financeQueryKeys.invoice(invoiceId), "notes"],
|
|
10
10
|
supplierPayments: () => [...financeQueryKeys.all, "supplier-payments"],
|
|
11
11
|
supplierPaymentsList: (filters) => [...financeQueryKeys.supplierPayments(), "list", filters],
|
|
12
|
+
publicCheckout: () => [...financeQueryKeys.all, "public-checkout"],
|
|
13
|
+
publicBookingPaymentOptions: (bookingId, filters) => [...financeQueryKeys.publicCheckout(), "booking-payment-options", bookingId, filters],
|
|
14
|
+
publicPaymentSession: (sessionId) => [...financeQueryKeys.publicCheckout(), "payment-session", sessionId],
|
|
15
|
+
publicVoucherValidation: () => [...financeQueryKeys.publicCheckout(), "voucher-validation"],
|
|
12
16
|
};
|
package/dist/query-options.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ 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 { UsePublicBookingPaymentOptionsOptions } from "./hooks/use-public-booking-payment-options.js";
|
|
9
|
+
import type { UsePublicPaymentSessionOptions } from "./hooks/use-public-payment-session.js";
|
|
8
10
|
import type { UseSupplierPaymentsOptions } from "./hooks/use-supplier-payments.js";
|
|
9
11
|
export declare function getInvoicesQueryOptions(client: FetchWithValidationOptions, options?: UseInvoicesOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
|
|
10
12
|
data: {
|
|
@@ -482,4 +484,296 @@ export declare function getInvoiceNotesQueryOptions(client: FetchWithValidationO
|
|
|
482
484
|
[dataTagErrorSymbol]: Error;
|
|
483
485
|
};
|
|
484
486
|
};
|
|
487
|
+
export declare function getPublicBookingPaymentOptionsQueryOptions(client: FetchWithValidationOptions, bookingId: string | null | undefined, options?: UsePublicBookingPaymentOptionsOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
|
|
488
|
+
data: {
|
|
489
|
+
bookingId: string;
|
|
490
|
+
accounts: {
|
|
491
|
+
id: string;
|
|
492
|
+
label: string;
|
|
493
|
+
provider: string | null;
|
|
494
|
+
instrumentType: "credit_card" | "debit_card" | "bank_account" | "wallet" | "voucher" | "direct_bill" | "cash" | "other";
|
|
495
|
+
status: "active" | "inactive" | "expired" | "revoked" | "failed_verification";
|
|
496
|
+
brand: string | null;
|
|
497
|
+
last4: string | null;
|
|
498
|
+
expiryMonth: number | null;
|
|
499
|
+
expiryYear: number | null;
|
|
500
|
+
isDefault: boolean;
|
|
501
|
+
}[];
|
|
502
|
+
schedules: {
|
|
503
|
+
id: string;
|
|
504
|
+
scheduleType: "other" | "deposit" | "installment" | "balance" | "hold";
|
|
505
|
+
status: "pending" | "paid" | "expired" | "due" | "waived" | "cancelled";
|
|
506
|
+
dueDate: string;
|
|
507
|
+
currency: string;
|
|
508
|
+
amountCents: number;
|
|
509
|
+
notes: string | null;
|
|
510
|
+
}[];
|
|
511
|
+
guarantees: {
|
|
512
|
+
id: string;
|
|
513
|
+
bookingPaymentScheduleId: string | null;
|
|
514
|
+
guaranteeType: string;
|
|
515
|
+
status: string;
|
|
516
|
+
currency: string | null;
|
|
517
|
+
amountCents: number | null;
|
|
518
|
+
provider: string | null;
|
|
519
|
+
referenceNumber: string | null;
|
|
520
|
+
expiresAt: string | null;
|
|
521
|
+
notes: string | null;
|
|
522
|
+
}[];
|
|
523
|
+
recommendedTarget: {
|
|
524
|
+
targetType: "booking_payment_schedule" | "booking_guarantee" | null;
|
|
525
|
+
targetId: string | null;
|
|
526
|
+
} | null;
|
|
527
|
+
};
|
|
528
|
+
}, Error, {
|
|
529
|
+
data: {
|
|
530
|
+
bookingId: string;
|
|
531
|
+
accounts: {
|
|
532
|
+
id: string;
|
|
533
|
+
label: string;
|
|
534
|
+
provider: string | null;
|
|
535
|
+
instrumentType: "credit_card" | "debit_card" | "bank_account" | "wallet" | "voucher" | "direct_bill" | "cash" | "other";
|
|
536
|
+
status: "active" | "inactive" | "expired" | "revoked" | "failed_verification";
|
|
537
|
+
brand: string | null;
|
|
538
|
+
last4: string | null;
|
|
539
|
+
expiryMonth: number | null;
|
|
540
|
+
expiryYear: number | null;
|
|
541
|
+
isDefault: boolean;
|
|
542
|
+
}[];
|
|
543
|
+
schedules: {
|
|
544
|
+
id: string;
|
|
545
|
+
scheduleType: "other" | "deposit" | "installment" | "balance" | "hold";
|
|
546
|
+
status: "pending" | "paid" | "expired" | "due" | "waived" | "cancelled";
|
|
547
|
+
dueDate: string;
|
|
548
|
+
currency: string;
|
|
549
|
+
amountCents: number;
|
|
550
|
+
notes: string | null;
|
|
551
|
+
}[];
|
|
552
|
+
guarantees: {
|
|
553
|
+
id: string;
|
|
554
|
+
bookingPaymentScheduleId: string | null;
|
|
555
|
+
guaranteeType: string;
|
|
556
|
+
status: string;
|
|
557
|
+
currency: string | null;
|
|
558
|
+
amountCents: number | null;
|
|
559
|
+
provider: string | null;
|
|
560
|
+
referenceNumber: string | null;
|
|
561
|
+
expiresAt: string | null;
|
|
562
|
+
notes: string | null;
|
|
563
|
+
}[];
|
|
564
|
+
recommendedTarget: {
|
|
565
|
+
targetType: "booking_payment_schedule" | "booking_guarantee" | null;
|
|
566
|
+
targetId: string | null;
|
|
567
|
+
} | null;
|
|
568
|
+
};
|
|
569
|
+
}, readonly ["voyant", "finance", "public-checkout", "booking-payment-options", string, import("./query-keys.js").PublicBookingPaymentOptionsFilters]>, "queryFn"> & {
|
|
570
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<{
|
|
571
|
+
data: {
|
|
572
|
+
bookingId: string;
|
|
573
|
+
accounts: {
|
|
574
|
+
id: string;
|
|
575
|
+
label: string;
|
|
576
|
+
provider: string | null;
|
|
577
|
+
instrumentType: "credit_card" | "debit_card" | "bank_account" | "wallet" | "voucher" | "direct_bill" | "cash" | "other";
|
|
578
|
+
status: "active" | "inactive" | "expired" | "revoked" | "failed_verification";
|
|
579
|
+
brand: string | null;
|
|
580
|
+
last4: string | null;
|
|
581
|
+
expiryMonth: number | null;
|
|
582
|
+
expiryYear: number | null;
|
|
583
|
+
isDefault: boolean;
|
|
584
|
+
}[];
|
|
585
|
+
schedules: {
|
|
586
|
+
id: string;
|
|
587
|
+
scheduleType: "other" | "deposit" | "installment" | "balance" | "hold";
|
|
588
|
+
status: "pending" | "paid" | "expired" | "due" | "waived" | "cancelled";
|
|
589
|
+
dueDate: string;
|
|
590
|
+
currency: string;
|
|
591
|
+
amountCents: number;
|
|
592
|
+
notes: string | null;
|
|
593
|
+
}[];
|
|
594
|
+
guarantees: {
|
|
595
|
+
id: string;
|
|
596
|
+
bookingPaymentScheduleId: string | null;
|
|
597
|
+
guaranteeType: string;
|
|
598
|
+
status: string;
|
|
599
|
+
currency: string | null;
|
|
600
|
+
amountCents: number | null;
|
|
601
|
+
provider: string | null;
|
|
602
|
+
referenceNumber: string | null;
|
|
603
|
+
expiresAt: string | null;
|
|
604
|
+
notes: string | null;
|
|
605
|
+
}[];
|
|
606
|
+
recommendedTarget: {
|
|
607
|
+
targetType: "booking_payment_schedule" | "booking_guarantee" | null;
|
|
608
|
+
targetId: string | null;
|
|
609
|
+
} | null;
|
|
610
|
+
};
|
|
611
|
+
}, readonly ["voyant", "finance", "public-checkout", "booking-payment-options", string, import("./query-keys.js").PublicBookingPaymentOptionsFilters], never> | undefined;
|
|
612
|
+
} & {
|
|
613
|
+
queryKey: readonly ["voyant", "finance", "public-checkout", "booking-payment-options", string, import("./query-keys.js").PublicBookingPaymentOptionsFilters] & {
|
|
614
|
+
[dataTagSymbol]: {
|
|
615
|
+
data: {
|
|
616
|
+
bookingId: string;
|
|
617
|
+
accounts: {
|
|
618
|
+
id: string;
|
|
619
|
+
label: string;
|
|
620
|
+
provider: string | null;
|
|
621
|
+
instrumentType: "credit_card" | "debit_card" | "bank_account" | "wallet" | "voucher" | "direct_bill" | "cash" | "other";
|
|
622
|
+
status: "active" | "inactive" | "expired" | "revoked" | "failed_verification";
|
|
623
|
+
brand: string | null;
|
|
624
|
+
last4: string | null;
|
|
625
|
+
expiryMonth: number | null;
|
|
626
|
+
expiryYear: number | null;
|
|
627
|
+
isDefault: boolean;
|
|
628
|
+
}[];
|
|
629
|
+
schedules: {
|
|
630
|
+
id: string;
|
|
631
|
+
scheduleType: "other" | "deposit" | "installment" | "balance" | "hold";
|
|
632
|
+
status: "pending" | "paid" | "expired" | "due" | "waived" | "cancelled";
|
|
633
|
+
dueDate: string;
|
|
634
|
+
currency: string;
|
|
635
|
+
amountCents: number;
|
|
636
|
+
notes: string | null;
|
|
637
|
+
}[];
|
|
638
|
+
guarantees: {
|
|
639
|
+
id: string;
|
|
640
|
+
bookingPaymentScheduleId: string | null;
|
|
641
|
+
guaranteeType: string;
|
|
642
|
+
status: string;
|
|
643
|
+
currency: string | null;
|
|
644
|
+
amountCents: number | null;
|
|
645
|
+
provider: string | null;
|
|
646
|
+
referenceNumber: string | null;
|
|
647
|
+
expiresAt: string | null;
|
|
648
|
+
notes: string | null;
|
|
649
|
+
}[];
|
|
650
|
+
recommendedTarget: {
|
|
651
|
+
targetType: "booking_payment_schedule" | "booking_guarantee" | null;
|
|
652
|
+
targetId: string | null;
|
|
653
|
+
} | null;
|
|
654
|
+
};
|
|
655
|
+
};
|
|
656
|
+
[dataTagErrorSymbol]: Error;
|
|
657
|
+
};
|
|
658
|
+
};
|
|
659
|
+
export declare function getPublicPaymentSessionQueryOptions(client: FetchWithValidationOptions, sessionId: string | null | undefined, options?: UsePublicPaymentSessionOptions): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
|
|
660
|
+
data: {
|
|
661
|
+
id: string;
|
|
662
|
+
targetType: "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order" | "invoice";
|
|
663
|
+
targetId: string | null;
|
|
664
|
+
bookingId: string | null;
|
|
665
|
+
invoiceId: string | null;
|
|
666
|
+
bookingPaymentScheduleId: string | null;
|
|
667
|
+
bookingGuaranteeId: string | null;
|
|
668
|
+
status: "pending" | "failed" | "paid" | "expired" | "cancelled" | "requires_redirect" | "processing" | "authorized";
|
|
669
|
+
provider: string | null;
|
|
670
|
+
providerSessionId: string | null;
|
|
671
|
+
providerPaymentId: string | null;
|
|
672
|
+
externalReference: string | null;
|
|
673
|
+
clientReference: string | null;
|
|
674
|
+
currency: string;
|
|
675
|
+
amountCents: number;
|
|
676
|
+
paymentMethod: "credit_card" | "debit_card" | "wallet" | "voucher" | "direct_bill" | "cash" | "other" | "bank_transfer" | "cheque" | null;
|
|
677
|
+
payerEmail: string | null;
|
|
678
|
+
payerName: string | null;
|
|
679
|
+
redirectUrl: string | null;
|
|
680
|
+
returnUrl: string | null;
|
|
681
|
+
cancelUrl: string | null;
|
|
682
|
+
expiresAt: string | null;
|
|
683
|
+
completedAt: string | null;
|
|
684
|
+
failureCode: string | null;
|
|
685
|
+
failureMessage: string | null;
|
|
686
|
+
};
|
|
687
|
+
}, Error, {
|
|
688
|
+
data: {
|
|
689
|
+
id: string;
|
|
690
|
+
targetType: "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order" | "invoice";
|
|
691
|
+
targetId: string | null;
|
|
692
|
+
bookingId: string | null;
|
|
693
|
+
invoiceId: string | null;
|
|
694
|
+
bookingPaymentScheduleId: string | null;
|
|
695
|
+
bookingGuaranteeId: string | null;
|
|
696
|
+
status: "pending" | "failed" | "paid" | "expired" | "cancelled" | "requires_redirect" | "processing" | "authorized";
|
|
697
|
+
provider: string | null;
|
|
698
|
+
providerSessionId: string | null;
|
|
699
|
+
providerPaymentId: string | null;
|
|
700
|
+
externalReference: string | null;
|
|
701
|
+
clientReference: string | null;
|
|
702
|
+
currency: string;
|
|
703
|
+
amountCents: number;
|
|
704
|
+
paymentMethod: "credit_card" | "debit_card" | "wallet" | "voucher" | "direct_bill" | "cash" | "other" | "bank_transfer" | "cheque" | null;
|
|
705
|
+
payerEmail: string | null;
|
|
706
|
+
payerName: string | null;
|
|
707
|
+
redirectUrl: string | null;
|
|
708
|
+
returnUrl: string | null;
|
|
709
|
+
cancelUrl: string | null;
|
|
710
|
+
expiresAt: string | null;
|
|
711
|
+
completedAt: string | null;
|
|
712
|
+
failureCode: string | null;
|
|
713
|
+
failureMessage: string | null;
|
|
714
|
+
};
|
|
715
|
+
}, readonly ["voyant", "finance", "public-checkout", "payment-session", string]>, "queryFn"> & {
|
|
716
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<{
|
|
717
|
+
data: {
|
|
718
|
+
id: string;
|
|
719
|
+
targetType: "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order" | "invoice";
|
|
720
|
+
targetId: string | null;
|
|
721
|
+
bookingId: string | null;
|
|
722
|
+
invoiceId: string | null;
|
|
723
|
+
bookingPaymentScheduleId: string | null;
|
|
724
|
+
bookingGuaranteeId: string | null;
|
|
725
|
+
status: "pending" | "failed" | "paid" | "expired" | "cancelled" | "requires_redirect" | "processing" | "authorized";
|
|
726
|
+
provider: string | null;
|
|
727
|
+
providerSessionId: string | null;
|
|
728
|
+
providerPaymentId: string | null;
|
|
729
|
+
externalReference: string | null;
|
|
730
|
+
clientReference: string | null;
|
|
731
|
+
currency: string;
|
|
732
|
+
amountCents: number;
|
|
733
|
+
paymentMethod: "credit_card" | "debit_card" | "wallet" | "voucher" | "direct_bill" | "cash" | "other" | "bank_transfer" | "cheque" | null;
|
|
734
|
+
payerEmail: string | null;
|
|
735
|
+
payerName: string | null;
|
|
736
|
+
redirectUrl: string | null;
|
|
737
|
+
returnUrl: string | null;
|
|
738
|
+
cancelUrl: string | null;
|
|
739
|
+
expiresAt: string | null;
|
|
740
|
+
completedAt: string | null;
|
|
741
|
+
failureCode: string | null;
|
|
742
|
+
failureMessage: string | null;
|
|
743
|
+
};
|
|
744
|
+
}, readonly ["voyant", "finance", "public-checkout", "payment-session", string], never> | undefined;
|
|
745
|
+
} & {
|
|
746
|
+
queryKey: readonly ["voyant", "finance", "public-checkout", "payment-session", string] & {
|
|
747
|
+
[dataTagSymbol]: {
|
|
748
|
+
data: {
|
|
749
|
+
id: string;
|
|
750
|
+
targetType: "other" | "booking_payment_schedule" | "booking_guarantee" | "booking" | "order" | "invoice";
|
|
751
|
+
targetId: string | null;
|
|
752
|
+
bookingId: string | null;
|
|
753
|
+
invoiceId: string | null;
|
|
754
|
+
bookingPaymentScheduleId: string | null;
|
|
755
|
+
bookingGuaranteeId: string | null;
|
|
756
|
+
status: "pending" | "failed" | "paid" | "expired" | "cancelled" | "requires_redirect" | "processing" | "authorized";
|
|
757
|
+
provider: string | null;
|
|
758
|
+
providerSessionId: string | null;
|
|
759
|
+
providerPaymentId: string | null;
|
|
760
|
+
externalReference: string | null;
|
|
761
|
+
clientReference: string | null;
|
|
762
|
+
currency: string;
|
|
763
|
+
amountCents: number;
|
|
764
|
+
paymentMethod: "credit_card" | "debit_card" | "wallet" | "voucher" | "direct_bill" | "cash" | "other" | "bank_transfer" | "cheque" | null;
|
|
765
|
+
payerEmail: string | null;
|
|
766
|
+
payerName: string | null;
|
|
767
|
+
redirectUrl: string | null;
|
|
768
|
+
returnUrl: string | null;
|
|
769
|
+
cancelUrl: string | null;
|
|
770
|
+
expiresAt: string | null;
|
|
771
|
+
completedAt: string | null;
|
|
772
|
+
failureCode: string | null;
|
|
773
|
+
failureMessage: string | null;
|
|
774
|
+
};
|
|
775
|
+
};
|
|
776
|
+
[dataTagErrorSymbol]: Error;
|
|
777
|
+
};
|
|
778
|
+
};
|
|
485
779
|
//# sourceMappingURL=query-options.d.ts.map
|
|
@@ -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,qCAA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E,qCAA0C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcpD;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,6 +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
5
|
import { financeQueryKeys } from "./query-keys.js";
|
|
5
6
|
import { invoiceCreditNotesResponse, invoiceLineItemsResponse, invoiceListResponse, invoiceNotesResponse, invoicePaymentsResponse, invoiceSingleResponse, supplierPaymentListResponse, } from "./schemas.js";
|
|
6
7
|
export function getInvoicesQueryOptions(client, options = {}) {
|
|
@@ -90,3 +91,27 @@ export function getInvoiceNotesQueryOptions(client, invoiceId, options = {}) {
|
|
|
90
91
|
},
|
|
91
92
|
});
|
|
92
93
|
}
|
|
94
|
+
export function getPublicBookingPaymentOptionsQueryOptions(client, bookingId, options = {}) {
|
|
95
|
+
const { enabled: _enabled = true, ...filters } = options;
|
|
96
|
+
return queryOptions({
|
|
97
|
+
queryKey: financeQueryKeys.publicBookingPaymentOptions(bookingId ?? "", filters),
|
|
98
|
+
queryFn: async () => {
|
|
99
|
+
if (!bookingId) {
|
|
100
|
+
throw new Error("getPublicBookingPaymentOptionsQueryOptions requires a bookingId");
|
|
101
|
+
}
|
|
102
|
+
return getPublicBookingPaymentOptions(client, bookingId, filters);
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
export function getPublicPaymentSessionQueryOptions(client, sessionId, options = {}) {
|
|
107
|
+
const { enabled: _enabled = true } = options;
|
|
108
|
+
return queryOptions({
|
|
109
|
+
queryKey: financeQueryKeys.publicPaymentSession(sessionId ?? ""),
|
|
110
|
+
queryFn: async () => {
|
|
111
|
+
if (!sessionId) {
|
|
112
|
+
throw new Error("getPublicPaymentSessionQueryOptions requires a sessionId");
|
|
113
|
+
}
|
|
114
|
+
return getPublicPaymentSession(client, sessionId);
|
|
115
|
+
},
|
|
116
|
+
});
|
|
117
|
+
}
|
package/dist/schemas.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { publicBookingPaymentOptionsSchema, publicPaymentOptionsQuerySchema, publicPaymentSessionSchema, publicStartPaymentSessionSchema, publicValidateVoucherSchema, publicVoucherValidationSchema } from "@voyantjs/finance";
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
export declare const paginatedEnvelope: <T extends z.ZodTypeAny>(item: T) => z.ZodObject<{
|
|
3
4
|
data: z.ZodArray<T>;
|
|
@@ -273,4 +274,162 @@ export declare const invoiceNotesResponse: z.ZodObject<{
|
|
|
273
274
|
createdAt: z.ZodString;
|
|
274
275
|
}, z.core.$strip>>;
|
|
275
276
|
}, z.core.$strip>;
|
|
277
|
+
export { publicBookingPaymentOptionsSchema, publicPaymentOptionsQuerySchema, publicPaymentSessionSchema, publicStartPaymentSessionSchema, publicValidateVoucherSchema, publicVoucherValidationSchema, };
|
|
278
|
+
export declare const publicBookingPaymentOptionsResponse: z.ZodObject<{
|
|
279
|
+
data: z.ZodObject<{
|
|
280
|
+
bookingId: z.ZodString;
|
|
281
|
+
accounts: z.ZodArray<z.ZodObject<{
|
|
282
|
+
id: z.ZodString;
|
|
283
|
+
label: z.ZodString;
|
|
284
|
+
provider: z.ZodNullable<z.ZodString>;
|
|
285
|
+
instrumentType: z.ZodEnum<{
|
|
286
|
+
credit_card: "credit_card";
|
|
287
|
+
debit_card: "debit_card";
|
|
288
|
+
bank_account: "bank_account";
|
|
289
|
+
wallet: "wallet";
|
|
290
|
+
voucher: "voucher";
|
|
291
|
+
direct_bill: "direct_bill";
|
|
292
|
+
cash: "cash";
|
|
293
|
+
other: "other";
|
|
294
|
+
}>;
|
|
295
|
+
status: z.ZodEnum<{
|
|
296
|
+
active: "active";
|
|
297
|
+
inactive: "inactive";
|
|
298
|
+
expired: "expired";
|
|
299
|
+
revoked: "revoked";
|
|
300
|
+
failed_verification: "failed_verification";
|
|
301
|
+
}>;
|
|
302
|
+
brand: z.ZodNullable<z.ZodString>;
|
|
303
|
+
last4: z.ZodNullable<z.ZodString>;
|
|
304
|
+
expiryMonth: z.ZodNullable<z.ZodNumber>;
|
|
305
|
+
expiryYear: z.ZodNullable<z.ZodNumber>;
|
|
306
|
+
isDefault: z.ZodBoolean;
|
|
307
|
+
}, z.core.$strip>>;
|
|
308
|
+
schedules: z.ZodArray<z.ZodObject<{
|
|
309
|
+
id: z.ZodString;
|
|
310
|
+
scheduleType: z.ZodEnum<{
|
|
311
|
+
other: "other";
|
|
312
|
+
deposit: "deposit";
|
|
313
|
+
installment: "installment";
|
|
314
|
+
balance: "balance";
|
|
315
|
+
hold: "hold";
|
|
316
|
+
}>;
|
|
317
|
+
status: z.ZodEnum<{
|
|
318
|
+
pending: "pending";
|
|
319
|
+
paid: "paid";
|
|
320
|
+
expired: "expired";
|
|
321
|
+
due: "due";
|
|
322
|
+
waived: "waived";
|
|
323
|
+
cancelled: "cancelled";
|
|
324
|
+
}>;
|
|
325
|
+
dueDate: z.ZodString;
|
|
326
|
+
currency: z.ZodString;
|
|
327
|
+
amountCents: z.ZodNumber;
|
|
328
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
329
|
+
}, z.core.$strip>>;
|
|
330
|
+
guarantees: z.ZodArray<z.ZodObject<{
|
|
331
|
+
id: z.ZodString;
|
|
332
|
+
bookingPaymentScheduleId: z.ZodNullable<z.ZodString>;
|
|
333
|
+
guaranteeType: z.ZodString;
|
|
334
|
+
status: z.ZodString;
|
|
335
|
+
currency: z.ZodNullable<z.ZodString>;
|
|
336
|
+
amountCents: z.ZodNullable<z.ZodNumber>;
|
|
337
|
+
provider: z.ZodNullable<z.ZodString>;
|
|
338
|
+
referenceNumber: z.ZodNullable<z.ZodString>;
|
|
339
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
340
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
341
|
+
}, z.core.$strip>>;
|
|
342
|
+
recommendedTarget: z.ZodNullable<z.ZodObject<{
|
|
343
|
+
targetType: z.ZodNullable<z.ZodEnum<{
|
|
344
|
+
booking_payment_schedule: "booking_payment_schedule";
|
|
345
|
+
booking_guarantee: "booking_guarantee";
|
|
346
|
+
}>>;
|
|
347
|
+
targetId: z.ZodNullable<z.ZodString>;
|
|
348
|
+
}, z.core.$strip>>;
|
|
349
|
+
}, z.core.$strip>;
|
|
350
|
+
}, z.core.$strip>;
|
|
351
|
+
export declare const publicPaymentSessionResponse: z.ZodObject<{
|
|
352
|
+
data: z.ZodObject<{
|
|
353
|
+
id: z.ZodString;
|
|
354
|
+
targetType: z.ZodEnum<{
|
|
355
|
+
other: "other";
|
|
356
|
+
booking_payment_schedule: "booking_payment_schedule";
|
|
357
|
+
booking_guarantee: "booking_guarantee";
|
|
358
|
+
booking: "booking";
|
|
359
|
+
order: "order";
|
|
360
|
+
invoice: "invoice";
|
|
361
|
+
}>;
|
|
362
|
+
targetId: z.ZodNullable<z.ZodString>;
|
|
363
|
+
bookingId: z.ZodNullable<z.ZodString>;
|
|
364
|
+
invoiceId: z.ZodNullable<z.ZodString>;
|
|
365
|
+
bookingPaymentScheduleId: z.ZodNullable<z.ZodString>;
|
|
366
|
+
bookingGuaranteeId: z.ZodNullable<z.ZodString>;
|
|
367
|
+
status: z.ZodEnum<{
|
|
368
|
+
pending: "pending";
|
|
369
|
+
failed: "failed";
|
|
370
|
+
paid: "paid";
|
|
371
|
+
expired: "expired";
|
|
372
|
+
cancelled: "cancelled";
|
|
373
|
+
requires_redirect: "requires_redirect";
|
|
374
|
+
processing: "processing";
|
|
375
|
+
authorized: "authorized";
|
|
376
|
+
}>;
|
|
377
|
+
provider: z.ZodNullable<z.ZodString>;
|
|
378
|
+
providerSessionId: z.ZodNullable<z.ZodString>;
|
|
379
|
+
providerPaymentId: z.ZodNullable<z.ZodString>;
|
|
380
|
+
externalReference: z.ZodNullable<z.ZodString>;
|
|
381
|
+
clientReference: z.ZodNullable<z.ZodString>;
|
|
382
|
+
currency: z.ZodString;
|
|
383
|
+
amountCents: z.ZodNumber;
|
|
384
|
+
paymentMethod: z.ZodNullable<z.ZodEnum<{
|
|
385
|
+
credit_card: "credit_card";
|
|
386
|
+
debit_card: "debit_card";
|
|
387
|
+
wallet: "wallet";
|
|
388
|
+
voucher: "voucher";
|
|
389
|
+
direct_bill: "direct_bill";
|
|
390
|
+
cash: "cash";
|
|
391
|
+
other: "other";
|
|
392
|
+
bank_transfer: "bank_transfer";
|
|
393
|
+
cheque: "cheque";
|
|
394
|
+
}>>;
|
|
395
|
+
payerEmail: z.ZodNullable<z.ZodString>;
|
|
396
|
+
payerName: z.ZodNullable<z.ZodString>;
|
|
397
|
+
redirectUrl: z.ZodNullable<z.ZodString>;
|
|
398
|
+
returnUrl: z.ZodNullable<z.ZodString>;
|
|
399
|
+
cancelUrl: z.ZodNullable<z.ZodString>;
|
|
400
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
401
|
+
completedAt: z.ZodNullable<z.ZodString>;
|
|
402
|
+
failureCode: z.ZodNullable<z.ZodString>;
|
|
403
|
+
failureMessage: z.ZodNullable<z.ZodString>;
|
|
404
|
+
}, z.core.$strip>;
|
|
405
|
+
}, z.core.$strip>;
|
|
406
|
+
export declare const publicVoucherValidationResponse: z.ZodObject<{
|
|
407
|
+
data: z.ZodObject<{
|
|
408
|
+
valid: z.ZodBoolean;
|
|
409
|
+
reason: z.ZodNullable<z.ZodEnum<{
|
|
410
|
+
inactive: "inactive";
|
|
411
|
+
expired: "expired";
|
|
412
|
+
not_found: "not_found";
|
|
413
|
+
not_started: "not_started";
|
|
414
|
+
booking_mismatch: "booking_mismatch";
|
|
415
|
+
currency_mismatch: "currency_mismatch";
|
|
416
|
+
insufficient_balance: "insufficient_balance";
|
|
417
|
+
}>>;
|
|
418
|
+
voucher: z.ZodNullable<z.ZodObject<{
|
|
419
|
+
id: z.ZodString;
|
|
420
|
+
code: z.ZodString;
|
|
421
|
+
label: z.ZodString;
|
|
422
|
+
provider: z.ZodNullable<z.ZodString>;
|
|
423
|
+
currency: z.ZodNullable<z.ZodString>;
|
|
424
|
+
amountCents: z.ZodNullable<z.ZodNumber>;
|
|
425
|
+
remainingAmountCents: z.ZodNullable<z.ZodNumber>;
|
|
426
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
427
|
+
}, z.core.$strip>>;
|
|
428
|
+
}, z.core.$strip>;
|
|
429
|
+
}, z.core.$strip>;
|
|
430
|
+
export type PublicBookingPaymentOptionsRecord = z.infer<typeof publicBookingPaymentOptionsSchema>;
|
|
431
|
+
export type PublicPaymentSessionRecord = z.infer<typeof publicPaymentSessionSchema>;
|
|
432
|
+
export type PublicStartPaymentSessionInput = z.input<typeof publicStartPaymentSessionSchema>;
|
|
433
|
+
export type PublicValidateVoucherInput = z.input<typeof publicValidateVoucherSchema>;
|
|
434
|
+
export type PublicVoucherValidationRecord = z.infer<typeof publicVoucherValidationSchema>;
|
|
276
435
|
//# sourceMappingURL=schemas.d.ts.map
|
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,EAAE,CAAC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AA0B;;;;;;;;;;;;;;;;iBAAwC,CAAA;AAC/E,eAAO,MAAM,oBAAoB;;;;;;;;iBAAyC,CAAA;AAE1E,OAAO,EACL,iCAAiC,EACjC,+BAA+B,EAC/B,0BAA0B,EAC1B,+BAA+B,EAC/B,2BAA2B,EAC3B,6BAA6B,GAC9B,CAAA;AAED,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAoD,CAAA;AACpG,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA6C,CAAA;AACtF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;iBAAgD,CAAA;AAE5F,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,3 +1,4 @@
|
|
|
1
|
+
import { publicBookingPaymentOptionsSchema, publicPaymentOptionsQuerySchema, publicPaymentSessionSchema, publicStartPaymentSessionSchema, publicValidateVoucherSchema, publicVoucherValidationSchema, } from "@voyantjs/finance";
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
export const paginatedEnvelope = (item) => z.object({
|
|
3
4
|
data: z.array(item),
|
|
@@ -98,3 +99,7 @@ export const invoiceLineItemsResponse = arrayEnvelope(lineItemRecordSchema);
|
|
|
98
99
|
export const invoicePaymentsResponse = arrayEnvelope(paymentRecordSchema);
|
|
99
100
|
export const invoiceCreditNotesResponse = arrayEnvelope(creditNoteRecordSchema);
|
|
100
101
|
export const invoiceNotesResponse = arrayEnvelope(financeNoteRecordSchema);
|
|
102
|
+
export { publicBookingPaymentOptionsSchema, publicPaymentOptionsQuerySchema, publicPaymentSessionSchema, publicStartPaymentSessionSchema, publicValidateVoucherSchema, publicVoucherValidationSchema, };
|
|
103
|
+
export const publicBookingPaymentOptionsResponse = singleEnvelope(publicBookingPaymentOptionsSchema);
|
|
104
|
+
export const publicPaymentSessionResponse = singleEnvelope(publicPaymentSessionSchema);
|
|
105
|
+
export const publicVoucherValidationResponse = singleEnvelope(publicVoucherValidationSchema);
|