@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
|
@@ -103,108 +103,159 @@ export interface CursorPagination {
|
|
|
103
103
|
/** @nullable */
|
|
104
104
|
next_cursor?: string | null;
|
|
105
105
|
}
|
|
106
|
+
export interface WithdrawalAllocation {
|
|
107
|
+
source_transaction_id: string;
|
|
108
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
109
|
+
amount: string;
|
|
110
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
111
|
+
fee_amount: string;
|
|
112
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
113
|
+
refund_amount: string;
|
|
114
|
+
}
|
|
115
|
+
export type WithdrawalItemStatus = (typeof WithdrawalItemStatus)[keyof typeof WithdrawalItemStatus];
|
|
116
|
+
export declare const WithdrawalItemStatus: {
|
|
117
|
+
readonly pending: "pending";
|
|
118
|
+
readonly succeeded: "succeeded";
|
|
119
|
+
readonly failed: "failed";
|
|
120
|
+
readonly reversed: "reversed";
|
|
121
|
+
};
|
|
106
122
|
/**
|
|
107
|
-
*
|
|
108
|
-
* `reverse` charges no tax and leaves it to the customer under the reverse-charge mechanism;
|
|
109
|
-
* invoices state this. Only operators change it.
|
|
123
|
+
* 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.
|
|
110
124
|
*/
|
|
111
|
-
export
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
125
|
+
export interface WithdrawalSource {
|
|
126
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
127
|
+
amount: string;
|
|
128
|
+
/**
|
|
129
|
+
* @minLength 3
|
|
130
|
+
* @maxLength 3
|
|
131
|
+
*/
|
|
132
|
+
currency: string;
|
|
133
|
+
received_at: string;
|
|
134
|
+
payment_gateway: string;
|
|
135
|
+
method_type: string;
|
|
136
|
+
card_brand?: string;
|
|
137
|
+
/** @pattern ^[0-9]{4}$ */
|
|
138
|
+
card_last4?: string;
|
|
139
|
+
}
|
|
117
140
|
/**
|
|
118
|
-
*
|
|
141
|
+
* 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.
|
|
119
142
|
*/
|
|
120
|
-
export interface
|
|
143
|
+
export interface WithdrawalItem {
|
|
144
|
+
source_transaction_id: string;
|
|
145
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
146
|
+
amount: string;
|
|
147
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
148
|
+
fee_amount: string;
|
|
149
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
150
|
+
refund_amount: string;
|
|
121
151
|
id: string;
|
|
152
|
+
withdrawal_id: string;
|
|
122
153
|
billing_account_id: number;
|
|
123
154
|
/**
|
|
124
|
-
* @minLength
|
|
125
|
-
* @maxLength
|
|
155
|
+
* @minLength 3
|
|
156
|
+
* @maxLength 3
|
|
126
157
|
*/
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
158
|
+
currency: string;
|
|
159
|
+
refund_id: string;
|
|
160
|
+
fee_transaction_id?: string;
|
|
161
|
+
status: WithdrawalItemStatus;
|
|
162
|
+
completed_at?: string;
|
|
163
|
+
payment_gateway: string;
|
|
164
|
+
method_type: string;
|
|
165
|
+
source: WithdrawalSource;
|
|
166
|
+
/** The original gateway failure code when a refund failed, or refund_reversed when a completed refund was reversed. Absent while pending or successful. */
|
|
167
|
+
failure_code?: string;
|
|
168
|
+
}
|
|
169
|
+
export type WithdrawalStatus = (typeof WithdrawalStatus)[keyof typeof WithdrawalStatus];
|
|
170
|
+
export declare const WithdrawalStatus: {
|
|
171
|
+
readonly pending: "pending";
|
|
172
|
+
readonly processing: "processing";
|
|
173
|
+
readonly succeeded: "succeeded";
|
|
174
|
+
readonly partially_completed: "partially_completed";
|
|
175
|
+
readonly failed: "failed";
|
|
176
|
+
readonly reversed: "reversed";
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* 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.
|
|
180
|
+
*/
|
|
181
|
+
export interface Withdrawal {
|
|
182
|
+
id: string;
|
|
183
|
+
billing_account_id: number;
|
|
146
184
|
/**
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
* invoices state this. Only operators change it.
|
|
185
|
+
* @minLength 3
|
|
186
|
+
* @maxLength 3
|
|
150
187
|
*/
|
|
151
|
-
|
|
152
|
-
|
|
188
|
+
currency: string;
|
|
189
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
190
|
+
amount: string;
|
|
191
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
192
|
+
fee_amount: string;
|
|
193
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
194
|
+
refund_amount: string;
|
|
195
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
196
|
+
deducted_amount: string;
|
|
197
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
198
|
+
settled_amount: string;
|
|
199
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
200
|
+
charged_fee_amount: string;
|
|
201
|
+
status: WithdrawalStatus;
|
|
153
202
|
created_at: string;
|
|
154
|
-
|
|
155
|
-
|
|
203
|
+
completed_at?: string;
|
|
204
|
+
/** Identity that submitted this withdrawal. It can differ from the billing account owner. */
|
|
205
|
+
created_by?: string;
|
|
206
|
+
}
|
|
207
|
+
export interface WithdrawalPreviewItem {
|
|
208
|
+
source_transaction_id: string;
|
|
209
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
210
|
+
amount: string;
|
|
211
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
212
|
+
fee_amount: string;
|
|
213
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
214
|
+
refund_amount: string;
|
|
215
|
+
source: WithdrawalSource;
|
|
216
|
+
}
|
|
217
|
+
export interface WithdrawalPreview {
|
|
218
|
+
billing_account_id: number;
|
|
156
219
|
/**
|
|
157
|
-
* @minLength
|
|
158
|
-
* @maxLength
|
|
220
|
+
* @minLength 3
|
|
221
|
+
* @maxLength 3
|
|
159
222
|
*/
|
|
160
|
-
|
|
161
|
-
/** @
|
|
162
|
-
|
|
163
|
-
/** @
|
|
164
|
-
|
|
165
|
-
/** @
|
|
166
|
-
|
|
167
|
-
/** @
|
|
168
|
-
|
|
169
|
-
/** @
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
address_postal_code?: string;
|
|
177
|
-
/** @pattern ^([A-Z]{2})?$ */
|
|
178
|
-
address_country?: string;
|
|
223
|
+
currency: string;
|
|
224
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
225
|
+
available_amount: string;
|
|
226
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
227
|
+
amount: string;
|
|
228
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
229
|
+
fee_amount: string;
|
|
230
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
231
|
+
refund_amount: string;
|
|
232
|
+
/** @maxItems 200 */
|
|
233
|
+
items: WithdrawalPreviewItem[];
|
|
234
|
+
}
|
|
235
|
+
export interface WithdrawalPreviewRequest {
|
|
236
|
+
billing_account_id: number;
|
|
237
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
238
|
+
amount?: string;
|
|
179
239
|
}
|
|
180
|
-
export interface
|
|
240
|
+
export interface WithdrawalCreate {
|
|
241
|
+
id: string;
|
|
242
|
+
billing_account_id: number;
|
|
243
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
244
|
+
amount: string;
|
|
245
|
+
/** @pattern ^[0-9]{1,15}([.][0-9]{1,10})?$ */
|
|
246
|
+
expected_refund_amount: string;
|
|
181
247
|
/**
|
|
182
|
-
* @
|
|
183
|
-
* @
|
|
248
|
+
* @minItems 1
|
|
249
|
+
* @maxItems 200
|
|
184
250
|
*/
|
|
185
|
-
|
|
186
|
-
/** @maxLength 255 */
|
|
187
|
-
legal_name?: string;
|
|
188
|
-
/** @maxLength 255 */
|
|
189
|
-
email?: string;
|
|
190
|
-
/** @maxLength 64 */
|
|
191
|
-
tax_id?: string;
|
|
192
|
-
/** @maxLength 255 */
|
|
193
|
-
address_line1?: string;
|
|
194
|
-
/** @maxLength 255 */
|
|
195
|
-
address_line2?: string;
|
|
196
|
-
/** @maxLength 128 */
|
|
197
|
-
address_city?: string;
|
|
198
|
-
/** @maxLength 128 */
|
|
199
|
-
address_state?: string;
|
|
200
|
-
/** @maxLength 32 */
|
|
201
|
-
address_postal_code?: string;
|
|
202
|
-
/** @pattern ^([A-Z]{2})?$ */
|
|
203
|
-
address_country?: string;
|
|
204
|
-
active?: boolean;
|
|
251
|
+
expected_items: WithdrawalAllocation[];
|
|
205
252
|
}
|
|
206
|
-
export interface
|
|
207
|
-
items:
|
|
253
|
+
export interface WithdrawalList {
|
|
254
|
+
items: Withdrawal[];
|
|
255
|
+
pagination: OffsetPagination;
|
|
256
|
+
}
|
|
257
|
+
export interface WithdrawalItemList {
|
|
258
|
+
items: WithdrawalItem[];
|
|
208
259
|
pagination: OffsetPagination;
|
|
209
260
|
}
|
|
210
261
|
/**
|
|
@@ -1281,6 +1332,7 @@ export declare const TransactionType: {
|
|
|
1281
1332
|
readonly payment: "payment";
|
|
1282
1333
|
readonly refund: "refund";
|
|
1283
1334
|
readonly adjustment: "adjustment";
|
|
1335
|
+
readonly fee: "fee";
|
|
1284
1336
|
};
|
|
1285
1337
|
/**
|
|
1286
1338
|
* 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.
|
|
@@ -2892,6 +2944,110 @@ export interface QuoteRequest {
|
|
|
2892
2944
|
promotion_code?: string;
|
|
2893
2945
|
refund?: OrderRefundQuoteInput;
|
|
2894
2946
|
}
|
|
2947
|
+
/**
|
|
2948
|
+
* How tax applies to the customer, as in Stripe. `none` taxes normally. `exempt` charges no tax.
|
|
2949
|
+
* `reverse` charges no tax and leaves it to the customer under the reverse-charge mechanism;
|
|
2950
|
+
* invoices state this. Only operators change it.
|
|
2951
|
+
*/
|
|
2952
|
+
export type ContactTaxExempt = (typeof ContactTaxExempt)[keyof typeof ContactTaxExempt];
|
|
2953
|
+
export declare const ContactTaxExempt: {
|
|
2954
|
+
readonly none: "none";
|
|
2955
|
+
readonly exempt: "exempt";
|
|
2956
|
+
readonly reverse: "reverse";
|
|
2957
|
+
};
|
|
2958
|
+
/**
|
|
2959
|
+
* A billing-account contact profile with one address. An account can hold multiple contacts; this is not a login identity.
|
|
2960
|
+
*/
|
|
2961
|
+
export interface Contact {
|
|
2962
|
+
id: string;
|
|
2963
|
+
billing_account_id: number;
|
|
2964
|
+
/**
|
|
2965
|
+
* @minLength 1
|
|
2966
|
+
* @maxLength 255
|
|
2967
|
+
*/
|
|
2968
|
+
name: string;
|
|
2969
|
+
/** @maxLength 255 */
|
|
2970
|
+
legal_name?: string;
|
|
2971
|
+
/** @maxLength 255 */
|
|
2972
|
+
email?: string;
|
|
2973
|
+
/** @maxLength 64 */
|
|
2974
|
+
tax_id?: string;
|
|
2975
|
+
/** @maxLength 255 */
|
|
2976
|
+
address_line1?: string;
|
|
2977
|
+
/** @maxLength 255 */
|
|
2978
|
+
address_line2?: string;
|
|
2979
|
+
/** @maxLength 128 */
|
|
2980
|
+
address_city?: string;
|
|
2981
|
+
/** @maxLength 128 */
|
|
2982
|
+
address_state?: string;
|
|
2983
|
+
/** @maxLength 32 */
|
|
2984
|
+
address_postal_code?: string;
|
|
2985
|
+
/** @pattern ^([A-Z]{2})?$ */
|
|
2986
|
+
address_country?: string;
|
|
2987
|
+
/**
|
|
2988
|
+
* How tax applies to the customer, as in Stripe. `none` taxes normally. `exempt` charges no tax.
|
|
2989
|
+
* `reverse` charges no tax and leaves it to the customer under the reverse-charge mechanism;
|
|
2990
|
+
* invoices state this. Only operators change it.
|
|
2991
|
+
*/
|
|
2992
|
+
tax_exempt: ContactTaxExempt;
|
|
2993
|
+
active: boolean;
|
|
2994
|
+
created_at: string;
|
|
2995
|
+
}
|
|
2996
|
+
export interface ContactCreate {
|
|
2997
|
+
/**
|
|
2998
|
+
* @minLength 1
|
|
2999
|
+
* @maxLength 255
|
|
3000
|
+
*/
|
|
3001
|
+
name: string;
|
|
3002
|
+
/** @maxLength 255 */
|
|
3003
|
+
legal_name?: string;
|
|
3004
|
+
/** @maxLength 255 */
|
|
3005
|
+
email?: string;
|
|
3006
|
+
/** @maxLength 64 */
|
|
3007
|
+
tax_id?: string;
|
|
3008
|
+
/** @maxLength 255 */
|
|
3009
|
+
address_line1?: string;
|
|
3010
|
+
/** @maxLength 255 */
|
|
3011
|
+
address_line2?: string;
|
|
3012
|
+
/** @maxLength 128 */
|
|
3013
|
+
address_city?: string;
|
|
3014
|
+
/** @maxLength 128 */
|
|
3015
|
+
address_state?: string;
|
|
3016
|
+
/** @maxLength 32 */
|
|
3017
|
+
address_postal_code?: string;
|
|
3018
|
+
/** @pattern ^([A-Z]{2})?$ */
|
|
3019
|
+
address_country?: string;
|
|
3020
|
+
}
|
|
3021
|
+
export interface ContactUpdate {
|
|
3022
|
+
/**
|
|
3023
|
+
* @minLength 1
|
|
3024
|
+
* @maxLength 255
|
|
3025
|
+
*/
|
|
3026
|
+
name?: string;
|
|
3027
|
+
/** @maxLength 255 */
|
|
3028
|
+
legal_name?: string;
|
|
3029
|
+
/** @maxLength 255 */
|
|
3030
|
+
email?: string;
|
|
3031
|
+
/** @maxLength 64 */
|
|
3032
|
+
tax_id?: string;
|
|
3033
|
+
/** @maxLength 255 */
|
|
3034
|
+
address_line1?: string;
|
|
3035
|
+
/** @maxLength 255 */
|
|
3036
|
+
address_line2?: string;
|
|
3037
|
+
/** @maxLength 128 */
|
|
3038
|
+
address_city?: string;
|
|
3039
|
+
/** @maxLength 128 */
|
|
3040
|
+
address_state?: string;
|
|
3041
|
+
/** @maxLength 32 */
|
|
3042
|
+
address_postal_code?: string;
|
|
3043
|
+
/** @pattern ^([A-Z]{2})?$ */
|
|
3044
|
+
address_country?: string;
|
|
3045
|
+
active?: boolean;
|
|
3046
|
+
}
|
|
3047
|
+
export interface ContactList {
|
|
3048
|
+
items: Contact[];
|
|
3049
|
+
pagination: OffsetPagination;
|
|
3050
|
+
}
|
|
2895
3051
|
export interface CancelSubscriptionRequest {
|
|
2896
3052
|
mode: TerminationPolicy;
|
|
2897
3053
|
/** For immediate cancellation, the quoted whole-second refund basis. Now when omitted. */
|
|
@@ -5,10 +5,19 @@ export const InvoiceStatus = {
|
|
|
5
5
|
void: "void",
|
|
6
6
|
uncollectible: "uncollectible",
|
|
7
7
|
};
|
|
8
|
-
export const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
export const WithdrawalItemStatus = {
|
|
9
|
+
pending: "pending",
|
|
10
|
+
succeeded: "succeeded",
|
|
11
|
+
failed: "failed",
|
|
12
|
+
reversed: "reversed",
|
|
13
|
+
};
|
|
14
|
+
export const WithdrawalStatus = {
|
|
15
|
+
pending: "pending",
|
|
16
|
+
processing: "processing",
|
|
17
|
+
succeeded: "succeeded",
|
|
18
|
+
partially_completed: "partially_completed",
|
|
19
|
+
failed: "failed",
|
|
20
|
+
reversed: "reversed",
|
|
12
21
|
};
|
|
13
22
|
export const TerminationPolicy = {
|
|
14
23
|
immediate: "immediate",
|
|
@@ -143,6 +152,7 @@ export const TransactionType = {
|
|
|
143
152
|
payment: "payment",
|
|
144
153
|
refund: "refund",
|
|
145
154
|
adjustment: "adjustment",
|
|
155
|
+
fee: "fee",
|
|
146
156
|
};
|
|
147
157
|
export const InvoiceCustomerTaxExempt = {
|
|
148
158
|
none: "none",
|
|
@@ -353,6 +363,11 @@ export const ActiveResourceStatus = {
|
|
|
353
363
|
closing: "closing",
|
|
354
364
|
closed: "closed",
|
|
355
365
|
};
|
|
366
|
+
export const ContactTaxExempt = {
|
|
367
|
+
none: "none",
|
|
368
|
+
exempt: "exempt",
|
|
369
|
+
reverse: "reverse",
|
|
370
|
+
};
|
|
356
371
|
export const StatementStatus = {
|
|
357
372
|
open: "open",
|
|
358
373
|
closed: "closed",
|
|
@@ -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
|
+
* Billing Order Types
|
|
5
|
+
* The Billing order a product purchase placed. Types only; this document declares no operations.
|
|
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
|
+
* Billing Order Types
|
|
5
|
+
* The Billing order a product purchase placed. Types only; this document declares no operations.
|
|
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
|
+
* Billing Order Types
|
|
5
|
+
* The Billing order a product purchase placed. Types only; this document declares no operations.
|
|
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>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Billing Order Types
|
|
5
|
+
* The Billing order a product purchase placed. Types only; this document declares no operations.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export const withdrawalAllocationAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
|
|
10
|
+
export const withdrawalAllocationFeeAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
|
|
11
|
+
export const withdrawalAllocationRefundAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
|
|
12
|
+
export const WithdrawalAllocation = zod.strictObject({
|
|
13
|
+
source_transaction_id: zod.uuid(),
|
|
14
|
+
amount: zod.string().regex(withdrawalAllocationAmountRegExp),
|
|
15
|
+
fee_amount: zod.string().regex(withdrawalAllocationFeeAmountRegExp),
|
|
16
|
+
refund_amount: zod.string().regex(withdrawalAllocationRefundAmountRegExp),
|
|
17
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Billing Order Types
|
|
5
|
+
* The Billing order a product purchase placed. Types only; this document declares no operations.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
export declare const withdrawalCreateAmountRegExp: RegExp;
|
|
10
|
+
export declare const withdrawalCreateExpectedRefundAmountRegExp: RegExp;
|
|
11
|
+
export declare const withdrawalCreateExpectedItemsMax = 200;
|
|
12
|
+
export declare const WithdrawalCreate: zod.ZodObject<{
|
|
13
|
+
id: zod.ZodUUID;
|
|
14
|
+
billing_account_id: zod.ZodInt;
|
|
15
|
+
amount: zod.ZodString;
|
|
16
|
+
expected_refund_amount: zod.ZodString;
|
|
17
|
+
expected_items: zod.ZodArray<zod.ZodObject<{
|
|
18
|
+
source_transaction_id: zod.ZodUUID;
|
|
19
|
+
amount: zod.ZodString;
|
|
20
|
+
fee_amount: zod.ZodString;
|
|
21
|
+
refund_amount: zod.ZodString;
|
|
22
|
+
}, zod.z.core.$strict>>;
|
|
23
|
+
}, zod.z.core.$strict>;
|
|
24
|
+
export type WithdrawalCreate = zod.input<typeof WithdrawalCreate>;
|
|
25
|
+
export type WithdrawalCreateOutput = zod.output<typeof WithdrawalCreate>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Billing Order Types
|
|
5
|
+
* The Billing order a product purchase placed. Types only; this document declares no operations.
|
|
6
|
+
* OpenAPI spec version: v1
|
|
7
|
+
*/
|
|
8
|
+
import * as zod from "zod";
|
|
9
|
+
import { WithdrawalAllocation } from "./withdrawalAllocation.zod.js";
|
|
10
|
+
export const withdrawalCreateAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
|
|
11
|
+
export const withdrawalCreateExpectedRefundAmountRegExp = new RegExp("^[0-9]{1,15}([.][0-9]{1,10})?$");
|
|
12
|
+
export const withdrawalCreateExpectedItemsMax = 200;
|
|
13
|
+
export const WithdrawalCreate = zod.strictObject({
|
|
14
|
+
id: zod.uuid(),
|
|
15
|
+
billing_account_id: zod.int(),
|
|
16
|
+
amount: zod.string().regex(withdrawalCreateAmountRegExp),
|
|
17
|
+
expected_refund_amount: zod.string().regex(withdrawalCreateExpectedRefundAmountRegExp),
|
|
18
|
+
expected_items: zod.array(WithdrawalAllocation).min(1).max(withdrawalCreateExpectedItemsMax),
|
|
19
|
+
});
|