@leaflow/sdk 0.129.1 → 0.130.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/billing/type/order/v1/generated/models.d.ts +241 -85
- package/dist/billing/type/order/v1/generated/models.js +19 -4
- package/dist/billing/type/order/v1/generated/validators/paymentResult.zod.d.ts +1 -0
- package/dist/billing/type/order/v1/generated/validators/refund.zod.d.ts +1 -0
- package/dist/billing/type/order/v1/generated/validators/refundList.zod.d.ts +1 -0
- package/dist/billing/type/order/v1/generated/validators/transaction.zod.d.ts +1 -0
- package/dist/billing/type/order/v1/generated/validators/transactionList.zod.d.ts +1 -0
- package/dist/billing/type/order/v1/generated/validators/transactionType.zod.d.ts +1 -0
- package/dist/billing/type/order/v1/generated/validators/transactionType.zod.js +1 -1
- package/dist/billing/type/order/v1/generated/validators/withdrawal.zod.d.ts +40 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawal.zod.js +43 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalAllocation.zod.d.ts +19 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalAllocation.zod.js +17 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalCreate.zod.d.ts +25 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalCreate.zod.js +19 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalItem.zod.d.ts +46 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalItem.zod.js +37 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalItemList.zod.d.ts +48 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalItemList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalList.zod.d.ts +39 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalList.zod.js +14 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalPreview.zod.d.ts +40 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalPreview.zod.js +25 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalPreviewItem.zod.d.ts +28 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalPreviewItem.zod.js +19 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalPreviewRequest.zod.d.ts +15 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalPreviewRequest.zod.js +13 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalSource.zod.d.ts +23 -0
- package/dist/billing/type/order/v1/generated/validators/withdrawalSource.zod.js +23 -0
- package/dist/billing/v1/generated/functions.d.ts +106 -1
- package/dist/billing/v1/generated/functions.js +132 -0
- package/dist/billing/v1/generated/models.d.ts +194 -9
- package/dist/billing/v1/generated/models.js +15 -0
- package/dist/billing/v1/generated/schemas.zod.d.ts +59 -0
- package/dist/billing/v1/generated/schemas.zod.js +67 -0
- package/dist/billing/v1/generated/validators/listWithdrawalItemsParams.zod.d.ts +18 -0
- package/dist/billing/v1/generated/validators/listWithdrawalItemsParams.zod.js +24 -0
- package/dist/billing/v1/generated/validators/listWithdrawalsParams.zod.d.ts +19 -0
- package/dist/billing/v1/generated/validators/listWithdrawalsParams.zod.js +25 -0
- package/dist/billing/v1/generated/validators/paymentResult.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/refund.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/refundList.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/transaction.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/transactionList.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/transactionType.zod.d.ts +1 -0
- package/dist/billing/v1/generated/validators/transactionType.zod.js +1 -1
- package/dist/billing/v1/generated/validators/withdrawal.zod.d.ts +40 -0
- package/dist/billing/v1/generated/validators/withdrawal.zod.js +43 -0
- package/dist/billing/v1/generated/validators/withdrawalAllocation.zod.d.ts +19 -0
- package/dist/billing/v1/generated/validators/withdrawalAllocation.zod.js +17 -0
- package/dist/billing/v1/generated/validators/withdrawalCreate.zod.d.ts +25 -0
- package/dist/billing/v1/generated/validators/withdrawalCreate.zod.js +19 -0
- package/dist/billing/v1/generated/validators/withdrawalItem.zod.d.ts +46 -0
- package/dist/billing/v1/generated/validators/withdrawalItem.zod.js +37 -0
- package/dist/billing/v1/generated/validators/withdrawalItemList.zod.d.ts +48 -0
- package/dist/billing/v1/generated/validators/withdrawalItemList.zod.js +14 -0
- package/dist/billing/v1/generated/validators/withdrawalList.zod.d.ts +39 -0
- package/dist/billing/v1/generated/validators/withdrawalList.zod.js +14 -0
- package/dist/billing/v1/generated/validators/withdrawalPreview.zod.d.ts +40 -0
- package/dist/billing/v1/generated/validators/withdrawalPreview.zod.js +25 -0
- package/dist/billing/v1/generated/validators/withdrawalPreviewItem.zod.d.ts +28 -0
- package/dist/billing/v1/generated/validators/withdrawalPreviewItem.zod.js +19 -0
- package/dist/billing/v1/generated/validators/withdrawalPreviewRequest.zod.d.ts +15 -0
- package/dist/billing/v1/generated/validators/withdrawalPreviewRequest.zod.js +13 -0
- package/dist/billing/v1/generated/validators/withdrawalSource.zod.d.ts +23 -0
- package/dist/billing/v1/generated/validators/withdrawalSource.zod.js +23 -0
- package/dist/canopy/v1/generated/models.d.ts +241 -85
- package/dist/canopy/v1/generated/models.js +19 -4
- package/dist/canopy/v1/generated/validators/paymentResult.zod.d.ts +1 -0
- package/dist/canopy/v1/generated/validators/refund.zod.d.ts +1 -0
- package/dist/canopy/v1/generated/validators/refundList.zod.d.ts +1 -0
- package/dist/canopy/v1/generated/validators/transaction.zod.d.ts +1 -0
- package/dist/canopy/v1/generated/validators/transactionList.zod.d.ts +1 -0
- package/dist/canopy/v1/generated/validators/transactionType.zod.d.ts +1 -0
- package/dist/canopy/v1/generated/validators/transactionType.zod.js +1 -1
- package/dist/canopy/v1/generated/validators/withdrawal.zod.d.ts +63 -0
- package/dist/canopy/v1/generated/validators/withdrawal.zod.js +66 -0
- package/dist/canopy/v1/generated/validators/withdrawalAllocation.zod.d.ts +42 -0
- package/dist/canopy/v1/generated/validators/withdrawalAllocation.zod.js +40 -0
- package/dist/canopy/v1/generated/validators/withdrawalCreate.zod.d.ts +48 -0
- package/dist/canopy/v1/generated/validators/withdrawalCreate.zod.js +42 -0
- package/dist/canopy/v1/generated/validators/withdrawalItem.zod.d.ts +69 -0
- package/dist/canopy/v1/generated/validators/withdrawalItem.zod.js +60 -0
- package/dist/canopy/v1/generated/validators/withdrawalItemList.zod.d.ts +71 -0
- package/dist/canopy/v1/generated/validators/withdrawalItemList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/withdrawalList.zod.d.ts +62 -0
- package/dist/canopy/v1/generated/validators/withdrawalList.zod.js +37 -0
- package/dist/canopy/v1/generated/validators/withdrawalPreview.zod.d.ts +63 -0
- package/dist/canopy/v1/generated/validators/withdrawalPreview.zod.js +48 -0
- package/dist/canopy/v1/generated/validators/withdrawalPreviewItem.zod.d.ts +51 -0
- package/dist/canopy/v1/generated/validators/withdrawalPreviewItem.zod.js +42 -0
- package/dist/canopy/v1/generated/validators/withdrawalPreviewRequest.zod.d.ts +38 -0
- package/dist/canopy/v1/generated/validators/withdrawalPreviewRequest.zod.js +36 -0
- package/dist/canopy/v1/generated/validators/withdrawalSource.zod.d.ts +46 -0
- package/dist/canopy/v1/generated/validators/withdrawalSource.zod.js +46 -0
- package/dist/compute/v1/generated/models.d.ts +241 -85
- package/dist/compute/v1/generated/models.js +19 -4
- package/dist/compute/v1/generated/validators/paymentResult.zod.d.ts +1 -0
- package/dist/compute/v1/generated/validators/refund.zod.d.ts +1 -0
- package/dist/compute/v1/generated/validators/refundList.zod.d.ts +1 -0
- package/dist/compute/v1/generated/validators/transaction.zod.d.ts +1 -0
- package/dist/compute/v1/generated/validators/transactionList.zod.d.ts +1 -0
- package/dist/compute/v1/generated/validators/transactionType.zod.d.ts +1 -0
- package/dist/compute/v1/generated/validators/transactionType.zod.js +1 -1
- package/dist/compute/v1/generated/validators/withdrawal.zod.d.ts +56 -0
- package/dist/compute/v1/generated/validators/withdrawal.zod.js +59 -0
- package/dist/compute/v1/generated/validators/withdrawalAllocation.zod.d.ts +35 -0
- package/dist/compute/v1/generated/validators/withdrawalAllocation.zod.js +33 -0
- package/dist/compute/v1/generated/validators/withdrawalCreate.zod.d.ts +41 -0
- package/dist/compute/v1/generated/validators/withdrawalCreate.zod.js +35 -0
- package/dist/compute/v1/generated/validators/withdrawalItem.zod.d.ts +62 -0
- package/dist/compute/v1/generated/validators/withdrawalItem.zod.js +53 -0
- package/dist/compute/v1/generated/validators/withdrawalItemList.zod.d.ts +64 -0
- package/dist/compute/v1/generated/validators/withdrawalItemList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/withdrawalList.zod.d.ts +55 -0
- package/dist/compute/v1/generated/validators/withdrawalList.zod.js +30 -0
- package/dist/compute/v1/generated/validators/withdrawalPreview.zod.d.ts +56 -0
- package/dist/compute/v1/generated/validators/withdrawalPreview.zod.js +41 -0
- package/dist/compute/v1/generated/validators/withdrawalPreviewItem.zod.d.ts +44 -0
- package/dist/compute/v1/generated/validators/withdrawalPreviewItem.zod.js +35 -0
- package/dist/compute/v1/generated/validators/withdrawalPreviewRequest.zod.d.ts +31 -0
- package/dist/compute/v1/generated/validators/withdrawalPreviewRequest.zod.js +29 -0
- package/dist/compute/v1/generated/validators/withdrawalSource.zod.d.ts +39 -0
- package/dist/compute/v1/generated/validators/withdrawalSource.zod.js +39 -0
- package/dist/membership/v1/generated/models.d.ts +247 -85
- package/dist/membership/v1/generated/models.js +19 -4
- package/dist/membership/v1/generated/validators/grant.zod.d.ts +2 -0
- package/dist/membership/v1/generated/validators/grant.zod.js +5 -0
- package/dist/membership/v1/generated/validators/membership.zod.d.ts +2 -0
- package/dist/membership/v1/generated/validators/membershipList.zod.d.ts +2 -0
- package/dist/membership/v1/generated/validators/membershipPurchase.zod.d.ts +2 -0
- package/dist/membership/v1/generated/validators/paymentResult.zod.d.ts +1 -0
- package/dist/membership/v1/generated/validators/period.zod.d.ts +2 -0
- package/dist/membership/v1/generated/validators/periodList.zod.d.ts +2 -0
- package/dist/membership/v1/generated/validators/refund.zod.d.ts +1 -0
- package/dist/membership/v1/generated/validators/refundList.zod.d.ts +1 -0
- package/dist/membership/v1/generated/validators/transaction.zod.d.ts +1 -0
- package/dist/membership/v1/generated/validators/transactionList.zod.d.ts +1 -0
- package/dist/membership/v1/generated/validators/transactionType.zod.d.ts +1 -0
- package/dist/membership/v1/generated/validators/transactionType.zod.js +1 -1
- package/dist/membership/v1/generated/validators/withdrawal.zod.d.ts +40 -0
- package/dist/membership/v1/generated/validators/withdrawal.zod.js +43 -0
- package/dist/membership/v1/generated/validators/withdrawalAllocation.zod.d.ts +19 -0
- package/dist/membership/v1/generated/validators/withdrawalAllocation.zod.js +17 -0
- package/dist/membership/v1/generated/validators/withdrawalCreate.zod.d.ts +25 -0
- package/dist/membership/v1/generated/validators/withdrawalCreate.zod.js +19 -0
- package/dist/membership/v1/generated/validators/withdrawalItem.zod.d.ts +46 -0
- package/dist/membership/v1/generated/validators/withdrawalItem.zod.js +37 -0
- package/dist/membership/v1/generated/validators/withdrawalItemList.zod.d.ts +48 -0
- package/dist/membership/v1/generated/validators/withdrawalItemList.zod.js +14 -0
- package/dist/membership/v1/generated/validators/withdrawalList.zod.d.ts +39 -0
- package/dist/membership/v1/generated/validators/withdrawalList.zod.js +14 -0
- package/dist/membership/v1/generated/validators/withdrawalPreview.zod.d.ts +40 -0
- package/dist/membership/v1/generated/validators/withdrawalPreview.zod.js +25 -0
- package/dist/membership/v1/generated/validators/withdrawalPreviewItem.zod.d.ts +28 -0
- package/dist/membership/v1/generated/validators/withdrawalPreviewItem.zod.js +19 -0
- package/dist/membership/v1/generated/validators/withdrawalPreviewRequest.zod.d.ts +15 -0
- package/dist/membership/v1/generated/validators/withdrawalPreviewRequest.zod.js +13 -0
- package/dist/membership/v1/generated/validators/withdrawalSource.zod.d.ts +23 -0
- package/dist/membership/v1/generated/validators/withdrawalSource.zod.js +23 -0
- package/dist/routes.d.ts +40 -0
- package/dist/routes.js +45 -0
- package/package.json +1 -1
|
@@ -1102,6 +1102,7 @@ export declare const TransactionType: {
|
|
|
1102
1102
|
readonly payment: "payment";
|
|
1103
1103
|
readonly refund: "refund";
|
|
1104
1104
|
readonly adjustment: "adjustment";
|
|
1105
|
+
readonly fee: "fee";
|
|
1105
1106
|
};
|
|
1106
1107
|
/**
|
|
1107
1108
|
* A funds operation. Each payment has one source; refunds identify the original successful transaction. Unknown gateway results remain pending. Payments from the balance or a gateway are distinct from credit-grant payments.
|
|
@@ -2763,6 +2764,170 @@ export interface QuoteRequest {
|
|
|
2763
2764
|
promotion_code?: string;
|
|
2764
2765
|
refund?: OrderRefundQuoteInput;
|
|
2765
2766
|
}
|
|
2767
|
+
/**
|
|
2768
|
+
* Pagination metadata for keyset traversal. Pass next_cursor as cursor to read the following page; null means there is no following page.
|
|
2769
|
+
*/
|
|
2770
|
+
export interface CursorPagination {
|
|
2771
|
+
/** @minimum 1 */
|
|
2772
|
+
page_size: number;
|
|
2773
|
+
/** @nullable */
|
|
2774
|
+
next_cursor?: string | null;
|
|
2775
|
+
}
|
|
2776
|
+
export interface WithdrawalAllocation {
|
|
2777
|
+
source_transaction_id: string;
|
|
2778
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
2779
|
+
amount: string;
|
|
2780
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
2781
|
+
fee_amount: string;
|
|
2782
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
2783
|
+
refund_amount: string;
|
|
2784
|
+
}
|
|
2785
|
+
export type WithdrawalItemStatus = (typeof WithdrawalItemStatus)[keyof typeof WithdrawalItemStatus];
|
|
2786
|
+
export declare const WithdrawalItemStatus: {
|
|
2787
|
+
readonly pending: "pending";
|
|
2788
|
+
readonly succeeded: "succeeded";
|
|
2789
|
+
readonly failed: "failed";
|
|
2790
|
+
readonly reversed: "reversed";
|
|
2791
|
+
};
|
|
2792
|
+
/**
|
|
2793
|
+
* The original top-up and its refund destination. Card details are included when the original payment method was saved; missing card details do not change the original refund route.
|
|
2794
|
+
*/
|
|
2795
|
+
export interface WithdrawalSource {
|
|
2796
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
2797
|
+
amount: string;
|
|
2798
|
+
/**
|
|
2799
|
+
* @minLength 3
|
|
2800
|
+
* @maxLength 3
|
|
2801
|
+
*/
|
|
2802
|
+
currency: string;
|
|
2803
|
+
received_at: string;
|
|
2804
|
+
payment_gateway: string;
|
|
2805
|
+
method_type: string;
|
|
2806
|
+
card_brand?: string;
|
|
2807
|
+
/** @pattern ^[0-9]{4}$ */
|
|
2808
|
+
card_last4?: string;
|
|
2809
|
+
}
|
|
2810
|
+
/**
|
|
2811
|
+
* The fixed principal deduction, withdrawal fee and exact refund obligation for one original top-up. Each item has its own refund; payment_gateway and method_type identify the original route.
|
|
2812
|
+
*/
|
|
2813
|
+
export interface WithdrawalItem {
|
|
2814
|
+
source_transaction_id: string;
|
|
2815
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
2816
|
+
amount: string;
|
|
2817
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
2818
|
+
fee_amount: string;
|
|
2819
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
2820
|
+
refund_amount: string;
|
|
2821
|
+
id: string;
|
|
2822
|
+
withdrawal_id: string;
|
|
2823
|
+
billing_account_id: number;
|
|
2824
|
+
/**
|
|
2825
|
+
* @minLength 3
|
|
2826
|
+
* @maxLength 3
|
|
2827
|
+
*/
|
|
2828
|
+
currency: string;
|
|
2829
|
+
refund_id: string;
|
|
2830
|
+
fee_transaction_id?: string;
|
|
2831
|
+
status: WithdrawalItemStatus;
|
|
2832
|
+
completed_at?: string;
|
|
2833
|
+
payment_gateway: string;
|
|
2834
|
+
method_type: string;
|
|
2835
|
+
source: WithdrawalSource;
|
|
2836
|
+
/** The original gateway failure code when a refund failed, or refund_reversed when a completed refund was reversed. Absent while pending or successful. */
|
|
2837
|
+
failure_code?: string;
|
|
2838
|
+
}
|
|
2839
|
+
export type WithdrawalStatus = (typeof WithdrawalStatus)[keyof typeof WithdrawalStatus];
|
|
2840
|
+
export declare const WithdrawalStatus: {
|
|
2841
|
+
readonly pending: "pending";
|
|
2842
|
+
readonly processing: "processing";
|
|
2843
|
+
readonly succeeded: "succeeded";
|
|
2844
|
+
readonly partially_completed: "partially_completed";
|
|
2845
|
+
readonly failed: "failed";
|
|
2846
|
+
readonly reversed: "reversed";
|
|
2847
|
+
};
|
|
2848
|
+
/**
|
|
2849
|
+
* An account withdrawal to the original payment methods of its unused top-ups. Accepted amounts are fixed. deducted_amount, settled_amount and charged_fee_amount report completed source items. Failed items release their principal and fee reservations; successful items are retained when another source fails.
|
|
2850
|
+
*/
|
|
2851
|
+
export interface Withdrawal {
|
|
2852
|
+
id: string;
|
|
2853
|
+
billing_account_id: number;
|
|
2854
|
+
/**
|
|
2855
|
+
* @minLength 3
|
|
2856
|
+
* @maxLength 3
|
|
2857
|
+
*/
|
|
2858
|
+
currency: string;
|
|
2859
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
2860
|
+
amount: string;
|
|
2861
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
2862
|
+
fee_amount: string;
|
|
2863
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
2864
|
+
refund_amount: string;
|
|
2865
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
2866
|
+
deducted_amount: string;
|
|
2867
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
2868
|
+
settled_amount: string;
|
|
2869
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
2870
|
+
charged_fee_amount: string;
|
|
2871
|
+
status: WithdrawalStatus;
|
|
2872
|
+
created_at: string;
|
|
2873
|
+
completed_at?: string;
|
|
2874
|
+
/** Identity that submitted this withdrawal. It can differ from the billing account owner. */
|
|
2875
|
+
created_by?: string;
|
|
2876
|
+
}
|
|
2877
|
+
export interface WithdrawalPreviewItem {
|
|
2878
|
+
source_transaction_id: string;
|
|
2879
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
2880
|
+
amount: string;
|
|
2881
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
2882
|
+
fee_amount: string;
|
|
2883
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
2884
|
+
refund_amount: string;
|
|
2885
|
+
source: WithdrawalSource;
|
|
2886
|
+
}
|
|
2887
|
+
export interface WithdrawalPreview {
|
|
2888
|
+
billing_account_id: number;
|
|
2889
|
+
/**
|
|
2890
|
+
* @minLength 3
|
|
2891
|
+
* @maxLength 3
|
|
2892
|
+
*/
|
|
2893
|
+
currency: string;
|
|
2894
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
2895
|
+
available_amount: string;
|
|
2896
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
2897
|
+
amount: string;
|
|
2898
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
2899
|
+
fee_amount: string;
|
|
2900
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
2901
|
+
refund_amount: string;
|
|
2902
|
+
/** @maxItems 200 */
|
|
2903
|
+
items: WithdrawalPreviewItem[];
|
|
2904
|
+
}
|
|
2905
|
+
export interface WithdrawalPreviewRequest {
|
|
2906
|
+
billing_account_id: number;
|
|
2907
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
2908
|
+
amount?: string;
|
|
2909
|
+
}
|
|
2910
|
+
export interface WithdrawalCreate {
|
|
2911
|
+
id: string;
|
|
2912
|
+
billing_account_id: number;
|
|
2913
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
2914
|
+
amount: string;
|
|
2915
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
2916
|
+
expected_refund_amount: string;
|
|
2917
|
+
/**
|
|
2918
|
+
* @minItems 1
|
|
2919
|
+
* @maxItems 200
|
|
2920
|
+
*/
|
|
2921
|
+
expected_items: WithdrawalAllocation[];
|
|
2922
|
+
}
|
|
2923
|
+
export interface WithdrawalList {
|
|
2924
|
+
items: Withdrawal[];
|
|
2925
|
+
pagination: OffsetPagination;
|
|
2926
|
+
}
|
|
2927
|
+
export interface WithdrawalItemList {
|
|
2928
|
+
items: WithdrawalItem[];
|
|
2929
|
+
pagination: OffsetPagination;
|
|
2930
|
+
}
|
|
2766
2931
|
/**
|
|
2767
2932
|
* How tax applies to the customer, as in Stripe. `none` taxes normally. `exempt` charges no tax.
|
|
2768
2933
|
* `reverse` charges no tax and leaves it to the customer under the reverse-charge mechanism;
|
|
@@ -2867,15 +3032,6 @@ export interface ContactList {
|
|
|
2867
3032
|
items: Contact[];
|
|
2868
3033
|
pagination: OffsetPagination;
|
|
2869
3034
|
}
|
|
2870
|
-
/**
|
|
2871
|
-
* Pagination metadata for keyset traversal. Pass next_cursor as cursor to read the following page; null means there is no following page.
|
|
2872
|
-
*/
|
|
2873
|
-
export interface CursorPagination {
|
|
2874
|
-
/** @minimum 1 */
|
|
2875
|
-
page_size: number;
|
|
2876
|
-
/** @nullable */
|
|
2877
|
-
next_cursor?: string | null;
|
|
2878
|
-
}
|
|
2879
3035
|
export interface CancelSubscriptionRequest {
|
|
2880
3036
|
mode: TerminationPolicy;
|
|
2881
3037
|
/** For immediate cancellation, the quoted whole-second refund basis. Now when omitted. */
|
|
@@ -3015,6 +3171,35 @@ export type ToRequiredParameter = string;
|
|
|
3015
3171
|
* Restrict the account-authorized results to these projects. Omit for all projects and account-level records. This filter does not grant access to another billing account.
|
|
3016
3172
|
*/
|
|
3017
3173
|
export type ProjectIdsQueryParameter = string[];
|
|
3174
|
+
export type ListWithdrawalItemsParams = {
|
|
3175
|
+
/**
|
|
3176
|
+
* 1-based page number. Defaults to 1.
|
|
3177
|
+
* @minimum 1
|
|
3178
|
+
* @maximum 2147483647
|
|
3179
|
+
*/
|
|
3180
|
+
page?: number;
|
|
3181
|
+
/**
|
|
3182
|
+
* Items per page. Defaults to 50; at most 200.
|
|
3183
|
+
* @minimum 1
|
|
3184
|
+
* @maximum 200
|
|
3185
|
+
*/
|
|
3186
|
+
page_size?: number;
|
|
3187
|
+
};
|
|
3188
|
+
export type ListWithdrawalsParams = {
|
|
3189
|
+
/**
|
|
3190
|
+
* 1-based page number. Defaults to 1.
|
|
3191
|
+
* @minimum 1
|
|
3192
|
+
* @maximum 2147483647
|
|
3193
|
+
*/
|
|
3194
|
+
page?: number;
|
|
3195
|
+
/**
|
|
3196
|
+
* Items per page. Defaults to 50; at most 200.
|
|
3197
|
+
* @minimum 1
|
|
3198
|
+
* @maximum 200
|
|
3199
|
+
*/
|
|
3200
|
+
page_size?: number;
|
|
3201
|
+
billing_account_id?: number;
|
|
3202
|
+
};
|
|
3018
3203
|
export type ListContactsParams = {
|
|
3019
3204
|
/**
|
|
3020
3205
|
* 1-based page number. Defaults to 1.
|
|
@@ -131,6 +131,7 @@ export const TransactionType = {
|
|
|
131
131
|
payment: "payment",
|
|
132
132
|
refund: "refund",
|
|
133
133
|
adjustment: "adjustment",
|
|
134
|
+
fee: "fee",
|
|
134
135
|
};
|
|
135
136
|
export const InvoiceStatus = {
|
|
136
137
|
draft: "draft",
|
|
@@ -348,6 +349,20 @@ export const ActiveResourceStatus = {
|
|
|
348
349
|
closing: "closing",
|
|
349
350
|
closed: "closed",
|
|
350
351
|
};
|
|
352
|
+
export const WithdrawalItemStatus = {
|
|
353
|
+
pending: "pending",
|
|
354
|
+
succeeded: "succeeded",
|
|
355
|
+
failed: "failed",
|
|
356
|
+
reversed: "reversed",
|
|
357
|
+
};
|
|
358
|
+
export const WithdrawalStatus = {
|
|
359
|
+
pending: "pending",
|
|
360
|
+
processing: "processing",
|
|
361
|
+
succeeded: "succeeded",
|
|
362
|
+
partially_completed: "partially_completed",
|
|
363
|
+
failed: "failed",
|
|
364
|
+
reversed: "reversed",
|
|
365
|
+
};
|
|
351
366
|
export const ContactTaxExempt = {
|
|
352
367
|
none: "none",
|
|
353
368
|
exempt: "exempt",
|
|
@@ -6,6 +6,65 @@
|
|
|
6
6
|
* OpenAPI spec version: v1
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
|
+
/**
|
|
10
|
+
* Paginated fixed source allocations and their outcomes. A failed source does not undo refunds already completed through other sources.
|
|
11
|
+
* @summary List withdrawal items
|
|
12
|
+
*/
|
|
13
|
+
export declare const ListWithdrawalItemsParams: zod.ZodObject<{
|
|
14
|
+
withdrawalId: zod.ZodUUID;
|
|
15
|
+
}, zod.z.core.$strict>;
|
|
16
|
+
export declare const listWithdrawalItemsQueryPageDefault = 1;
|
|
17
|
+
export declare const listWithdrawalItemsQueryPageMax = 2147483647;
|
|
18
|
+
export declare const listWithdrawalItemsQueryPageSizeDefault = 50;
|
|
19
|
+
export declare const listWithdrawalItemsQueryPageSizeMax = 200;
|
|
20
|
+
export declare const ListWithdrawalItemsQueryParams: zod.ZodObject<{
|
|
21
|
+
page: zod.ZodDefault<zod.ZodInt>;
|
|
22
|
+
page_size: zod.ZodDefault<zod.ZodInt>;
|
|
23
|
+
}, zod.z.core.$strict>;
|
|
24
|
+
/**
|
|
25
|
+
* Paginated account withdrawal history, newest first. Account authorization applies to every record.
|
|
26
|
+
* @summary List withdrawals
|
|
27
|
+
*/
|
|
28
|
+
export declare const listWithdrawalsQueryPageDefault = 1;
|
|
29
|
+
export declare const listWithdrawalsQueryPageMax = 2147483647;
|
|
30
|
+
export declare const listWithdrawalsQueryPageSizeDefault = 50;
|
|
31
|
+
export declare const listWithdrawalsQueryPageSizeMax = 200;
|
|
32
|
+
export declare const ListWithdrawalsQueryParams: zod.ZodObject<{
|
|
33
|
+
page: zod.ZodDefault<zod.ZodInt>;
|
|
34
|
+
page_size: zod.ZodDefault<zod.ZodInt>;
|
|
35
|
+
billing_account_id: zod.ZodOptional<zod.ZodInt>;
|
|
36
|
+
}, zod.z.core.$strict>;
|
|
37
|
+
/**
|
|
38
|
+
* Withdraws the requested account balance through the original top-ups in receipt order. Fees are calculated independently per source. expected_items and expected_refund_amount must match the accepted preview. Reusing the same ID with different terms fails. Only successful items collect a fee.
|
|
39
|
+
* @summary Create withdrawal
|
|
40
|
+
*/
|
|
41
|
+
export declare const CreateWithdrawalBody: zod.ZodObject<{
|
|
42
|
+
id: zod.ZodUUID;
|
|
43
|
+
billing_account_id: zod.ZodInt;
|
|
44
|
+
amount: zod.ZodString;
|
|
45
|
+
expected_refund_amount: zod.ZodString;
|
|
46
|
+
expected_items: zod.ZodArray<zod.ZodObject<{
|
|
47
|
+
source_transaction_id: zod.ZodUUID;
|
|
48
|
+
amount: zod.ZodString;
|
|
49
|
+
fee_amount: zod.ZodString;
|
|
50
|
+
refund_amount: zod.ZodString;
|
|
51
|
+
}, zod.z.core.$strict>>;
|
|
52
|
+
}, zod.z.core.$strict>;
|
|
53
|
+
/**
|
|
54
|
+
* Previews the available balance deduction, fees and exact refund allocation by original source. Omit amount to preview all available principal. Creates no withdrawal and reserves no funds. Fails if a selected source has no configured refund route or its original processing cost is not yet available.
|
|
55
|
+
* @summary Preview withdrawal
|
|
56
|
+
*/
|
|
57
|
+
export declare const PreviewWithdrawalBody: zod.ZodObject<{
|
|
58
|
+
billing_account_id: zod.ZodInt;
|
|
59
|
+
amount: zod.ZodOptional<zod.ZodString>;
|
|
60
|
+
}, zod.z.core.$strict>;
|
|
61
|
+
/**
|
|
62
|
+
* Reads the accepted amounts and aggregate outcome of an authorized withdrawal. List its source items for each original-method refund result.
|
|
63
|
+
* @summary Get withdrawal
|
|
64
|
+
*/
|
|
65
|
+
export declare const GetWithdrawalParams: zod.ZodObject<{
|
|
66
|
+
withdrawalId: zod.ZodUUID;
|
|
67
|
+
}, zod.z.core.$strict>;
|
|
9
68
|
/**
|
|
10
69
|
* Paginated contact profiles belonging to the billing account in the path, including inactive contacts. Returns 404 if the account does not exist.
|
|
11
70
|
* @summary List contacts
|
|
@@ -22,6 +22,73 @@ import { RenewRequest } from "./validators/renewRequest.zod.js";
|
|
|
22
22
|
import { RenewalOrderRequest } from "./validators/renewalOrderRequest.zod.js";
|
|
23
23
|
import { SetProjectAssignmentRequest } from "./validators/setProjectAssignmentRequest.zod.js";
|
|
24
24
|
import { TopUpCreate } from "./validators/topUpCreate.zod.js";
|
|
25
|
+
import { WithdrawalCreate } from "./validators/withdrawalCreate.zod.js";
|
|
26
|
+
import { WithdrawalPreviewRequest } from "./validators/withdrawalPreviewRequest.zod.js";
|
|
27
|
+
/**
|
|
28
|
+
* Paginated fixed source allocations and their outcomes. A failed source does not undo refunds already completed through other sources.
|
|
29
|
+
* @summary List withdrawal items
|
|
30
|
+
*/
|
|
31
|
+
export const ListWithdrawalItemsParams = zod.strictObject({
|
|
32
|
+
withdrawalId: zod.uuid(),
|
|
33
|
+
});
|
|
34
|
+
export const listWithdrawalItemsQueryPageDefault = 1;
|
|
35
|
+
export const listWithdrawalItemsQueryPageMax = 2147483647;
|
|
36
|
+
export const listWithdrawalItemsQueryPageSizeDefault = 50;
|
|
37
|
+
export const listWithdrawalItemsQueryPageSizeMax = 200;
|
|
38
|
+
export const ListWithdrawalItemsQueryParams = zod.strictObject({
|
|
39
|
+
page: zod
|
|
40
|
+
.int()
|
|
41
|
+
.min(1)
|
|
42
|
+
.max(listWithdrawalItemsQueryPageMax)
|
|
43
|
+
.default(listWithdrawalItemsQueryPageDefault)
|
|
44
|
+
.describe("1-based page number. Defaults to 1."),
|
|
45
|
+
page_size: zod
|
|
46
|
+
.int()
|
|
47
|
+
.min(1)
|
|
48
|
+
.max(listWithdrawalItemsQueryPageSizeMax)
|
|
49
|
+
.default(listWithdrawalItemsQueryPageSizeDefault)
|
|
50
|
+
.describe("Items per page. Defaults to 50; at most 200."),
|
|
51
|
+
});
|
|
52
|
+
/**
|
|
53
|
+
* Paginated account withdrawal history, newest first. Account authorization applies to every record.
|
|
54
|
+
* @summary List withdrawals
|
|
55
|
+
*/
|
|
56
|
+
export const listWithdrawalsQueryPageDefault = 1;
|
|
57
|
+
export const listWithdrawalsQueryPageMax = 2147483647;
|
|
58
|
+
export const listWithdrawalsQueryPageSizeDefault = 50;
|
|
59
|
+
export const listWithdrawalsQueryPageSizeMax = 200;
|
|
60
|
+
export const ListWithdrawalsQueryParams = zod.strictObject({
|
|
61
|
+
page: zod
|
|
62
|
+
.int()
|
|
63
|
+
.min(1)
|
|
64
|
+
.max(listWithdrawalsQueryPageMax)
|
|
65
|
+
.default(listWithdrawalsQueryPageDefault)
|
|
66
|
+
.describe("1-based page number. Defaults to 1."),
|
|
67
|
+
page_size: zod
|
|
68
|
+
.int()
|
|
69
|
+
.min(1)
|
|
70
|
+
.max(listWithdrawalsQueryPageSizeMax)
|
|
71
|
+
.default(listWithdrawalsQueryPageSizeDefault)
|
|
72
|
+
.describe("Items per page. Defaults to 50; at most 200."),
|
|
73
|
+
billing_account_id: zod.int().optional(),
|
|
74
|
+
});
|
|
75
|
+
/**
|
|
76
|
+
* Withdraws the requested account balance through the original top-ups in receipt order. Fees are calculated independently per source. expected_items and expected_refund_amount must match the accepted preview. Reusing the same ID with different terms fails. Only successful items collect a fee.
|
|
77
|
+
* @summary Create withdrawal
|
|
78
|
+
*/
|
|
79
|
+
export const CreateWithdrawalBody = WithdrawalCreate;
|
|
80
|
+
/**
|
|
81
|
+
* Previews the available balance deduction, fees and exact refund allocation by original source. Omit amount to preview all available principal. Creates no withdrawal and reserves no funds. Fails if a selected source has no configured refund route or its original processing cost is not yet available.
|
|
82
|
+
* @summary Preview withdrawal
|
|
83
|
+
*/
|
|
84
|
+
export const PreviewWithdrawalBody = WithdrawalPreviewRequest;
|
|
85
|
+
/**
|
|
86
|
+
* Reads the accepted amounts and aggregate outcome of an authorized withdrawal. List its source items for each original-method refund result.
|
|
87
|
+
* @summary Get withdrawal
|
|
88
|
+
*/
|
|
89
|
+
export const GetWithdrawalParams = zod.strictObject({
|
|
90
|
+
withdrawalId: zod.uuid(),
|
|
91
|
+
});
|
|
25
92
|
/**
|
|
26
93
|
* Paginated contact profiles belonging to the billing account in the path, including inactive contacts. Returns 404 if the account does not exist.
|
|
27
94
|
* @summary List contacts
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Billing API
|
|
5
|
+
* Products, prices, orders, subscriptions and account billing. Financial operations require an account access token and billing-account authorization. Public catalogue operations declare no security requirement.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export declare const listWithdrawalItemsParamsPageDefault = 1;
|
|
10
|
+
export declare const listWithdrawalItemsParamsPageMax = 2147483647;
|
|
11
|
+
export declare const listWithdrawalItemsParamsPageSizeDefault = 50;
|
|
12
|
+
export declare const listWithdrawalItemsParamsPageSizeMax = 200;
|
|
13
|
+
export declare const ListWithdrawalItemsParams: zod.ZodObject<{
|
|
14
|
+
page: zod.ZodDefault<zod.ZodInt>;
|
|
15
|
+
page_size: zod.ZodDefault<zod.ZodInt>;
|
|
16
|
+
}, zod.z.core.$strict>;
|
|
17
|
+
export type ListWithdrawalItemsParams = zod.input<typeof ListWithdrawalItemsParams>;
|
|
18
|
+
export type ListWithdrawalItemsParamsOutput = zod.output<typeof ListWithdrawalItemsParams>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Billing API
|
|
5
|
+
* Products, prices, orders, subscriptions and account billing. Financial operations require an account access token and billing-account authorization. Public catalogue operations declare no security requirement.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export const listWithdrawalItemsParamsPageDefault = 1;
|
|
10
|
+
export const listWithdrawalItemsParamsPageMax = 2147483647;
|
|
11
|
+
export const listWithdrawalItemsParamsPageSizeDefault = 50;
|
|
12
|
+
export const listWithdrawalItemsParamsPageSizeMax = 200;
|
|
13
|
+
export const ListWithdrawalItemsParams = zod.strictObject({
|
|
14
|
+
page: zod
|
|
15
|
+
.int()
|
|
16
|
+
.min(1)
|
|
17
|
+
.max(listWithdrawalItemsParamsPageMax)
|
|
18
|
+
.default(listWithdrawalItemsParamsPageDefault),
|
|
19
|
+
page_size: zod
|
|
20
|
+
.int()
|
|
21
|
+
.min(1)
|
|
22
|
+
.max(listWithdrawalItemsParamsPageSizeMax)
|
|
23
|
+
.default(listWithdrawalItemsParamsPageSizeDefault),
|
|
24
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Billing API
|
|
5
|
+
* Products, prices, orders, subscriptions and account billing. Financial operations require an account access token and billing-account authorization. Public catalogue operations declare no security requirement.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export declare const listWithdrawalsParamsPageDefault = 1;
|
|
10
|
+
export declare const listWithdrawalsParamsPageMax = 2147483647;
|
|
11
|
+
export declare const listWithdrawalsParamsPageSizeDefault = 50;
|
|
12
|
+
export declare const listWithdrawalsParamsPageSizeMax = 200;
|
|
13
|
+
export declare const ListWithdrawalsParams: zod.ZodObject<{
|
|
14
|
+
page: zod.ZodDefault<zod.ZodInt>;
|
|
15
|
+
page_size: zod.ZodDefault<zod.ZodInt>;
|
|
16
|
+
billing_account_id: zod.ZodOptional<zod.ZodInt>;
|
|
17
|
+
}, zod.z.core.$strict>;
|
|
18
|
+
export type ListWithdrawalsParams = zod.input<typeof ListWithdrawalsParams>;
|
|
19
|
+
export type ListWithdrawalsParamsOutput = zod.output<typeof ListWithdrawalsParams>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Billing API
|
|
5
|
+
* Products, prices, orders, subscriptions and account billing. Financial operations require an account access token and billing-account authorization. Public catalogue operations declare no security requirement.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export const listWithdrawalsParamsPageDefault = 1;
|
|
10
|
+
export const listWithdrawalsParamsPageMax = 2147483647;
|
|
11
|
+
export const listWithdrawalsParamsPageSizeDefault = 50;
|
|
12
|
+
export const listWithdrawalsParamsPageSizeMax = 200;
|
|
13
|
+
export const ListWithdrawalsParams = zod.strictObject({
|
|
14
|
+
page: zod
|
|
15
|
+
.int()
|
|
16
|
+
.min(1)
|
|
17
|
+
.max(listWithdrawalsParamsPageMax)
|
|
18
|
+
.default(listWithdrawalsParamsPageDefault),
|
|
19
|
+
page_size: zod
|
|
20
|
+
.int()
|
|
21
|
+
.min(1)
|
|
22
|
+
.max(listWithdrawalsParamsPageSizeMax)
|
|
23
|
+
.default(listWithdrawalsParamsPageSizeDefault),
|
|
24
|
+
billing_account_id: zod.int().optional(),
|
|
25
|
+
});
|
|
@@ -11,6 +11,7 @@ export declare const TransactionType: zod.ZodEnum<{
|
|
|
11
11
|
payment: "payment";
|
|
12
12
|
refund: "refund";
|
|
13
13
|
adjustment: "adjustment";
|
|
14
|
+
fee: "fee";
|
|
14
15
|
}>;
|
|
15
16
|
export type TransactionType = zod.input<typeof TransactionType>;
|
|
16
17
|
export type TransactionTypeOutput = zod.output<typeof TransactionType>;
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import * as zod from "zod";
|
|
9
9
|
export const TransactionType = zod
|
|
10
|
-
.enum(["topup", "payment", "refund", "adjustment"])
|
|
10
|
+
.enum(["topup", "payment", "refund", "adjustment", "fee"])
|
|
11
11
|
.describe("topup adds to the balance; payment settles an invoice; refund returns original funds; adjustment changes the balance with an audit reason.");
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Billing API
|
|
5
|
+
* Products, prices, orders, subscriptions and account billing. Financial operations require an account access token and billing-account authorization. Public catalogue operations declare no security requirement.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export declare const withdrawalCurrencyMin = 3;
|
|
10
|
+
export declare const withdrawalCurrencyMax = 3;
|
|
11
|
+
export declare const withdrawalAmountRegExp: RegExp;
|
|
12
|
+
export declare const withdrawalFeeAmountRegExp: RegExp;
|
|
13
|
+
export declare const withdrawalRefundAmountRegExp: RegExp;
|
|
14
|
+
export declare const withdrawalDeductedAmountRegExp: RegExp;
|
|
15
|
+
export declare const withdrawalSettledAmountRegExp: RegExp;
|
|
16
|
+
export declare const withdrawalChargedFeeAmountRegExp: RegExp;
|
|
17
|
+
export declare const Withdrawal: zod.ZodObject<{
|
|
18
|
+
id: zod.ZodUUID;
|
|
19
|
+
billing_account_id: zod.ZodInt;
|
|
20
|
+
currency: zod.ZodString;
|
|
21
|
+
amount: zod.ZodString;
|
|
22
|
+
fee_amount: zod.ZodString;
|
|
23
|
+
refund_amount: zod.ZodString;
|
|
24
|
+
deducted_amount: zod.ZodString;
|
|
25
|
+
settled_amount: zod.ZodString;
|
|
26
|
+
charged_fee_amount: zod.ZodString;
|
|
27
|
+
status: zod.ZodEnum<{
|
|
28
|
+
pending: "pending";
|
|
29
|
+
failed: "failed";
|
|
30
|
+
succeeded: "succeeded";
|
|
31
|
+
processing: "processing";
|
|
32
|
+
partially_completed: "partially_completed";
|
|
33
|
+
reversed: "reversed";
|
|
34
|
+
}>;
|
|
35
|
+
created_at: zod.z.ZodISODateTime;
|
|
36
|
+
completed_at: zod.ZodOptional<zod.z.ZodISODateTime>;
|
|
37
|
+
created_by: zod.ZodOptional<zod.ZodString>;
|
|
38
|
+
}, zod.z.core.$strict>;
|
|
39
|
+
export type Withdrawal = zod.input<typeof Withdrawal>;
|
|
40
|
+
export type WithdrawalOutput = zod.output<typeof Withdrawal>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Billing API
|
|
5
|
+
* Products, prices, orders, subscriptions and account billing. Financial operations require an account access token and billing-account authorization. Public catalogue operations declare no security requirement.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export const withdrawalCurrencyMin = 3;
|
|
10
|
+
export const withdrawalCurrencyMax = 3;
|
|
11
|
+
export const withdrawalAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
|
|
12
|
+
export const withdrawalFeeAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
|
|
13
|
+
export const withdrawalRefundAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
|
|
14
|
+
export const withdrawalDeductedAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
|
|
15
|
+
export const withdrawalSettledAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
|
|
16
|
+
export const withdrawalChargedFeeAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
|
|
17
|
+
export const Withdrawal = zod
|
|
18
|
+
.strictObject({
|
|
19
|
+
id: zod.uuid(),
|
|
20
|
+
billing_account_id: zod.int(),
|
|
21
|
+
currency: zod.string().min(withdrawalCurrencyMin).max(withdrawalCurrencyMax),
|
|
22
|
+
amount: zod.string().regex(withdrawalAmountRegExp),
|
|
23
|
+
fee_amount: zod.string().regex(withdrawalFeeAmountRegExp),
|
|
24
|
+
refund_amount: zod.string().regex(withdrawalRefundAmountRegExp),
|
|
25
|
+
deducted_amount: zod.string().regex(withdrawalDeductedAmountRegExp),
|
|
26
|
+
settled_amount: zod.string().regex(withdrawalSettledAmountRegExp),
|
|
27
|
+
charged_fee_amount: zod.string().regex(withdrawalChargedFeeAmountRegExp),
|
|
28
|
+
status: zod.enum([
|
|
29
|
+
"pending",
|
|
30
|
+
"processing",
|
|
31
|
+
"succeeded",
|
|
32
|
+
"partially_completed",
|
|
33
|
+
"failed",
|
|
34
|
+
"reversed",
|
|
35
|
+
]),
|
|
36
|
+
created_at: zod.iso.datetime({ offset: true }),
|
|
37
|
+
completed_at: zod.iso.datetime({ offset: true }).optional(),
|
|
38
|
+
created_by: zod
|
|
39
|
+
.string()
|
|
40
|
+
.optional()
|
|
41
|
+
.describe("Identity that submitted this withdrawal. It can differ from the billing account owner."),
|
|
42
|
+
})
|
|
43
|
+
.describe("An account withdrawal to the original payment methods of its unused top-ups. Accepted amounts are fixed. deducted_amount, settled_amount and charged_fee_amount report completed source items. Failed items release their principal and fee reservations; successful items are retained when another source fails.");
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Leaflow Billing API
|
|
5
|
+
* Products, prices, orders, subscriptions and account billing. Financial operations require an account access token and billing-account authorization. Public catalogue operations declare no security requirement.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export declare const withdrawalAllocationAmountRegExp: RegExp;
|
|
10
|
+
export declare const withdrawalAllocationFeeAmountRegExp: RegExp;
|
|
11
|
+
export declare const withdrawalAllocationRefundAmountRegExp: RegExp;
|
|
12
|
+
export declare const WithdrawalAllocation: zod.ZodObject<{
|
|
13
|
+
source_transaction_id: zod.ZodUUID;
|
|
14
|
+
amount: zod.ZodString;
|
|
15
|
+
fee_amount: zod.ZodString;
|
|
16
|
+
refund_amount: zod.ZodString;
|
|
17
|
+
}, zod.z.core.$strict>;
|
|
18
|
+
export type WithdrawalAllocation = zod.input<typeof WithdrawalAllocation>;
|
|
19
|
+
export type WithdrawalAllocationOutput = zod.output<typeof WithdrawalAllocation>;
|