@inkress/admin-sdk 1.0.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +213 -0
- package/README.md +1174 -87
- package/dist/client.d.ts +3 -3
- package/dist/client.d.ts.map +1 -1
- package/dist/data-mappings.d.ts +177 -0
- package/dist/data-mappings.d.ts.map +1 -0
- package/dist/index.d.ts +34 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +4151 -154
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4188 -153
- package/dist/index.js.map +1 -1
- package/dist/resources/addresses.d.ts +58 -0
- package/dist/resources/addresses.d.ts.map +1 -0
- package/dist/resources/billing-plans.d.ts +32 -15
- package/dist/resources/billing-plans.d.ts.map +1 -1
- package/dist/resources/categories.d.ts +30 -20
- package/dist/resources/categories.d.ts.map +1 -1
- package/dist/resources/currencies.d.ts +41 -0
- package/dist/resources/currencies.d.ts.map +1 -0
- package/dist/resources/exchange-rates.d.ts +50 -0
- package/dist/resources/exchange-rates.d.ts.map +1 -0
- package/dist/resources/fees.d.ts +58 -0
- package/dist/resources/fees.d.ts.map +1 -0
- package/dist/resources/financial-accounts.d.ts +47 -0
- package/dist/resources/financial-accounts.d.ts.map +1 -0
- package/dist/resources/financial-requests.d.ts +51 -0
- package/dist/resources/financial-requests.d.ts.map +1 -0
- package/dist/resources/generics.d.ts +57 -0
- package/dist/resources/generics.d.ts.map +1 -0
- package/dist/resources/kyc.d.ts +118 -0
- package/dist/resources/kyc.d.ts.map +1 -0
- package/dist/resources/merchants.d.ts +52 -15
- package/dist/resources/merchants.d.ts.map +1 -1
- package/dist/resources/orders.d.ts +74 -28
- package/dist/resources/orders.d.ts.map +1 -1
- package/dist/resources/payment-links.d.ts +65 -0
- package/dist/resources/payment-links.d.ts.map +1 -0
- package/dist/resources/payment-methods.d.ts +48 -0
- package/dist/resources/payment-methods.d.ts.map +1 -0
- package/dist/resources/products.d.ts +62 -16
- package/dist/resources/products.d.ts.map +1 -1
- package/dist/resources/public.d.ts +33 -7
- package/dist/resources/public.d.ts.map +1 -1
- package/dist/resources/subscriptions.d.ts +69 -25
- package/dist/resources/subscriptions.d.ts.map +1 -1
- package/dist/resources/tokens.d.ts +62 -0
- package/dist/resources/tokens.d.ts.map +1 -0
- package/dist/resources/transaction-entries.d.ts +48 -0
- package/dist/resources/transaction-entries.d.ts.map +1 -0
- package/dist/resources/users.d.ts +43 -21
- package/dist/resources/users.d.ts.map +1 -1
- package/dist/resources/webhook-urls.d.ts +49 -0
- package/dist/resources/webhook-urls.d.ts.map +1 -0
- package/dist/types/resources.d.ts +1294 -0
- package/dist/types/resources.d.ts.map +1 -0
- package/dist/types.d.ts +1260 -183
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/query-builders.d.ts +518 -0
- package/dist/utils/query-builders.d.ts.map +1 -0
- package/dist/utils/query-transformer.d.ts +123 -0
- package/dist/utils/query-transformer.d.ts.map +1 -0
- package/dist/utils/translators.d.ts +126 -0
- package/dist/utils/translators.d.ts.map +1 -0
- package/dist/utils/webhooks.d.ts +19 -4
- package/dist/utils/webhooks.d.ts.map +1 -1
- package/package.json +14 -4
package/dist/types.d.ts
CHANGED
|
@@ -1,12 +1,38 @@
|
|
|
1
|
+
import type { FeeStructureKey, KindKey, StatusKey } from './utils/translators';
|
|
2
|
+
/**
|
|
3
|
+
* IMPORTANT: Types have been updated to match the database schema:
|
|
4
|
+
*
|
|
5
|
+
* 1. Field naming: Uses `inserted_at` and `updated_at` (not `created_at`)
|
|
6
|
+
* 2. Filtering: All list operations support filtering on any database field
|
|
7
|
+
* 3. Immutable fields: `id`, `uid`, `inserted_at`, and `updated_at` are never included in Create/Update types
|
|
8
|
+
* 4. Status/Kind values: Use contextual string codes (e.g., 'confirmed' instead of 'order_confirmed')
|
|
9
|
+
* 5. Fee structures: Use string codes that are automatically translated to integers
|
|
10
|
+
* 6. Translation: All status, kind, and fee structure fields accept contextual strings and return contextual strings
|
|
11
|
+
*/
|
|
12
|
+
export type OrderStatus = 'pending' | 'error' | 'paid' | 'partial' | 'confirmed' | 'cancelled' | 'prepared' | 'shipped' | 'delivered' | 'completed' | 'returned' | 'refunded' | 'verifying' | 'stale' | 'archived';
|
|
13
|
+
export type OrderKind = 'online' | 'payment_link' | 'cart' | 'subscription' | 'invoice' | 'offline';
|
|
14
|
+
export type ProductStatus = 'draft' | 'published' | 'archived';
|
|
15
|
+
export type ProductKind = 'draft' | 'published' | 'archived';
|
|
16
|
+
export type AccountStatus = 'pending' | 'approved' | 'suspended' | 'rejected' | 'disabled';
|
|
17
|
+
export type UserKind = 'address' | 'preset' | 'organisation' | 'store';
|
|
18
|
+
export type SubscriptionStatus = 'pending' | 'active' | 'cancelled' | 'adhoc_charged';
|
|
19
|
+
export type TransactionStatus = 'pending' | 'authorized' | 'hold' | 'captured' | 'voided' | 'refunded' | 'processed';
|
|
20
|
+
export type BillingPlanKind = 'subscription' | 'payout';
|
|
21
|
+
export type BillingStatus = 'active' | 'inactive';
|
|
22
|
+
export type CategoryKind = ProductKind;
|
|
23
|
+
export type KycKind = 'document_submission' | 'bank_info_update' | 'limit_increase';
|
|
24
|
+
export type KycStatus = 'pending' | 'in_review' | 'approved' | 'rejected';
|
|
25
|
+
export type { QueryParams, RangeQuery, StringQuery, DateQuery, JsonQueryParams } from './utils/query-transformer';
|
|
26
|
+
export type { OrderQueryParams, ProductQueryParams, CategoryQueryParams, UserQueryParams, MerchantQueryParams, BillingPlanQueryParams, SubscriptionQueryParams, } from './types/resources';
|
|
1
27
|
export interface InkressConfig {
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
/** API
|
|
5
|
-
|
|
28
|
+
/** Access token for authentication */
|
|
29
|
+
accessToken: string;
|
|
30
|
+
/** API mode - 'live' (https://api.inkress.com) or 'sandbox' (https://api-dev.inkress.com) */
|
|
31
|
+
mode?: 'live' | 'sandbox';
|
|
6
32
|
/** API version */
|
|
7
33
|
apiVersion?: string;
|
|
8
|
-
/**
|
|
9
|
-
|
|
34
|
+
/** Merchant username (will be prepended with 'm-' for client ID) */
|
|
35
|
+
username?: string;
|
|
10
36
|
/** Request timeout in milliseconds */
|
|
11
37
|
timeout?: number;
|
|
12
38
|
/** Number of retry attempts */
|
|
@@ -17,8 +43,24 @@ export interface InkressConfig {
|
|
|
17
43
|
export interface PaginationParams {
|
|
18
44
|
page?: number;
|
|
19
45
|
per_page?: number;
|
|
46
|
+
page_size?: number;
|
|
20
47
|
sort?: string;
|
|
21
48
|
order?: 'asc' | 'desc';
|
|
49
|
+
order_by?: string;
|
|
50
|
+
limit?: number;
|
|
51
|
+
}
|
|
52
|
+
export interface BaseFilterParams extends PaginationParams {
|
|
53
|
+
/** General search query - searches across multiple fields automatically */
|
|
54
|
+
q?: string;
|
|
55
|
+
/** Legacy search field - use 'q' instead for new implementations */
|
|
56
|
+
search?: string;
|
|
57
|
+
/** Exclude specific records */
|
|
58
|
+
exclude?: string | number;
|
|
59
|
+
/** Return distinct values */
|
|
60
|
+
distinct?: string;
|
|
61
|
+
/** Override page behavior */
|
|
62
|
+
override_page?: string | boolean;
|
|
63
|
+
[key: string]: any;
|
|
22
64
|
}
|
|
23
65
|
export interface PaginatedResponse<T> {
|
|
24
66
|
data: T[];
|
|
@@ -31,12 +73,11 @@ export interface PaginatedResponse<T> {
|
|
|
31
73
|
}
|
|
32
74
|
export interface ApiResponse<T = any> {
|
|
33
75
|
state: 'ok' | 'error';
|
|
34
|
-
data?: T;
|
|
35
76
|
result?: T;
|
|
36
77
|
}
|
|
37
78
|
export interface ErrorResponse {
|
|
38
79
|
state: 'error';
|
|
39
|
-
|
|
80
|
+
result: {
|
|
40
81
|
result: string;
|
|
41
82
|
} | {
|
|
42
83
|
reason: string;
|
|
@@ -44,26 +85,90 @@ export interface ErrorResponse {
|
|
|
44
85
|
}
|
|
45
86
|
export interface ValidationError {
|
|
46
87
|
state: 'error';
|
|
47
|
-
|
|
88
|
+
result: Record<string, string[]>;
|
|
48
89
|
}
|
|
49
90
|
export interface Currency {
|
|
50
91
|
id: number;
|
|
51
92
|
code: string;
|
|
52
93
|
symbol: string;
|
|
53
94
|
name: string;
|
|
95
|
+
flag?: string;
|
|
96
|
+
is_float: boolean;
|
|
97
|
+
inserted_at?: string;
|
|
98
|
+
updated_at?: string;
|
|
99
|
+
}
|
|
100
|
+
export interface CreateCurrencyData {
|
|
101
|
+
code: string;
|
|
102
|
+
symbol: string;
|
|
103
|
+
name: string;
|
|
104
|
+
flag?: string;
|
|
105
|
+
is_float: boolean;
|
|
106
|
+
}
|
|
107
|
+
export interface UpdateCurrencyData {
|
|
108
|
+
code?: string;
|
|
109
|
+
symbol?: string;
|
|
110
|
+
name?: string;
|
|
111
|
+
flag?: string;
|
|
112
|
+
is_float?: boolean;
|
|
54
113
|
}
|
|
55
114
|
export interface Organisation {
|
|
56
115
|
id: number;
|
|
116
|
+
uid: string;
|
|
57
117
|
name: string;
|
|
58
|
-
|
|
118
|
+
email?: string;
|
|
119
|
+
phone?: string;
|
|
120
|
+
about?: string;
|
|
121
|
+
logo?: string;
|
|
122
|
+
business_type?: string;
|
|
123
|
+
status: AccountStatus;
|
|
124
|
+
timezone?: string;
|
|
125
|
+
data?: Record<string, any>;
|
|
126
|
+
domain_id?: number;
|
|
127
|
+
owner_id?: number;
|
|
128
|
+
default_merchant_id?: number;
|
|
129
|
+
inserted_at: string;
|
|
130
|
+
updated_at: string;
|
|
59
131
|
}
|
|
60
132
|
export interface Address {
|
|
61
|
-
|
|
62
|
-
|
|
133
|
+
id?: number;
|
|
134
|
+
hash?: string;
|
|
135
|
+
kind: number;
|
|
136
|
+
kind_id: number;
|
|
137
|
+
lang?: number;
|
|
138
|
+
lat?: number;
|
|
139
|
+
street: string;
|
|
140
|
+
street_optional?: string;
|
|
63
141
|
city: string;
|
|
64
|
-
state
|
|
65
|
-
|
|
142
|
+
state: string;
|
|
143
|
+
country: string;
|
|
144
|
+
region: string;
|
|
145
|
+
town: string;
|
|
146
|
+
inserted_at?: string;
|
|
147
|
+
updated_at?: string;
|
|
148
|
+
}
|
|
149
|
+
export interface CreateAddressData {
|
|
150
|
+
kind: number;
|
|
151
|
+
kind_id: number;
|
|
152
|
+
lang?: number;
|
|
153
|
+
lat?: number;
|
|
154
|
+
street: string;
|
|
155
|
+
street_optional?: string;
|
|
156
|
+
city: string;
|
|
157
|
+
state: string;
|
|
66
158
|
country: string;
|
|
159
|
+
region: string;
|
|
160
|
+
town: string;
|
|
161
|
+
}
|
|
162
|
+
export interface UpdateAddressData {
|
|
163
|
+
lang?: number;
|
|
164
|
+
lat?: number;
|
|
165
|
+
street?: string;
|
|
166
|
+
street_optional?: string;
|
|
167
|
+
city?: string;
|
|
168
|
+
state?: string;
|
|
169
|
+
country?: string;
|
|
170
|
+
region?: string;
|
|
171
|
+
town?: string;
|
|
67
172
|
}
|
|
68
173
|
export interface Merchant {
|
|
69
174
|
id: number;
|
|
@@ -73,64 +178,106 @@ export interface Merchant {
|
|
|
73
178
|
about?: string;
|
|
74
179
|
logo?: string;
|
|
75
180
|
sector?: string;
|
|
76
|
-
status:
|
|
181
|
+
status: AccountStatus;
|
|
77
182
|
phone?: string;
|
|
78
183
|
business_type?: string;
|
|
79
184
|
theme_colour?: string;
|
|
80
185
|
uid: string;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
platform_fee_structure:
|
|
86
|
-
provider_fee_structure:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
town?: string;
|
|
91
|
-
city?: string;
|
|
92
|
-
province?: string;
|
|
93
|
-
region?: string;
|
|
94
|
-
};
|
|
95
|
-
data?: {
|
|
96
|
-
pickup_locations?: Array<{
|
|
97
|
-
name: string;
|
|
98
|
-
address: string;
|
|
99
|
-
}>;
|
|
100
|
-
support_phone?: string;
|
|
101
|
-
support_email?: string;
|
|
102
|
-
business_setup?: string;
|
|
103
|
-
bank_info?: {
|
|
104
|
-
account_holder_name?: string;
|
|
105
|
-
account_holder_type?: 'Business' | 'Individual';
|
|
106
|
-
account_number?: string;
|
|
107
|
-
account_type?: 'Checking' | 'Savings';
|
|
108
|
-
bank_name?: string;
|
|
109
|
-
branch_name?: string;
|
|
110
|
-
branch_code?: string;
|
|
111
|
-
routing_number?: string;
|
|
112
|
-
swift_code?: string;
|
|
113
|
-
};
|
|
114
|
-
registration_webhook?: string;
|
|
115
|
-
};
|
|
116
|
-
organisation?: Organisation;
|
|
117
|
-
domain?: {
|
|
118
|
-
cname?: string;
|
|
119
|
-
};
|
|
120
|
-
created_at: string;
|
|
186
|
+
address_id?: number;
|
|
187
|
+
owner_id?: number;
|
|
188
|
+
domain_id?: number;
|
|
189
|
+
organisation_id?: number;
|
|
190
|
+
platform_fee_structure: FeeStructureKey;
|
|
191
|
+
provider_fee_structure: FeeStructureKey;
|
|
192
|
+
parent_merchant_id?: number;
|
|
193
|
+
data?: Record<string, any>;
|
|
194
|
+
inserted_at: string;
|
|
121
195
|
updated_at: string;
|
|
196
|
+
address?: Address;
|
|
197
|
+
owner?: User;
|
|
198
|
+
organisation?: Organisation;
|
|
199
|
+
parent_merchant?: Merchant;
|
|
122
200
|
}
|
|
123
201
|
export interface CreateMerchantData {
|
|
124
202
|
name: string;
|
|
125
203
|
email: string;
|
|
126
204
|
phone?: string;
|
|
127
205
|
about?: string;
|
|
206
|
+
username?: string;
|
|
207
|
+
logo?: string;
|
|
208
|
+
sector?: string;
|
|
209
|
+
business_type?: string;
|
|
210
|
+
theme_colour?: string;
|
|
211
|
+
address_id?: number;
|
|
212
|
+
owner_id?: number;
|
|
213
|
+
domain_id?: number;
|
|
214
|
+
organisation_id?: number;
|
|
215
|
+
platform_fee_structure?: FeeStructureKey;
|
|
216
|
+
provider_fee_structure?: FeeStructureKey;
|
|
217
|
+
parent_merchant_id?: number;
|
|
218
|
+
data?: Record<string, any>;
|
|
128
219
|
}
|
|
129
220
|
export interface UpdateMerchantData {
|
|
130
221
|
name?: string;
|
|
131
222
|
email?: string;
|
|
132
223
|
phone?: string;
|
|
133
224
|
about?: string;
|
|
225
|
+
username?: string;
|
|
226
|
+
logo?: string;
|
|
227
|
+
sector?: string;
|
|
228
|
+
status?: AccountStatus;
|
|
229
|
+
business_type?: string;
|
|
230
|
+
theme_colour?: string;
|
|
231
|
+
address_id?: number;
|
|
232
|
+
owner_id?: number;
|
|
233
|
+
domain_id?: number;
|
|
234
|
+
organisation_id?: number;
|
|
235
|
+
platform_fee_structure?: FeeStructureKey;
|
|
236
|
+
provider_fee_structure?: FeeStructureKey;
|
|
237
|
+
parent_merchant_id?: number;
|
|
238
|
+
data?: Record<string, any>;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* @deprecated These interfaces may not align with current API - endpoints not found in OpenAPI spec
|
|
242
|
+
*/
|
|
243
|
+
export interface MerchantBalance {
|
|
244
|
+
available: number;
|
|
245
|
+
pending: number;
|
|
246
|
+
currency: string;
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* @deprecated These interfaces may not align with current API - endpoints not found in OpenAPI spec
|
|
250
|
+
*/
|
|
251
|
+
export interface MerchantLimits {
|
|
252
|
+
transaction_limit: number;
|
|
253
|
+
daily_limit: number;
|
|
254
|
+
monthly_limit: number;
|
|
255
|
+
currency: string;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* @deprecated These interfaces may not align with current API - endpoints not found in OpenAPI spec
|
|
259
|
+
*/
|
|
260
|
+
export interface MerchantSubscription {
|
|
261
|
+
plan_name: string;
|
|
262
|
+
status: string;
|
|
263
|
+
billing_cycle: string;
|
|
264
|
+
price: number;
|
|
265
|
+
currency: string;
|
|
266
|
+
features: string[];
|
|
267
|
+
next_billing_date?: string;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* @deprecated These interfaces may not align with current API - endpoints not found in OpenAPI spec
|
|
271
|
+
*/
|
|
272
|
+
export interface MerchantInvoice {
|
|
273
|
+
id: string;
|
|
274
|
+
invoice_number: string;
|
|
275
|
+
amount: number;
|
|
276
|
+
currency: string;
|
|
277
|
+
status: string;
|
|
278
|
+
due_date: string;
|
|
279
|
+
issued_date: string;
|
|
280
|
+
paid_date?: string;
|
|
134
281
|
}
|
|
135
282
|
export interface PublicMerchant {
|
|
136
283
|
id: number;
|
|
@@ -147,28 +294,26 @@ export interface Category {
|
|
|
147
294
|
id: number;
|
|
148
295
|
name: string;
|
|
149
296
|
description?: string | null;
|
|
150
|
-
kind:
|
|
297
|
+
kind: CategoryKind;
|
|
151
298
|
kind_id?: number | null;
|
|
152
299
|
parent_id?: number | null;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
name: string;
|
|
156
|
-
} | null;
|
|
157
|
-
children?: {
|
|
158
|
-
id: number;
|
|
159
|
-
name: string;
|
|
160
|
-
}[];
|
|
161
|
-
created_at: string;
|
|
300
|
+
uid: string;
|
|
301
|
+
inserted_at: string;
|
|
162
302
|
updated_at: string;
|
|
303
|
+
parent?: Category;
|
|
163
304
|
}
|
|
164
305
|
export interface CreateCategoryData {
|
|
165
306
|
name: string;
|
|
166
307
|
description?: string;
|
|
167
|
-
kind:
|
|
308
|
+
kind: CategoryKind;
|
|
168
309
|
kind_id?: number;
|
|
169
310
|
parent_id?: number;
|
|
170
311
|
}
|
|
171
|
-
export interface UpdateCategoryData
|
|
312
|
+
export interface UpdateCategoryData {
|
|
313
|
+
name?: string;
|
|
314
|
+
description?: string;
|
|
315
|
+
kind?: KindKey;
|
|
316
|
+
kind_id?: number;
|
|
172
317
|
}
|
|
173
318
|
export interface Product {
|
|
174
319
|
id: number;
|
|
@@ -177,7 +322,7 @@ export interface Product {
|
|
|
177
322
|
price: number;
|
|
178
323
|
permalink: string;
|
|
179
324
|
image?: string | null;
|
|
180
|
-
status:
|
|
325
|
+
status: ProductStatus;
|
|
181
326
|
public: boolean;
|
|
182
327
|
unlimited: boolean;
|
|
183
328
|
units_remaining?: number | null;
|
|
@@ -187,12 +332,15 @@ export interface Product {
|
|
|
187
332
|
tag_ids: number[];
|
|
188
333
|
data?: Record<string, any>;
|
|
189
334
|
meta?: Record<string, any>;
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
335
|
+
uid: string;
|
|
336
|
+
category_id?: number;
|
|
337
|
+
currency_id?: number;
|
|
338
|
+
user_id?: number;
|
|
339
|
+
inserted_at: string;
|
|
195
340
|
updated_at: string;
|
|
341
|
+
category?: Category;
|
|
342
|
+
currency?: Currency;
|
|
343
|
+
user?: User;
|
|
196
344
|
}
|
|
197
345
|
export interface CreateProductData {
|
|
198
346
|
title: string;
|
|
@@ -206,49 +354,261 @@ export interface CreateProductData {
|
|
|
206
354
|
tag_ids?: number[];
|
|
207
355
|
data?: Record<string, any>;
|
|
208
356
|
meta?: Record<string, any>;
|
|
357
|
+
category_id?: number;
|
|
358
|
+
currency_id?: number;
|
|
359
|
+
user_id?: number;
|
|
209
360
|
}
|
|
210
|
-
export interface UpdateProductData
|
|
211
|
-
|
|
361
|
+
export interface UpdateProductData {
|
|
362
|
+
title?: string;
|
|
363
|
+
teaser?: string;
|
|
364
|
+
price?: number;
|
|
365
|
+
permalink?: string;
|
|
366
|
+
image?: string;
|
|
367
|
+
status?: StatusKey;
|
|
368
|
+
public?: boolean;
|
|
369
|
+
unlimited?: boolean;
|
|
370
|
+
units_remaining?: number;
|
|
371
|
+
tag_ids?: number[];
|
|
372
|
+
data?: Record<string, any>;
|
|
373
|
+
meta?: Record<string, any>;
|
|
374
|
+
category_id?: number;
|
|
375
|
+
currency_id?: number;
|
|
376
|
+
user_id?: number;
|
|
212
377
|
}
|
|
213
378
|
export interface Order {
|
|
214
379
|
id: number;
|
|
215
380
|
reference_id?: string;
|
|
216
381
|
total: number;
|
|
217
|
-
kind:
|
|
218
|
-
status:
|
|
382
|
+
kind: OrderKind;
|
|
383
|
+
status: OrderStatus;
|
|
219
384
|
status_on: number;
|
|
220
385
|
uid: string;
|
|
221
386
|
cart_id?: number | null;
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
payment_methods?: PaymentMethod[];
|
|
228
|
-
order_lines: OrderLine[];
|
|
229
|
-
merchant: Merchant;
|
|
230
|
-
organisation: Organisation;
|
|
231
|
-
payment_urls?: {
|
|
232
|
-
short_link: string;
|
|
233
|
-
};
|
|
387
|
+
currency_id?: number;
|
|
388
|
+
customer_id?: number;
|
|
389
|
+
payment_link_id?: number;
|
|
390
|
+
billing_plan_id?: number;
|
|
391
|
+
billing_subscription_id?: number;
|
|
234
392
|
meta_data?: Record<string, any>;
|
|
235
|
-
|
|
393
|
+
session_id?: string;
|
|
394
|
+
data?: Record<string, any>;
|
|
395
|
+
inserted_at: string;
|
|
236
396
|
updated_at: string;
|
|
397
|
+
currency?: Currency;
|
|
398
|
+
customer?: Customer;
|
|
399
|
+
payment_link?: PaymentLink;
|
|
400
|
+
billing_plan?: BillingPlan;
|
|
401
|
+
billing_subscription?: Subscription;
|
|
402
|
+
merchant?: Merchant;
|
|
403
|
+
organisation?: Organisation;
|
|
237
404
|
}
|
|
405
|
+
/**
|
|
406
|
+
* @deprecated OrderLine interface - not found in current OpenAPI spec
|
|
407
|
+
* Only used in internal order representations
|
|
408
|
+
*/
|
|
238
409
|
export interface OrderLine {
|
|
239
410
|
product_id: number;
|
|
240
411
|
quantity: number;
|
|
241
412
|
price: number;
|
|
242
413
|
}
|
|
414
|
+
/**
|
|
415
|
+
* Fulfillment type for order delivery
|
|
416
|
+
*/
|
|
417
|
+
export type FulfillmentType = 'shipping' | 'pickup' | 'digital';
|
|
418
|
+
/**
|
|
419
|
+
* OrderAddress information for shipping/billing
|
|
420
|
+
*/
|
|
421
|
+
export interface OrderAddress {
|
|
422
|
+
street?: string;
|
|
423
|
+
street_optional?: string;
|
|
424
|
+
town?: string;
|
|
425
|
+
city?: string;
|
|
426
|
+
state?: string;
|
|
427
|
+
country?: string;
|
|
428
|
+
postal_code?: string;
|
|
429
|
+
latitude?: number;
|
|
430
|
+
longitude?: number;
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Pickup location information
|
|
434
|
+
*/
|
|
435
|
+
export interface PickupLocation {
|
|
436
|
+
name?: string;
|
|
437
|
+
OrderAddress?: string;
|
|
438
|
+
contact?: string;
|
|
439
|
+
instructions?: string;
|
|
440
|
+
}
|
|
441
|
+
export interface OrderDetailData {
|
|
442
|
+
/** Lynk payment system ID */
|
|
443
|
+
lynk_id?: string;
|
|
444
|
+
/** Customer information override */
|
|
445
|
+
customer?: {
|
|
446
|
+
first_name?: string;
|
|
447
|
+
last_name?: string;
|
|
448
|
+
email?: string;
|
|
449
|
+
phone?: string;
|
|
450
|
+
};
|
|
451
|
+
/** Subscription plan ID */
|
|
452
|
+
plan_id?: number;
|
|
453
|
+
/** Shipping OrderAddress details */
|
|
454
|
+
shipping_OrderAddress?: OrderAddress;
|
|
455
|
+
/** Type of fulfillment */
|
|
456
|
+
fulfillment_type?: FulfillmentType;
|
|
457
|
+
/** Cost of fulfillment/shipping */
|
|
458
|
+
fulfillment_total?: number;
|
|
459
|
+
/** Pickup location details */
|
|
460
|
+
pickup_location?: PickupLocation;
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Product item for order creation
|
|
464
|
+
*/
|
|
465
|
+
export interface ProductItem {
|
|
466
|
+
/** Product variant ID */
|
|
467
|
+
id: number;
|
|
468
|
+
/** Quantity to order */
|
|
469
|
+
quantity: number;
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* Payment URLs returned after order creation
|
|
473
|
+
*/
|
|
474
|
+
export interface PaymentUrls {
|
|
475
|
+
cancel_url?: string;
|
|
476
|
+
return_url?: string;
|
|
477
|
+
approval_url?: string;
|
|
478
|
+
payment_url: string;
|
|
479
|
+
short_link: string;
|
|
480
|
+
qr_url: string;
|
|
481
|
+
embed_url?: string;
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* Customer information for order creation
|
|
485
|
+
*/
|
|
486
|
+
export interface CustomerInfo {
|
|
487
|
+
/** Required */
|
|
488
|
+
email: string;
|
|
489
|
+
/** Optional */
|
|
490
|
+
first_name: string;
|
|
491
|
+
last_name: string;
|
|
492
|
+
phone?: string;
|
|
493
|
+
dob?: string;
|
|
494
|
+
/** Customer type/classification */
|
|
495
|
+
kind?: 'merchants' | 'users' | string;
|
|
496
|
+
kind_id?: number;
|
|
497
|
+
}
|
|
498
|
+
export interface CreateOrderMetaData {
|
|
499
|
+
return_url?: string;
|
|
500
|
+
[key: string]: any;
|
|
501
|
+
}
|
|
502
|
+
export interface RecordOrderMetaData {
|
|
503
|
+
[key: string]: any;
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Parameters for Service.Order.Processor.record/1
|
|
507
|
+
*
|
|
508
|
+
* Creates a complete order with customer, products, transactions, and payment URLs
|
|
509
|
+
*/
|
|
243
510
|
export interface CreateOrderData {
|
|
244
|
-
reference_id
|
|
511
|
+
reference_id: string;
|
|
245
512
|
total: number;
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
513
|
+
/** Order classification */
|
|
514
|
+
kind: 'online' | 'cart' | 'subscription' | 'invoice' | 'offline';
|
|
515
|
+
/** Customer information */
|
|
516
|
+
customer: CustomerInfo;
|
|
517
|
+
/** Products to order */
|
|
518
|
+
title?: string;
|
|
519
|
+
products?: ProductItem[];
|
|
520
|
+
/** Required order identification */
|
|
521
|
+
/** Optional fields */
|
|
522
|
+
fulfillment_total?: number;
|
|
523
|
+
/** Payment method */
|
|
524
|
+
method_id?: number;
|
|
525
|
+
/** Source payment link ID (if creating from existing payment link) */
|
|
526
|
+
payment_link_id?: string;
|
|
527
|
+
/** Subscription fields (if kind = 'subscription' or OrderKind.SUBSCRIPTION) */
|
|
528
|
+
plan_id?: string;
|
|
529
|
+
subscription_token?: string;
|
|
530
|
+
/** Additional data */
|
|
531
|
+
data?: OrderDetailData;
|
|
532
|
+
meta_data?: CreateOrderMetaData;
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* Response from record function
|
|
536
|
+
* Returns formatted order with all associations
|
|
537
|
+
*/
|
|
538
|
+
export interface CreateOrderResponseData {
|
|
539
|
+
/** Order identification */
|
|
540
|
+
id: number;
|
|
541
|
+
reference_id: string;
|
|
542
|
+
title: string;
|
|
543
|
+
/** Status */
|
|
544
|
+
status: number;
|
|
545
|
+
status_on?: number;
|
|
546
|
+
/** Financial */
|
|
547
|
+
total: number;
|
|
548
|
+
/** Currency code */
|
|
549
|
+
currency_code?: string;
|
|
550
|
+
/** Timestamps */
|
|
551
|
+
created_at: string;
|
|
552
|
+
inserted_at: string;
|
|
553
|
+
updated_at: string;
|
|
554
|
+
/** Customer information */
|
|
555
|
+
customer: {
|
|
556
|
+
first_name: string;
|
|
557
|
+
last_name: string;
|
|
558
|
+
email: string;
|
|
559
|
+
};
|
|
560
|
+
/** Merchant information */
|
|
561
|
+
merchant: {
|
|
562
|
+
name: string;
|
|
563
|
+
email: string;
|
|
564
|
+
phone?: string;
|
|
565
|
+
logo?: string;
|
|
566
|
+
username: string;
|
|
567
|
+
theme_colour?: string;
|
|
568
|
+
};
|
|
569
|
+
/** Order details */
|
|
570
|
+
details: {
|
|
571
|
+
title?: string;
|
|
572
|
+
data?: OrderDetailData;
|
|
573
|
+
updated_at: string;
|
|
574
|
+
};
|
|
575
|
+
/** Order line items */
|
|
576
|
+
lines: Array<{
|
|
577
|
+
product_variant_name_frozen: string;
|
|
578
|
+
product_variant_total_frozen: number;
|
|
579
|
+
quantity: number;
|
|
580
|
+
}>;
|
|
581
|
+
/** Transactions */
|
|
582
|
+
transactions: Array<{
|
|
583
|
+
total?: number;
|
|
584
|
+
provider_fee?: number;
|
|
585
|
+
platform_fee?: number;
|
|
586
|
+
payment_method_order_id?: string;
|
|
587
|
+
updated_at: string;
|
|
588
|
+
}>;
|
|
589
|
+
/** Transaction logs */
|
|
590
|
+
transaction_logs: Array<{
|
|
591
|
+
id: number;
|
|
592
|
+
message: string;
|
|
593
|
+
}>;
|
|
594
|
+
/** Payment provider info */
|
|
595
|
+
provider: {
|
|
596
|
+
id: number;
|
|
597
|
+
name: string;
|
|
598
|
+
logo: string;
|
|
599
|
+
};
|
|
600
|
+
/** Payment URLs */
|
|
601
|
+
payment_urls?: PaymentUrls;
|
|
602
|
+
return_url?: string;
|
|
603
|
+
invoice_url: string;
|
|
604
|
+
/** Additional metadata */
|
|
605
|
+
meta_data?: RecordOrderMetaData;
|
|
249
606
|
}
|
|
250
607
|
export interface UpdateOrderData {
|
|
251
|
-
status?:
|
|
608
|
+
status?: string;
|
|
609
|
+
total?: number;
|
|
610
|
+
fulfillment_total?: number;
|
|
611
|
+
data?: Record<string, any>;
|
|
252
612
|
meta_data?: Record<string, any>;
|
|
253
613
|
}
|
|
254
614
|
export interface OrderStats {
|
|
@@ -257,106 +617,498 @@ export interface OrderStats {
|
|
|
257
617
|
export interface PaymentMethod {
|
|
258
618
|
id: number;
|
|
259
619
|
name: string;
|
|
260
|
-
code
|
|
261
|
-
provider
|
|
620
|
+
code?: string;
|
|
621
|
+
provider?: string;
|
|
262
622
|
active: boolean;
|
|
623
|
+
payment_provider_id: number;
|
|
624
|
+
financial_account_id?: number;
|
|
625
|
+
inserted_at: string;
|
|
626
|
+
updated_at: string;
|
|
627
|
+
financial_account?: FinancialAccount;
|
|
628
|
+
}
|
|
629
|
+
export interface CreatePaymentMethodData {
|
|
630
|
+
name: string;
|
|
631
|
+
payment_provider_id: number;
|
|
632
|
+
financial_account_id?: number;
|
|
633
|
+
active?: boolean;
|
|
634
|
+
}
|
|
635
|
+
export interface UpdatePaymentMethodData {
|
|
636
|
+
name?: string;
|
|
637
|
+
payment_provider_id?: number;
|
|
638
|
+
financial_account_id?: number;
|
|
639
|
+
active?: boolean;
|
|
263
640
|
}
|
|
264
641
|
export interface Customer {
|
|
265
642
|
id: number;
|
|
643
|
+
uid?: string;
|
|
266
644
|
email: string;
|
|
645
|
+
username?: string;
|
|
267
646
|
first_name?: string;
|
|
268
647
|
last_name?: string;
|
|
269
|
-
name?: string;
|
|
270
648
|
phone?: string;
|
|
271
|
-
|
|
272
|
-
|
|
649
|
+
image?: string;
|
|
650
|
+
dob?: number;
|
|
651
|
+
sex?: number;
|
|
652
|
+
status?: number;
|
|
653
|
+
inserted_at: string;
|
|
654
|
+
updated_at: string;
|
|
655
|
+
merchant?: Merchant;
|
|
656
|
+
organisation?: Organisation;
|
|
273
657
|
}
|
|
274
|
-
export interface
|
|
658
|
+
export interface PaymentLink {
|
|
275
659
|
id: number;
|
|
276
|
-
|
|
660
|
+
uid: string;
|
|
661
|
+
title: string;
|
|
277
662
|
description?: string;
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
features?: string[];
|
|
663
|
+
total: number;
|
|
664
|
+
usage_limit: number;
|
|
665
|
+
expires_at?: string;
|
|
666
|
+
status: StatusKey;
|
|
667
|
+
kind: KindKey;
|
|
668
|
+
data?: Record<string, any>;
|
|
669
|
+
customer_id?: number;
|
|
670
|
+
currency_id: number;
|
|
671
|
+
order_id?: number;
|
|
672
|
+
inserted_at: string;
|
|
673
|
+
updated_at: string;
|
|
674
|
+
customer?: Customer;
|
|
675
|
+
currency?: Currency;
|
|
676
|
+
order?: Order;
|
|
293
677
|
}
|
|
294
|
-
export interface
|
|
295
|
-
|
|
678
|
+
export interface CreatePaymentLinkData {
|
|
679
|
+
title: string;
|
|
296
680
|
description?: string;
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
transaction_minimum_fee?: number;
|
|
302
|
-
minimum_fee?: number;
|
|
303
|
-
duration: number;
|
|
304
|
-
billing_cycle: number;
|
|
305
|
-
trial_period?: number;
|
|
306
|
-
charge_strategy?: number;
|
|
681
|
+
total?: number;
|
|
682
|
+
usage_limit?: number;
|
|
683
|
+
expires_at?: string;
|
|
684
|
+
status?: number;
|
|
307
685
|
kind?: number;
|
|
308
|
-
|
|
686
|
+
data?: Record<string, any>;
|
|
687
|
+
customer_id?: number;
|
|
309
688
|
currency_id: number;
|
|
310
|
-
|
|
689
|
+
order_id?: number;
|
|
311
690
|
}
|
|
312
|
-
export interface
|
|
691
|
+
export interface UpdatePaymentLinkData {
|
|
692
|
+
title?: string;
|
|
693
|
+
description?: string;
|
|
694
|
+
total?: number;
|
|
695
|
+
usage_limit?: number;
|
|
696
|
+
expires_at?: string;
|
|
313
697
|
status?: number;
|
|
698
|
+
kind?: number;
|
|
699
|
+
data?: Record<string, any>;
|
|
700
|
+
customer_id?: number;
|
|
701
|
+
currency_id?: number;
|
|
702
|
+
order_id?: number;
|
|
314
703
|
}
|
|
315
|
-
export interface
|
|
704
|
+
export interface FinancialAccount {
|
|
316
705
|
id: number;
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
start_date: string;
|
|
324
|
-
end_date?: string;
|
|
706
|
+
name: string;
|
|
707
|
+
type: string;
|
|
708
|
+
provider: string;
|
|
709
|
+
is_external: boolean;
|
|
710
|
+
fingerprint?: string;
|
|
711
|
+
data?: Record<string, any>;
|
|
325
712
|
record: string;
|
|
326
713
|
record_id: number;
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
714
|
+
active: boolean;
|
|
715
|
+
code?: string;
|
|
716
|
+
adapter?: string;
|
|
717
|
+
logo?: string;
|
|
718
|
+
website?: string;
|
|
719
|
+
inserted_at: string;
|
|
720
|
+
updated_at: string;
|
|
334
721
|
}
|
|
335
|
-
export interface
|
|
336
|
-
|
|
722
|
+
export interface CreateFinancialAccountData {
|
|
723
|
+
name: string;
|
|
724
|
+
type: string;
|
|
725
|
+
provider: string;
|
|
726
|
+
is_external?: boolean;
|
|
727
|
+
fingerprint?: string;
|
|
728
|
+
data?: Record<string, any>;
|
|
337
729
|
record: string;
|
|
338
730
|
record_id: number;
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
id: number;
|
|
345
|
-
subscription_id: string;
|
|
346
|
-
start_date: string;
|
|
347
|
-
end_date: string;
|
|
348
|
-
amount: number;
|
|
349
|
-
currency: Currency;
|
|
350
|
-
status: 'pending' | 'paid' | 'failed' | 'cancelled';
|
|
351
|
-
charged_at?: string;
|
|
352
|
-
created_at: string;
|
|
353
|
-
metadata?: Record<string, any>;
|
|
731
|
+
active?: boolean;
|
|
732
|
+
code?: string;
|
|
733
|
+
adapter?: string;
|
|
734
|
+
logo?: string;
|
|
735
|
+
website?: string;
|
|
354
736
|
}
|
|
355
|
-
export interface
|
|
356
|
-
|
|
357
|
-
|
|
737
|
+
export interface UpdateFinancialAccountData {
|
|
738
|
+
name?: string;
|
|
739
|
+
type?: string;
|
|
740
|
+
provider?: string;
|
|
741
|
+
is_external?: boolean;
|
|
742
|
+
fingerprint?: string;
|
|
743
|
+
data?: Record<string, any>;
|
|
744
|
+
active?: boolean;
|
|
745
|
+
code?: string;
|
|
746
|
+
adapter?: string;
|
|
747
|
+
logo?: string;
|
|
748
|
+
website?: string;
|
|
358
749
|
}
|
|
359
|
-
export interface
|
|
750
|
+
export interface FinancialRequest {
|
|
751
|
+
id: number;
|
|
752
|
+
total: number;
|
|
753
|
+
status: number;
|
|
754
|
+
type: number;
|
|
755
|
+
sub_type?: number;
|
|
756
|
+
fee_total: number;
|
|
757
|
+
reference_id?: string;
|
|
758
|
+
reviewed_at?: string;
|
|
759
|
+
due_at?: string;
|
|
760
|
+
balance_on_request: number;
|
|
761
|
+
data?: Record<string, any>;
|
|
762
|
+
source_id?: number;
|
|
763
|
+
destination_id?: number;
|
|
764
|
+
merchant_id: number;
|
|
765
|
+
requester_id: number;
|
|
766
|
+
reviewer_id?: number;
|
|
767
|
+
currency_id: number;
|
|
768
|
+
evidence_file_id?: number;
|
|
769
|
+
inserted_at: string;
|
|
770
|
+
updated_at: string;
|
|
771
|
+
source?: FinancialAccount;
|
|
772
|
+
destination?: FinancialAccount;
|
|
773
|
+
merchant?: Merchant;
|
|
774
|
+
requester?: User;
|
|
775
|
+
reviewer?: User;
|
|
776
|
+
currency?: Currency;
|
|
777
|
+
}
|
|
778
|
+
export interface CreateFinancialRequestData {
|
|
779
|
+
total: number;
|
|
780
|
+
type: number;
|
|
781
|
+
sub_type?: number;
|
|
782
|
+
reference_id?: string;
|
|
783
|
+
due_at?: string;
|
|
784
|
+
data?: Record<string, any>;
|
|
785
|
+
source_id?: number;
|
|
786
|
+
destination_id?: number;
|
|
787
|
+
currency_id: number;
|
|
788
|
+
evidence_file_id?: number;
|
|
789
|
+
}
|
|
790
|
+
export interface UpdateFinancialRequestData {
|
|
791
|
+
total?: number;
|
|
792
|
+
status?: number;
|
|
793
|
+
type?: number;
|
|
794
|
+
sub_type?: number;
|
|
795
|
+
fee_total?: number;
|
|
796
|
+
reference_id?: string;
|
|
797
|
+
reviewed_at?: string;
|
|
798
|
+
due_at?: string;
|
|
799
|
+
data?: Record<string, any>;
|
|
800
|
+
source_id?: number;
|
|
801
|
+
destination_id?: number;
|
|
802
|
+
reviewer_id?: number;
|
|
803
|
+
currency_id?: number;
|
|
804
|
+
evidence_file_id?: number;
|
|
805
|
+
}
|
|
806
|
+
export interface WebhookUrl {
|
|
807
|
+
id: number;
|
|
808
|
+
url: string;
|
|
809
|
+
event: string;
|
|
810
|
+
uid: string;
|
|
811
|
+
merchant_id?: number;
|
|
812
|
+
org_id?: number;
|
|
813
|
+
inserted_at: string;
|
|
814
|
+
updated_at: string;
|
|
815
|
+
merchant?: Merchant;
|
|
816
|
+
organisation?: Organisation;
|
|
817
|
+
}
|
|
818
|
+
export interface CreateWebhookUrlData {
|
|
819
|
+
url: string;
|
|
820
|
+
event: string;
|
|
821
|
+
merchant_id?: number;
|
|
822
|
+
org_id?: number;
|
|
823
|
+
}
|
|
824
|
+
export interface UpdateWebhookUrlData {
|
|
825
|
+
url?: string;
|
|
826
|
+
event?: string;
|
|
827
|
+
merchant_id?: number;
|
|
828
|
+
org_id?: number;
|
|
829
|
+
}
|
|
830
|
+
export interface Token {
|
|
831
|
+
id: number;
|
|
832
|
+
public_key: string;
|
|
833
|
+
title?: string;
|
|
834
|
+
provider: string;
|
|
835
|
+
kind: number;
|
|
836
|
+
enabled: boolean;
|
|
837
|
+
expires?: number;
|
|
838
|
+
user_id: number;
|
|
839
|
+
role_id?: number;
|
|
840
|
+
inserted_at: string;
|
|
841
|
+
updated_at: string;
|
|
842
|
+
user?: User;
|
|
843
|
+
}
|
|
844
|
+
export interface CreateTokenData {
|
|
845
|
+
title?: string;
|
|
846
|
+
provider: string;
|
|
847
|
+
kind: number;
|
|
848
|
+
enabled?: boolean;
|
|
849
|
+
expires?: number;
|
|
850
|
+
user_id: number;
|
|
851
|
+
role_id?: number;
|
|
852
|
+
}
|
|
853
|
+
export interface UpdateTokenData {
|
|
854
|
+
title?: string;
|
|
855
|
+
enabled?: boolean;
|
|
856
|
+
expires?: number;
|
|
857
|
+
role_id?: number;
|
|
858
|
+
}
|
|
859
|
+
export interface ExchangeRate {
|
|
860
|
+
id: number;
|
|
861
|
+
source_id: number;
|
|
862
|
+
destination_id: number;
|
|
863
|
+
rate: number;
|
|
864
|
+
expires?: number;
|
|
865
|
+
source?: string;
|
|
866
|
+
user_id?: number;
|
|
867
|
+
inserted_at: string;
|
|
868
|
+
updated_at: string;
|
|
869
|
+
source_currency?: Currency;
|
|
870
|
+
destination_currency?: Currency;
|
|
871
|
+
user?: User;
|
|
872
|
+
}
|
|
873
|
+
export interface CreateExchangeRateData {
|
|
874
|
+
source_id: number;
|
|
875
|
+
destination_id: number;
|
|
876
|
+
rate: number;
|
|
877
|
+
expires?: number;
|
|
878
|
+
source?: string;
|
|
879
|
+
user_id?: number;
|
|
880
|
+
}
|
|
881
|
+
export interface UpdateExchangeRateData {
|
|
882
|
+
rate?: number;
|
|
883
|
+
expires?: number;
|
|
884
|
+
source?: string;
|
|
885
|
+
}
|
|
886
|
+
export interface Fee {
|
|
887
|
+
id: number;
|
|
888
|
+
title?: string;
|
|
889
|
+
total: number;
|
|
890
|
+
unit: number;
|
|
891
|
+
kind: number;
|
|
892
|
+
priority: number;
|
|
893
|
+
compound: boolean;
|
|
894
|
+
fee_payer: number;
|
|
895
|
+
currency_code?: string;
|
|
896
|
+
hash?: string;
|
|
897
|
+
fee_set_id?: number;
|
|
898
|
+
currency_id?: number;
|
|
899
|
+
user_id?: number;
|
|
900
|
+
inserted_at: string;
|
|
901
|
+
updated_at: string;
|
|
902
|
+
currency?: Currency;
|
|
903
|
+
user?: User;
|
|
904
|
+
}
|
|
905
|
+
export interface CreateFeeData {
|
|
906
|
+
title?: string;
|
|
907
|
+
total: number;
|
|
908
|
+
unit: number;
|
|
909
|
+
kind: number;
|
|
910
|
+
priority?: number;
|
|
911
|
+
compound?: boolean;
|
|
912
|
+
fee_payer?: number;
|
|
913
|
+
currency_code?: string;
|
|
914
|
+
fee_set_id?: number;
|
|
915
|
+
currency_id?: number;
|
|
916
|
+
user_id?: number;
|
|
917
|
+
}
|
|
918
|
+
export interface UpdateFeeData {
|
|
919
|
+
title?: string;
|
|
920
|
+
total?: number;
|
|
921
|
+
unit?: number;
|
|
922
|
+
kind?: number;
|
|
923
|
+
priority?: number;
|
|
924
|
+
compound?: boolean;
|
|
925
|
+
fee_payer?: number;
|
|
926
|
+
currency_code?: string;
|
|
927
|
+
fee_set_id?: number;
|
|
928
|
+
currency_id?: number;
|
|
929
|
+
user_id?: number;
|
|
930
|
+
}
|
|
931
|
+
export interface TransactionEntry {
|
|
932
|
+
id: number;
|
|
933
|
+
amount: number;
|
|
934
|
+
type: number;
|
|
935
|
+
transaction_id: number;
|
|
936
|
+
financial_account_id: number;
|
|
937
|
+
inserted_at: string;
|
|
938
|
+
updated_at: string;
|
|
939
|
+
financial_account?: FinancialAccount;
|
|
940
|
+
}
|
|
941
|
+
export interface CreateTransactionEntryData {
|
|
942
|
+
amount: number;
|
|
943
|
+
type: number;
|
|
944
|
+
transaction_id: number;
|
|
945
|
+
financial_account_id: number;
|
|
946
|
+
}
|
|
947
|
+
export interface UpdateTransactionEntryData {
|
|
948
|
+
amount?: number;
|
|
949
|
+
type?: number;
|
|
950
|
+
transaction_id?: number;
|
|
951
|
+
financial_account_id?: number;
|
|
952
|
+
}
|
|
953
|
+
export interface GenericResource {
|
|
954
|
+
id: number;
|
|
955
|
+
[key: string]: any;
|
|
956
|
+
inserted_at?: string;
|
|
957
|
+
updated_at?: string;
|
|
958
|
+
}
|
|
959
|
+
export interface BillingPlan {
|
|
960
|
+
id: number;
|
|
961
|
+
name: string;
|
|
962
|
+
description?: string;
|
|
963
|
+
flat_rate: number;
|
|
964
|
+
transaction_fee: number;
|
|
965
|
+
transaction_percentage: number;
|
|
966
|
+
transaction_percentage_additional: number;
|
|
967
|
+
transaction_minimum_fee: number;
|
|
968
|
+
minimum_fee: number;
|
|
969
|
+
duration: number;
|
|
970
|
+
status: StatusKey;
|
|
971
|
+
billing_cycle?: number;
|
|
972
|
+
trial_period: number;
|
|
973
|
+
charge_strategy: number;
|
|
974
|
+
kind: BillingPlanKind;
|
|
975
|
+
auto_charge: boolean;
|
|
976
|
+
public: boolean;
|
|
977
|
+
payout_period: number;
|
|
978
|
+
payout_value_limit: number;
|
|
979
|
+
payout_percentage_limit: number;
|
|
980
|
+
features?: Record<string, any>;
|
|
981
|
+
data?: Record<string, any>;
|
|
982
|
+
meta_data?: Record<string, any>;
|
|
983
|
+
uid: string;
|
|
984
|
+
currency_id: number;
|
|
985
|
+
payment_provider_id?: number;
|
|
986
|
+
inserted_at: string;
|
|
987
|
+
updated_at: string;
|
|
988
|
+
currency?: Currency;
|
|
989
|
+
}
|
|
990
|
+
export interface CreateBillingPlanData {
|
|
991
|
+
name: string;
|
|
992
|
+
description?: string;
|
|
993
|
+
flat_rate: number;
|
|
994
|
+
transaction_fee: number;
|
|
995
|
+
transaction_percentage: number;
|
|
996
|
+
transaction_percentage_additional?: number;
|
|
997
|
+
transaction_minimum_fee?: number;
|
|
998
|
+
minimum_fee?: number;
|
|
999
|
+
duration: number;
|
|
1000
|
+
billing_cycle?: number;
|
|
1001
|
+
trial_period?: number;
|
|
1002
|
+
charge_strategy?: number;
|
|
1003
|
+
kind?: BillingPlanKind | KindKey | number;
|
|
1004
|
+
auto_charge?: boolean;
|
|
1005
|
+
public?: boolean;
|
|
1006
|
+
payout_period?: number;
|
|
1007
|
+
payout_value_limit?: number;
|
|
1008
|
+
payout_percentage_limit?: number;
|
|
1009
|
+
features?: Record<string, any>;
|
|
1010
|
+
data?: Record<string, any>;
|
|
1011
|
+
meta_data?: Record<string, any>;
|
|
1012
|
+
currency_id: number;
|
|
1013
|
+
payment_provider_id?: number;
|
|
1014
|
+
}
|
|
1015
|
+
export interface UpdateBillingPlanData {
|
|
1016
|
+
name?: string;
|
|
1017
|
+
description?: string;
|
|
1018
|
+
flat_rate?: number;
|
|
1019
|
+
transaction_fee?: number;
|
|
1020
|
+
transaction_percentage?: number;
|
|
1021
|
+
transaction_percentage_additional?: number;
|
|
1022
|
+
transaction_minimum_fee?: number;
|
|
1023
|
+
minimum_fee?: number;
|
|
1024
|
+
duration?: number;
|
|
1025
|
+
status?: StatusKey;
|
|
1026
|
+
billing_cycle?: number;
|
|
1027
|
+
trial_period?: number;
|
|
1028
|
+
charge_strategy?: number;
|
|
1029
|
+
kind?: BillingPlanKind | KindKey | number;
|
|
1030
|
+
auto_charge?: boolean;
|
|
1031
|
+
public?: boolean;
|
|
1032
|
+
payout_period?: number;
|
|
1033
|
+
payout_value_limit?: number;
|
|
1034
|
+
payout_percentage_limit?: number;
|
|
1035
|
+
features?: Record<string, any>;
|
|
1036
|
+
data?: Record<string, any>;
|
|
1037
|
+
meta_data?: Record<string, any>;
|
|
1038
|
+
currency_id?: number;
|
|
1039
|
+
payment_provider_id?: number;
|
|
1040
|
+
}
|
|
1041
|
+
export interface Subscription {
|
|
1042
|
+
id: number;
|
|
1043
|
+
status: StatusKey;
|
|
1044
|
+
kind: KindKey;
|
|
1045
|
+
record_id: number;
|
|
1046
|
+
record: string;
|
|
1047
|
+
start_date: string;
|
|
1048
|
+
end_date?: string;
|
|
1049
|
+
current_period_start?: string;
|
|
1050
|
+
current_period_end?: string;
|
|
1051
|
+
trial_end?: string;
|
|
1052
|
+
canceled_at?: string;
|
|
1053
|
+
uid: string;
|
|
1054
|
+
token?: string;
|
|
1055
|
+
billing_plan_id: number;
|
|
1056
|
+
customer_id?: number;
|
|
1057
|
+
order_id?: number;
|
|
1058
|
+
data?: Record<string, any>;
|
|
1059
|
+
meta_data?: Record<string, any>;
|
|
1060
|
+
inserted_at: string;
|
|
1061
|
+
updated_at: string;
|
|
1062
|
+
billing_plan?: BillingPlan;
|
|
1063
|
+
customer?: Customer;
|
|
1064
|
+
order?: Order;
|
|
1065
|
+
subscription_periods?: SubscriptionPeriod[];
|
|
1066
|
+
}
|
|
1067
|
+
export interface CreateSubscriptionData {
|
|
1068
|
+
billing_plan_id: number;
|
|
1069
|
+
record: string;
|
|
1070
|
+
record_id: number;
|
|
1071
|
+
start_date: string;
|
|
1072
|
+
end_date?: string;
|
|
1073
|
+
status?: StatusKey;
|
|
1074
|
+
kind?: KindKey;
|
|
1075
|
+
current_period_start?: string;
|
|
1076
|
+
current_period_end?: string;
|
|
1077
|
+
trial_end?: string;
|
|
1078
|
+
token?: string;
|
|
1079
|
+
customer_id?: number;
|
|
1080
|
+
order_id?: number;
|
|
1081
|
+
data?: Record<string, any>;
|
|
1082
|
+
meta_data?: Record<string, any>;
|
|
1083
|
+
}
|
|
1084
|
+
export interface SubscriptionPeriod {
|
|
1085
|
+
id: number;
|
|
1086
|
+
subscription_id: string;
|
|
1087
|
+
start_date: string;
|
|
1088
|
+
end_date: string;
|
|
1089
|
+
status: string;
|
|
1090
|
+
inserted_at: string;
|
|
1091
|
+
updated_at: string;
|
|
1092
|
+
}
|
|
1093
|
+
export interface SubscriptionUsageResponse {
|
|
1094
|
+
id: number;
|
|
1095
|
+
subscription_id: string;
|
|
1096
|
+
usage_amount: number;
|
|
1097
|
+
recorded_at: string;
|
|
1098
|
+
description?: string;
|
|
1099
|
+
}
|
|
1100
|
+
export interface SubscriptionCancelResponse {
|
|
1101
|
+
id: number;
|
|
1102
|
+
uid: string;
|
|
1103
|
+
status: string;
|
|
1104
|
+
canceled_at: string;
|
|
1105
|
+
cancellation_reason?: string;
|
|
1106
|
+
}
|
|
1107
|
+
export interface SubscriptionLinkData {
|
|
1108
|
+
uid: string;
|
|
1109
|
+
token: string;
|
|
1110
|
+
}
|
|
1111
|
+
export interface SubscriptionChargeData {
|
|
360
1112
|
amount?: number;
|
|
361
1113
|
description?: string;
|
|
362
1114
|
}
|
|
@@ -364,31 +1116,36 @@ export interface User {
|
|
|
364
1116
|
id: number;
|
|
365
1117
|
email: string;
|
|
366
1118
|
phone?: string;
|
|
367
|
-
first_name
|
|
368
|
-
last_name
|
|
1119
|
+
first_name: string;
|
|
1120
|
+
last_name: string;
|
|
369
1121
|
username?: string;
|
|
370
|
-
status:
|
|
1122
|
+
status: AccountStatus;
|
|
371
1123
|
level: number;
|
|
372
1124
|
dob?: number | null;
|
|
373
1125
|
sex?: number | null;
|
|
374
1126
|
image?: string | null;
|
|
375
1127
|
uid: string;
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
organisation?: Organisation;
|
|
381
|
-
merchant?: Merchant;
|
|
382
|
-
created_at: string;
|
|
1128
|
+
kind?: UserKind;
|
|
1129
|
+
organisation_id?: number;
|
|
1130
|
+
role_id?: number;
|
|
1131
|
+
inserted_at: string;
|
|
383
1132
|
updated_at: string;
|
|
1133
|
+
organisation?: Organisation;
|
|
384
1134
|
}
|
|
385
1135
|
export interface CreateUserData {
|
|
386
1136
|
email: string;
|
|
387
1137
|
phone?: string;
|
|
388
|
-
first_name
|
|
389
|
-
last_name
|
|
1138
|
+
first_name: string;
|
|
1139
|
+
last_name: string;
|
|
390
1140
|
username?: string;
|
|
391
1141
|
password: string;
|
|
1142
|
+
status?: AccountStatus | StatusKey | number;
|
|
1143
|
+
level?: number;
|
|
1144
|
+
dob?: number;
|
|
1145
|
+
sex?: number;
|
|
1146
|
+
image?: string;
|
|
1147
|
+
kind?: UserKind | KindKey | number;
|
|
1148
|
+
organisation_id?: number;
|
|
392
1149
|
role_id?: number;
|
|
393
1150
|
}
|
|
394
1151
|
export interface UpdateUserData {
|
|
@@ -397,8 +1154,13 @@ export interface UpdateUserData {
|
|
|
397
1154
|
first_name?: string;
|
|
398
1155
|
last_name?: string;
|
|
399
1156
|
username?: string;
|
|
400
|
-
status?: number;
|
|
1157
|
+
status?: AccountStatus | StatusKey | number;
|
|
401
1158
|
level?: number;
|
|
1159
|
+
dob?: number;
|
|
1160
|
+
sex?: number;
|
|
1161
|
+
image?: string;
|
|
1162
|
+
kind?: UserKind | KindKey | number;
|
|
1163
|
+
organisation_id?: number;
|
|
402
1164
|
role_id?: number;
|
|
403
1165
|
}
|
|
404
1166
|
export interface WebhookEvent {
|
|
@@ -436,10 +1198,325 @@ export interface APIToken {
|
|
|
436
1198
|
updated_at: string;
|
|
437
1199
|
}
|
|
438
1200
|
export interface PublicMerchantFees {
|
|
439
|
-
|
|
1201
|
+
/** New detailed fee breakdown (Oct 2, 2025) */
|
|
1202
|
+
sub_total: number;
|
|
1203
|
+
discount_total: number;
|
|
1204
|
+
shipping_total: number;
|
|
1205
|
+
pre_tax_fee_total: number;
|
|
1206
|
+
tax_total: number;
|
|
1207
|
+
post_tax_fee_total: number;
|
|
1208
|
+
/** Party totals */
|
|
1209
|
+
customer_total: number;
|
|
1210
|
+
platform_total: number;
|
|
1211
|
+
provider_total: number;
|
|
1212
|
+
merchant_total: number;
|
|
1213
|
+
/** Legacy fields for compatibility */
|
|
1214
|
+
total: number;
|
|
1215
|
+
provider_fee: number;
|
|
1216
|
+
platform_fee: number;
|
|
1217
|
+
/** Merchant information */
|
|
1218
|
+
merchant: {
|
|
1219
|
+
username: string;
|
|
1220
|
+
name: string;
|
|
1221
|
+
email: string;
|
|
1222
|
+
phone?: string;
|
|
1223
|
+
logo?: string;
|
|
1224
|
+
theme_colour?: string;
|
|
1225
|
+
};
|
|
1226
|
+
/** Currency code */
|
|
1227
|
+
currency: string;
|
|
440
1228
|
}
|
|
441
1229
|
export interface PublicMerchantProducts {
|
|
442
1230
|
products: Product[];
|
|
443
1231
|
[key: string]: any;
|
|
444
1232
|
}
|
|
1233
|
+
export interface KycRequest {
|
|
1234
|
+
id: number;
|
|
1235
|
+
kind: KycKind | KindKey;
|
|
1236
|
+
status: KycStatus | StatusKey;
|
|
1237
|
+
user_id?: number;
|
|
1238
|
+
subject_id?: number;
|
|
1239
|
+
data?: Record<string, any>;
|
|
1240
|
+
inserted_at: string;
|
|
1241
|
+
updated_at: string;
|
|
1242
|
+
user?: User;
|
|
1243
|
+
}
|
|
1244
|
+
export interface CreateKycRequestData {
|
|
1245
|
+
kind: KycKind | KindKey;
|
|
1246
|
+
status?: KycStatus | StatusKey;
|
|
1247
|
+
user_id?: number;
|
|
1248
|
+
subject_id?: number;
|
|
1249
|
+
data?: Record<string, any>;
|
|
1250
|
+
}
|
|
1251
|
+
export interface UpdateKycRequestData {
|
|
1252
|
+
kind?: KycKind | KindKey;
|
|
1253
|
+
status?: KycStatus | StatusKey;
|
|
1254
|
+
user_id?: number;
|
|
1255
|
+
subject_id?: number;
|
|
1256
|
+
data?: Record<string, any>;
|
|
1257
|
+
}
|
|
1258
|
+
export interface PayoutRequest {
|
|
1259
|
+
id: number;
|
|
1260
|
+
total: number;
|
|
1261
|
+
status: StatusKey;
|
|
1262
|
+
balance_on_request: number;
|
|
1263
|
+
reference_id?: string;
|
|
1264
|
+
evidence_file_id?: number;
|
|
1265
|
+
merchant_id: number;
|
|
1266
|
+
requester_id: number;
|
|
1267
|
+
type: KindKey;
|
|
1268
|
+
sub_type: KindKey;
|
|
1269
|
+
reviewer_id?: number;
|
|
1270
|
+
reviewed_at?: string;
|
|
1271
|
+
due_at: string;
|
|
1272
|
+
fee_total: number;
|
|
1273
|
+
currency_id: number;
|
|
1274
|
+
inserted_at: string;
|
|
1275
|
+
updated_at: string;
|
|
1276
|
+
merchant?: Merchant;
|
|
1277
|
+
requester?: User;
|
|
1278
|
+
reviewer?: User;
|
|
1279
|
+
currency?: Currency;
|
|
1280
|
+
}
|
|
1281
|
+
export interface CreatePayoutRequestData {
|
|
1282
|
+
total: number;
|
|
1283
|
+
type?: KindKey;
|
|
1284
|
+
sub_type?: KindKey;
|
|
1285
|
+
reference_id?: string;
|
|
1286
|
+
evidence_file_id?: number;
|
|
1287
|
+
due_at?: string;
|
|
1288
|
+
currency_id?: number;
|
|
1289
|
+
}
|
|
1290
|
+
export interface UpdatePayoutRequestData {
|
|
1291
|
+
total?: number;
|
|
1292
|
+
status?: StatusKey;
|
|
1293
|
+
type?: KindKey;
|
|
1294
|
+
sub_type?: KindKey;
|
|
1295
|
+
reference_id?: string;
|
|
1296
|
+
evidence_file_id?: number;
|
|
1297
|
+
reviewer_id?: number;
|
|
1298
|
+
reviewed_at?: string;
|
|
1299
|
+
due_at?: string;
|
|
1300
|
+
fee_total?: number;
|
|
1301
|
+
currency_id?: number;
|
|
1302
|
+
}
|
|
1303
|
+
export interface InternalMerchant {
|
|
1304
|
+
id: number;
|
|
1305
|
+
name: string;
|
|
1306
|
+
email: string;
|
|
1307
|
+
username: string;
|
|
1308
|
+
about?: string;
|
|
1309
|
+
logo?: string;
|
|
1310
|
+
sector?: string;
|
|
1311
|
+
status: number;
|
|
1312
|
+
phone?: string;
|
|
1313
|
+
business_type?: string;
|
|
1314
|
+
theme_colour?: string;
|
|
1315
|
+
uid: string;
|
|
1316
|
+
address_id?: number;
|
|
1317
|
+
owner_id?: number;
|
|
1318
|
+
domain_id?: number;
|
|
1319
|
+
organisation_id?: number;
|
|
1320
|
+
platform_fee_structure: number;
|
|
1321
|
+
provider_fee_structure: number;
|
|
1322
|
+
parent_merchant_id?: number;
|
|
1323
|
+
data?: Record<string, any>;
|
|
1324
|
+
inserted_at: string;
|
|
1325
|
+
updated_at: string;
|
|
1326
|
+
}
|
|
1327
|
+
export interface InternalCreateMerchantData {
|
|
1328
|
+
name: string;
|
|
1329
|
+
email: string;
|
|
1330
|
+
phone?: string;
|
|
1331
|
+
about?: string;
|
|
1332
|
+
status?: number;
|
|
1333
|
+
platform_fee_structure?: number;
|
|
1334
|
+
provider_fee_structure?: number;
|
|
1335
|
+
}
|
|
1336
|
+
export interface InternalUpdateMerchantData {
|
|
1337
|
+
name?: string;
|
|
1338
|
+
email?: string;
|
|
1339
|
+
phone?: string;
|
|
1340
|
+
about?: string;
|
|
1341
|
+
status?: number;
|
|
1342
|
+
platform_fee_structure?: number;
|
|
1343
|
+
provider_fee_structure?: number;
|
|
1344
|
+
}
|
|
1345
|
+
export interface InternalCategory {
|
|
1346
|
+
id: number;
|
|
1347
|
+
name: string;
|
|
1348
|
+
description?: string | null;
|
|
1349
|
+
kind: number;
|
|
1350
|
+
kind_id?: number | null;
|
|
1351
|
+
parent_id?: number | null;
|
|
1352
|
+
uid: string;
|
|
1353
|
+
inserted_at: string;
|
|
1354
|
+
updated_at: string;
|
|
1355
|
+
}
|
|
1356
|
+
export interface InternalProduct {
|
|
1357
|
+
id: number;
|
|
1358
|
+
title: string;
|
|
1359
|
+
teaser?: string;
|
|
1360
|
+
price: number;
|
|
1361
|
+
permalink: string;
|
|
1362
|
+
image?: string | null;
|
|
1363
|
+
status: number;
|
|
1364
|
+
public: boolean;
|
|
1365
|
+
unlimited: boolean;
|
|
1366
|
+
units_remaining?: number | null;
|
|
1367
|
+
units_sold?: number | null;
|
|
1368
|
+
rating_sum?: number | null;
|
|
1369
|
+
rating_count?: number | null;
|
|
1370
|
+
tag_ids: number[];
|
|
1371
|
+
data?: Record<string, any>;
|
|
1372
|
+
meta?: Record<string, any>;
|
|
1373
|
+
uid: string;
|
|
1374
|
+
category_id?: number;
|
|
1375
|
+
currency_id?: number;
|
|
1376
|
+
user_id?: number;
|
|
1377
|
+
inserted_at: string;
|
|
1378
|
+
updated_at: string;
|
|
1379
|
+
}
|
|
1380
|
+
export interface InternalOrder {
|
|
1381
|
+
id: number;
|
|
1382
|
+
reference_id?: string;
|
|
1383
|
+
total: number;
|
|
1384
|
+
kind: number;
|
|
1385
|
+
status: number;
|
|
1386
|
+
status_on: number;
|
|
1387
|
+
uid: string;
|
|
1388
|
+
cart_id?: number | null;
|
|
1389
|
+
customer?: Customer;
|
|
1390
|
+
currency: Currency;
|
|
1391
|
+
billing_plan?: any | null;
|
|
1392
|
+
billing_subscription_id?: number;
|
|
1393
|
+
order_detail?: Record<string, any>;
|
|
1394
|
+
transactions?: any[];
|
|
1395
|
+
payment_methods?: PaymentMethod[];
|
|
1396
|
+
order_lines: OrderLine[];
|
|
1397
|
+
merchant: InternalMerchant;
|
|
1398
|
+
organisation: Organisation;
|
|
1399
|
+
payment_urls?: {
|
|
1400
|
+
short_link: string;
|
|
1401
|
+
};
|
|
1402
|
+
meta_data?: Record<string, any>;
|
|
1403
|
+
inserted_at: string;
|
|
1404
|
+
updated_at: string;
|
|
1405
|
+
}
|
|
1406
|
+
export interface InternalUser {
|
|
1407
|
+
id: number;
|
|
1408
|
+
email: string;
|
|
1409
|
+
phone?: string;
|
|
1410
|
+
first_name: string;
|
|
1411
|
+
last_name: string;
|
|
1412
|
+
username?: string;
|
|
1413
|
+
status: number;
|
|
1414
|
+
kind: number;
|
|
1415
|
+
level: number;
|
|
1416
|
+
dob?: number | null;
|
|
1417
|
+
sex?: number | null;
|
|
1418
|
+
image?: string | null;
|
|
1419
|
+
uid: string;
|
|
1420
|
+
organisation_id?: number;
|
|
1421
|
+
role_id?: number;
|
|
1422
|
+
inserted_at: string;
|
|
1423
|
+
updated_at: string;
|
|
1424
|
+
}
|
|
1425
|
+
export interface InternalPaymentLink {
|
|
1426
|
+
id: number;
|
|
1427
|
+
uid: string;
|
|
1428
|
+
title: string;
|
|
1429
|
+
description?: string;
|
|
1430
|
+
total: number;
|
|
1431
|
+
usage_limit: number;
|
|
1432
|
+
expires_at?: string;
|
|
1433
|
+
status: number;
|
|
1434
|
+
kind: number;
|
|
1435
|
+
data?: Record<string, any>;
|
|
1436
|
+
customer_id?: number;
|
|
1437
|
+
currency_id: number;
|
|
1438
|
+
order_id?: number;
|
|
1439
|
+
inserted_at: string;
|
|
1440
|
+
updated_at: string;
|
|
1441
|
+
}
|
|
1442
|
+
export interface InternalBillingPlan {
|
|
1443
|
+
id: number;
|
|
1444
|
+
name: string;
|
|
1445
|
+
description?: string;
|
|
1446
|
+
flat_rate: number;
|
|
1447
|
+
transaction_fee: number;
|
|
1448
|
+
transaction_percentage: number;
|
|
1449
|
+
transaction_percentage_additional: number;
|
|
1450
|
+
transaction_minimum_fee: number;
|
|
1451
|
+
minimum_fee: number;
|
|
1452
|
+
duration: number;
|
|
1453
|
+
status: number;
|
|
1454
|
+
kind: number;
|
|
1455
|
+
billing_cycle?: number;
|
|
1456
|
+
trial_period: number;
|
|
1457
|
+
charge_strategy: number;
|
|
1458
|
+
auto_charge: boolean;
|
|
1459
|
+
public: boolean;
|
|
1460
|
+
payout_period: number;
|
|
1461
|
+
payout_value_limit: number;
|
|
1462
|
+
payout_percentage_limit: number;
|
|
1463
|
+
features?: Record<string, any>;
|
|
1464
|
+
data?: Record<string, any>;
|
|
1465
|
+
meta_data?: Record<string, any>;
|
|
1466
|
+
uid: string;
|
|
1467
|
+
currency_id: number;
|
|
1468
|
+
payment_provider_id?: number;
|
|
1469
|
+
inserted_at: string;
|
|
1470
|
+
updated_at: string;
|
|
1471
|
+
currency?: Currency;
|
|
1472
|
+
}
|
|
1473
|
+
export interface InternalSubscription {
|
|
1474
|
+
id: number;
|
|
1475
|
+
status: number;
|
|
1476
|
+
kind: number;
|
|
1477
|
+
current_period_start: string;
|
|
1478
|
+
current_period_end: string;
|
|
1479
|
+
trial_end?: string;
|
|
1480
|
+
canceled_at?: string;
|
|
1481
|
+
start_date: string;
|
|
1482
|
+
end_date?: string;
|
|
1483
|
+
record: string;
|
|
1484
|
+
record_id: number;
|
|
1485
|
+
customer_id?: number;
|
|
1486
|
+
order_id?: number;
|
|
1487
|
+
uid: string;
|
|
1488
|
+
token?: string;
|
|
1489
|
+
billing_plan_id: number;
|
|
1490
|
+
has_token: boolean;
|
|
1491
|
+
billing_plan: InternalBillingPlan;
|
|
1492
|
+
subscription_periods?: SubscriptionPeriod[];
|
|
1493
|
+
data?: Record<string, any>;
|
|
1494
|
+
meta_data?: Record<string, any>;
|
|
1495
|
+
inserted_at: string;
|
|
1496
|
+
updated_at: string;
|
|
1497
|
+
}
|
|
1498
|
+
export interface InternalKycRequest {
|
|
1499
|
+
id: number;
|
|
1500
|
+
kind: number;
|
|
1501
|
+
status: number;
|
|
1502
|
+
data?: Record<string, any>;
|
|
1503
|
+
user_id: number;
|
|
1504
|
+
merchant_id?: number;
|
|
1505
|
+
uid: string;
|
|
1506
|
+
inserted_at: string;
|
|
1507
|
+
updated_at: string;
|
|
1508
|
+
}
|
|
1509
|
+
export interface InternalPayoutRequest {
|
|
1510
|
+
id: number;
|
|
1511
|
+
amount: number;
|
|
1512
|
+
currency_code: string;
|
|
1513
|
+
status: number;
|
|
1514
|
+
type: number;
|
|
1515
|
+
sub_type: number;
|
|
1516
|
+
data?: Record<string, any>;
|
|
1517
|
+
merchant_id: number;
|
|
1518
|
+
uid: string;
|
|
1519
|
+
inserted_at: string;
|
|
1520
|
+
updated_at: string;
|
|
1521
|
+
}
|
|
445
1522
|
//# sourceMappingURL=types.d.ts.map
|