@inkress/admin-sdk 1.0.0 → 1.1.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/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 +4166 -154
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4203 -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 -2
- 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 +27 -7
- package/dist/resources/public.d.ts.map +1 -1
- package/dist/resources/subscriptions.d.ts +86 -20
- 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 +1069 -197
- 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,94 @@ 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
|
+
export interface MerchantBalance {
|
|
241
|
+
available: number;
|
|
242
|
+
pending: number;
|
|
243
|
+
currency: string;
|
|
244
|
+
}
|
|
245
|
+
export interface MerchantLimits {
|
|
246
|
+
transaction_limit: number;
|
|
247
|
+
daily_limit: number;
|
|
248
|
+
monthly_limit: number;
|
|
249
|
+
currency: string;
|
|
250
|
+
}
|
|
251
|
+
export interface MerchantSubscription {
|
|
252
|
+
plan_name: string;
|
|
253
|
+
status: string;
|
|
254
|
+
billing_cycle: string;
|
|
255
|
+
price: number;
|
|
256
|
+
currency: string;
|
|
257
|
+
features: string[];
|
|
258
|
+
next_billing_date?: string;
|
|
259
|
+
}
|
|
260
|
+
export interface MerchantInvoice {
|
|
261
|
+
id: string;
|
|
262
|
+
invoice_number: string;
|
|
263
|
+
amount: number;
|
|
264
|
+
currency: string;
|
|
265
|
+
status: string;
|
|
266
|
+
due_date: string;
|
|
267
|
+
issued_date: string;
|
|
268
|
+
paid_date?: string;
|
|
134
269
|
}
|
|
135
270
|
export interface PublicMerchant {
|
|
136
271
|
id: number;
|
|
@@ -147,28 +282,26 @@ export interface Category {
|
|
|
147
282
|
id: number;
|
|
148
283
|
name: string;
|
|
149
284
|
description?: string | null;
|
|
150
|
-
kind:
|
|
285
|
+
kind: CategoryKind;
|
|
151
286
|
kind_id?: number | null;
|
|
152
287
|
parent_id?: number | null;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
name: string;
|
|
156
|
-
} | null;
|
|
157
|
-
children?: {
|
|
158
|
-
id: number;
|
|
159
|
-
name: string;
|
|
160
|
-
}[];
|
|
161
|
-
created_at: string;
|
|
288
|
+
uid: string;
|
|
289
|
+
inserted_at: string;
|
|
162
290
|
updated_at: string;
|
|
291
|
+
parent?: Category;
|
|
163
292
|
}
|
|
164
293
|
export interface CreateCategoryData {
|
|
165
294
|
name: string;
|
|
166
295
|
description?: string;
|
|
167
|
-
kind:
|
|
296
|
+
kind: CategoryKind;
|
|
168
297
|
kind_id?: number;
|
|
169
298
|
parent_id?: number;
|
|
170
299
|
}
|
|
171
|
-
export interface UpdateCategoryData
|
|
300
|
+
export interface UpdateCategoryData {
|
|
301
|
+
name?: string;
|
|
302
|
+
description?: string;
|
|
303
|
+
kind?: KindKey;
|
|
304
|
+
kind_id?: number;
|
|
172
305
|
}
|
|
173
306
|
export interface Product {
|
|
174
307
|
id: number;
|
|
@@ -177,7 +310,7 @@ export interface Product {
|
|
|
177
310
|
price: number;
|
|
178
311
|
permalink: string;
|
|
179
312
|
image?: string | null;
|
|
180
|
-
status:
|
|
313
|
+
status: ProductStatus;
|
|
181
314
|
public: boolean;
|
|
182
315
|
unlimited: boolean;
|
|
183
316
|
units_remaining?: number | null;
|
|
@@ -187,12 +320,15 @@ export interface Product {
|
|
|
187
320
|
tag_ids: number[];
|
|
188
321
|
data?: Record<string, any>;
|
|
189
322
|
meta?: Record<string, any>;
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
323
|
+
uid: string;
|
|
324
|
+
category_id?: number;
|
|
325
|
+
currency_id?: number;
|
|
326
|
+
user_id?: number;
|
|
327
|
+
inserted_at: string;
|
|
195
328
|
updated_at: string;
|
|
329
|
+
category?: Category;
|
|
330
|
+
currency?: Currency;
|
|
331
|
+
user?: User;
|
|
196
332
|
}
|
|
197
333
|
export interface CreateProductData {
|
|
198
334
|
title: string;
|
|
@@ -206,34 +342,54 @@ export interface CreateProductData {
|
|
|
206
342
|
tag_ids?: number[];
|
|
207
343
|
data?: Record<string, any>;
|
|
208
344
|
meta?: Record<string, any>;
|
|
345
|
+
category_id?: number;
|
|
346
|
+
currency_id?: number;
|
|
347
|
+
user_id?: number;
|
|
209
348
|
}
|
|
210
|
-
export interface UpdateProductData
|
|
211
|
-
|
|
349
|
+
export interface UpdateProductData {
|
|
350
|
+
title?: string;
|
|
351
|
+
teaser?: string;
|
|
352
|
+
price?: number;
|
|
353
|
+
permalink?: string;
|
|
354
|
+
image?: string;
|
|
355
|
+
status?: StatusKey;
|
|
356
|
+
public?: boolean;
|
|
357
|
+
unlimited?: boolean;
|
|
358
|
+
units_remaining?: number;
|
|
359
|
+
tag_ids?: number[];
|
|
360
|
+
data?: Record<string, any>;
|
|
361
|
+
meta?: Record<string, any>;
|
|
362
|
+
category_id?: number;
|
|
363
|
+
currency_id?: number;
|
|
364
|
+
user_id?: number;
|
|
212
365
|
}
|
|
213
366
|
export interface Order {
|
|
214
367
|
id: number;
|
|
215
368
|
reference_id?: string;
|
|
216
369
|
total: number;
|
|
217
|
-
kind:
|
|
218
|
-
status:
|
|
370
|
+
kind: OrderKind;
|
|
371
|
+
status: OrderStatus;
|
|
219
372
|
status_on: number;
|
|
220
373
|
uid: string;
|
|
221
374
|
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
|
-
};
|
|
375
|
+
currency_id?: number;
|
|
376
|
+
customer_id?: number;
|
|
377
|
+
payment_link_id?: number;
|
|
378
|
+
billing_plan_id?: number;
|
|
379
|
+
billing_subscription_id?: number;
|
|
234
380
|
meta_data?: Record<string, any>;
|
|
235
|
-
|
|
381
|
+
session_id?: string;
|
|
382
|
+
data?: Record<string, any>;
|
|
383
|
+
inserted_at: string;
|
|
236
384
|
updated_at: string;
|
|
385
|
+
currency?: Currency;
|
|
386
|
+
customer?: Customer;
|
|
387
|
+
payment_link?: PaymentLink;
|
|
388
|
+
billing_plan?: BillingPlan;
|
|
389
|
+
billing_subscription?: Subscription;
|
|
390
|
+
order_lines?: OrderLine[];
|
|
391
|
+
merchant?: Merchant;
|
|
392
|
+
organisation?: Organisation;
|
|
237
393
|
}
|
|
238
394
|
export interface OrderLine {
|
|
239
395
|
product_id: number;
|
|
@@ -243,13 +399,34 @@ export interface OrderLine {
|
|
|
243
399
|
export interface CreateOrderData {
|
|
244
400
|
reference_id?: string;
|
|
245
401
|
total: number;
|
|
246
|
-
kind?: number;
|
|
247
|
-
|
|
402
|
+
kind?: OrderKind | KindKey | number;
|
|
403
|
+
status?: OrderStatus | StatusKey | number;
|
|
404
|
+
status_on?: number;
|
|
405
|
+
cart_id?: number;
|
|
406
|
+
currency_id?: number;
|
|
407
|
+
customer_id?: number;
|
|
408
|
+
payment_link_id?: number;
|
|
409
|
+
billing_plan_id?: number;
|
|
410
|
+
billing_subscription_id?: number;
|
|
248
411
|
meta_data?: Record<string, any>;
|
|
412
|
+
session_id?: string;
|
|
413
|
+
data?: Record<string, any>;
|
|
249
414
|
}
|
|
250
415
|
export interface UpdateOrderData {
|
|
251
|
-
|
|
416
|
+
reference_id?: string;
|
|
417
|
+
total?: number;
|
|
418
|
+
kind?: OrderKind | KindKey | number;
|
|
419
|
+
status?: OrderStatus | StatusKey | number;
|
|
420
|
+
status_on?: number;
|
|
421
|
+
cart_id?: number;
|
|
422
|
+
currency_id?: number;
|
|
423
|
+
customer_id?: number;
|
|
424
|
+
payment_link_id?: number;
|
|
425
|
+
billing_plan_id?: number;
|
|
426
|
+
billing_subscription_id?: number;
|
|
252
427
|
meta_data?: Record<string, any>;
|
|
428
|
+
session_id?: string;
|
|
429
|
+
data?: Record<string, any>;
|
|
253
430
|
}
|
|
254
431
|
export interface OrderStats {
|
|
255
432
|
[key: string]: any;
|
|
@@ -257,9 +434,26 @@ export interface OrderStats {
|
|
|
257
434
|
export interface PaymentMethod {
|
|
258
435
|
id: number;
|
|
259
436
|
name: string;
|
|
260
|
-
code
|
|
261
|
-
provider
|
|
437
|
+
code?: string;
|
|
438
|
+
provider?: string;
|
|
262
439
|
active: boolean;
|
|
440
|
+
payment_provider_id: number;
|
|
441
|
+
financial_account_id?: number;
|
|
442
|
+
inserted_at: string;
|
|
443
|
+
updated_at: string;
|
|
444
|
+
financial_account?: FinancialAccount;
|
|
445
|
+
}
|
|
446
|
+
export interface CreatePaymentMethodData {
|
|
447
|
+
name: string;
|
|
448
|
+
payment_provider_id: number;
|
|
449
|
+
financial_account_id?: number;
|
|
450
|
+
active?: boolean;
|
|
451
|
+
}
|
|
452
|
+
export interface UpdatePaymentMethodData {
|
|
453
|
+
name?: string;
|
|
454
|
+
payment_provider_id?: number;
|
|
455
|
+
financial_account_id?: number;
|
|
456
|
+
active?: boolean;
|
|
263
457
|
}
|
|
264
458
|
export interface Customer {
|
|
265
459
|
id: number;
|
|
@@ -268,137 +462,526 @@ export interface Customer {
|
|
|
268
462
|
last_name?: string;
|
|
269
463
|
name?: string;
|
|
270
464
|
phone?: string;
|
|
271
|
-
|
|
272
|
-
|
|
465
|
+
uid?: string;
|
|
466
|
+
dob?: number;
|
|
467
|
+
sex?: number;
|
|
468
|
+
image?: string;
|
|
469
|
+
status?: number;
|
|
470
|
+
level?: number;
|
|
471
|
+
data?: Record<string, any>;
|
|
472
|
+
merchant_id?: number;
|
|
473
|
+
organisation_id?: number;
|
|
474
|
+
inserted_at: string;
|
|
475
|
+
updated_at: string;
|
|
476
|
+
merchant?: Merchant;
|
|
477
|
+
organisation?: Organisation;
|
|
273
478
|
}
|
|
274
|
-
export interface
|
|
479
|
+
export interface PaymentLink {
|
|
275
480
|
id: number;
|
|
276
|
-
|
|
481
|
+
uid: string;
|
|
482
|
+
title: string;
|
|
277
483
|
description?: string;
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
features?: string[];
|
|
484
|
+
total: number;
|
|
485
|
+
usage_limit: number;
|
|
486
|
+
expires_at?: string;
|
|
487
|
+
status: StatusKey;
|
|
488
|
+
kind: KindKey;
|
|
489
|
+
data?: Record<string, any>;
|
|
490
|
+
customer_id?: number;
|
|
491
|
+
currency_id: number;
|
|
492
|
+
order_id?: number;
|
|
493
|
+
inserted_at: string;
|
|
494
|
+
updated_at: string;
|
|
495
|
+
customer?: Customer;
|
|
496
|
+
currency?: Currency;
|
|
497
|
+
order?: Order;
|
|
293
498
|
}
|
|
294
|
-
export interface
|
|
295
|
-
|
|
499
|
+
export interface CreatePaymentLinkData {
|
|
500
|
+
title: string;
|
|
296
501
|
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;
|
|
502
|
+
total?: number;
|
|
503
|
+
usage_limit?: number;
|
|
504
|
+
expires_at?: string;
|
|
505
|
+
status?: number;
|
|
307
506
|
kind?: number;
|
|
308
|
-
|
|
507
|
+
data?: Record<string, any>;
|
|
508
|
+
customer_id?: number;
|
|
309
509
|
currency_id: number;
|
|
310
|
-
|
|
510
|
+
order_id?: number;
|
|
311
511
|
}
|
|
312
|
-
export interface
|
|
512
|
+
export interface UpdatePaymentLinkData {
|
|
513
|
+
title?: string;
|
|
514
|
+
description?: string;
|
|
515
|
+
total?: number;
|
|
516
|
+
usage_limit?: number;
|
|
517
|
+
expires_at?: string;
|
|
313
518
|
status?: number;
|
|
519
|
+
kind?: number;
|
|
520
|
+
data?: Record<string, any>;
|
|
521
|
+
customer_id?: number;
|
|
522
|
+
currency_id?: number;
|
|
523
|
+
order_id?: number;
|
|
314
524
|
}
|
|
315
|
-
export interface
|
|
525
|
+
export interface FinancialAccount {
|
|
316
526
|
id: number;
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
start_date: string;
|
|
324
|
-
end_date?: string;
|
|
527
|
+
name: string;
|
|
528
|
+
type: string;
|
|
529
|
+
provider: string;
|
|
530
|
+
is_external: boolean;
|
|
531
|
+
fingerprint?: string;
|
|
532
|
+
data?: Record<string, any>;
|
|
325
533
|
record: string;
|
|
326
534
|
record_id: number;
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
535
|
+
active: boolean;
|
|
536
|
+
code?: string;
|
|
537
|
+
adapter?: string;
|
|
538
|
+
logo?: string;
|
|
539
|
+
website?: string;
|
|
540
|
+
inserted_at: string;
|
|
541
|
+
updated_at: string;
|
|
334
542
|
}
|
|
335
|
-
export interface
|
|
336
|
-
|
|
543
|
+
export interface CreateFinancialAccountData {
|
|
544
|
+
name: string;
|
|
545
|
+
type: string;
|
|
546
|
+
provider: string;
|
|
547
|
+
is_external?: boolean;
|
|
548
|
+
fingerprint?: string;
|
|
549
|
+
data?: Record<string, any>;
|
|
337
550
|
record: string;
|
|
338
551
|
record_id: number;
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
552
|
+
active?: boolean;
|
|
553
|
+
code?: string;
|
|
554
|
+
adapter?: string;
|
|
555
|
+
logo?: string;
|
|
556
|
+
website?: string;
|
|
342
557
|
}
|
|
343
|
-
export interface
|
|
558
|
+
export interface UpdateFinancialAccountData {
|
|
559
|
+
name?: string;
|
|
560
|
+
type?: string;
|
|
561
|
+
provider?: string;
|
|
562
|
+
is_external?: boolean;
|
|
563
|
+
fingerprint?: string;
|
|
564
|
+
data?: Record<string, any>;
|
|
565
|
+
active?: boolean;
|
|
566
|
+
code?: string;
|
|
567
|
+
adapter?: string;
|
|
568
|
+
logo?: string;
|
|
569
|
+
website?: string;
|
|
570
|
+
}
|
|
571
|
+
export interface FinancialRequest {
|
|
344
572
|
id: number;
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
573
|
+
total: number;
|
|
574
|
+
status: number;
|
|
575
|
+
type: number;
|
|
576
|
+
sub_type?: number;
|
|
577
|
+
fee_total: number;
|
|
578
|
+
reference_id?: string;
|
|
579
|
+
reviewed_at?: string;
|
|
580
|
+
due_at?: string;
|
|
581
|
+
balance_on_request: number;
|
|
582
|
+
data?: Record<string, any>;
|
|
583
|
+
source_id?: number;
|
|
584
|
+
destination_id?: number;
|
|
585
|
+
merchant_id: number;
|
|
586
|
+
requester_id: number;
|
|
587
|
+
reviewer_id?: number;
|
|
588
|
+
currency_id: number;
|
|
589
|
+
evidence_file_id?: number;
|
|
590
|
+
inserted_at: string;
|
|
591
|
+
updated_at: string;
|
|
592
|
+
source?: FinancialAccount;
|
|
593
|
+
destination?: FinancialAccount;
|
|
594
|
+
merchant?: Merchant;
|
|
595
|
+
requester?: User;
|
|
596
|
+
reviewer?: User;
|
|
597
|
+
currency?: Currency;
|
|
354
598
|
}
|
|
355
|
-
export interface
|
|
356
|
-
|
|
357
|
-
|
|
599
|
+
export interface CreateFinancialRequestData {
|
|
600
|
+
total: number;
|
|
601
|
+
type: number;
|
|
602
|
+
sub_type?: number;
|
|
603
|
+
reference_id?: string;
|
|
604
|
+
due_at?: string;
|
|
605
|
+
data?: Record<string, any>;
|
|
606
|
+
source_id?: number;
|
|
607
|
+
destination_id?: number;
|
|
608
|
+
currency_id: number;
|
|
609
|
+
evidence_file_id?: number;
|
|
358
610
|
}
|
|
359
|
-
export interface
|
|
360
|
-
|
|
361
|
-
|
|
611
|
+
export interface UpdateFinancialRequestData {
|
|
612
|
+
total?: number;
|
|
613
|
+
status?: number;
|
|
614
|
+
type?: number;
|
|
615
|
+
sub_type?: number;
|
|
616
|
+
fee_total?: number;
|
|
617
|
+
reference_id?: string;
|
|
618
|
+
reviewed_at?: string;
|
|
619
|
+
due_at?: string;
|
|
620
|
+
data?: Record<string, any>;
|
|
621
|
+
source_id?: number;
|
|
622
|
+
destination_id?: number;
|
|
623
|
+
reviewer_id?: number;
|
|
624
|
+
currency_id?: number;
|
|
625
|
+
evidence_file_id?: number;
|
|
362
626
|
}
|
|
363
|
-
export interface
|
|
627
|
+
export interface WebhookUrl {
|
|
364
628
|
id: number;
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
first_name?: string;
|
|
368
|
-
last_name?: string;
|
|
369
|
-
username?: string;
|
|
370
|
-
status: number;
|
|
371
|
-
level: number;
|
|
372
|
-
dob?: number | null;
|
|
373
|
-
sex?: number | null;
|
|
374
|
-
image?: string | null;
|
|
629
|
+
url: string;
|
|
630
|
+
event: string;
|
|
375
631
|
uid: string;
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
};
|
|
380
|
-
organisation?: Organisation;
|
|
381
|
-
merchant?: Merchant;
|
|
382
|
-
created_at: string;
|
|
632
|
+
merchant_id?: number;
|
|
633
|
+
org_id?: number;
|
|
634
|
+
inserted_at: string;
|
|
383
635
|
updated_at: string;
|
|
636
|
+
merchant?: Merchant;
|
|
637
|
+
organisation?: Organisation;
|
|
384
638
|
}
|
|
385
|
-
export interface
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
username?: string;
|
|
391
|
-
password: string;
|
|
392
|
-
role_id?: number;
|
|
639
|
+
export interface CreateWebhookUrlData {
|
|
640
|
+
url: string;
|
|
641
|
+
event: string;
|
|
642
|
+
merchant_id?: number;
|
|
643
|
+
org_id?: number;
|
|
393
644
|
}
|
|
394
|
-
export interface
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
645
|
+
export interface UpdateWebhookUrlData {
|
|
646
|
+
url?: string;
|
|
647
|
+
event?: string;
|
|
648
|
+
merchant_id?: number;
|
|
649
|
+
org_id?: number;
|
|
650
|
+
}
|
|
651
|
+
export interface Token {
|
|
652
|
+
id: number;
|
|
653
|
+
public_key: string;
|
|
654
|
+
title?: string;
|
|
655
|
+
provider: string;
|
|
656
|
+
kind: number;
|
|
657
|
+
enabled: boolean;
|
|
658
|
+
expires?: number;
|
|
659
|
+
user_id: number;
|
|
660
|
+
role_id?: number;
|
|
661
|
+
inserted_at: string;
|
|
662
|
+
updated_at: string;
|
|
663
|
+
user?: User;
|
|
664
|
+
}
|
|
665
|
+
export interface CreateTokenData {
|
|
666
|
+
title?: string;
|
|
667
|
+
provider: string;
|
|
668
|
+
kind: number;
|
|
669
|
+
enabled?: boolean;
|
|
670
|
+
expires?: number;
|
|
671
|
+
user_id: number;
|
|
672
|
+
role_id?: number;
|
|
673
|
+
}
|
|
674
|
+
export interface UpdateTokenData {
|
|
675
|
+
title?: string;
|
|
676
|
+
enabled?: boolean;
|
|
677
|
+
expires?: number;
|
|
678
|
+
role_id?: number;
|
|
679
|
+
}
|
|
680
|
+
export interface ExchangeRate {
|
|
681
|
+
id: number;
|
|
682
|
+
source_id: number;
|
|
683
|
+
destination_id: number;
|
|
684
|
+
rate: number;
|
|
685
|
+
expires?: number;
|
|
686
|
+
source?: string;
|
|
687
|
+
user_id?: number;
|
|
688
|
+
inserted_at: string;
|
|
689
|
+
updated_at: string;
|
|
690
|
+
source_currency?: Currency;
|
|
691
|
+
destination_currency?: Currency;
|
|
692
|
+
user?: User;
|
|
693
|
+
}
|
|
694
|
+
export interface CreateExchangeRateData {
|
|
695
|
+
source_id: number;
|
|
696
|
+
destination_id: number;
|
|
697
|
+
rate: number;
|
|
698
|
+
expires?: number;
|
|
699
|
+
source?: string;
|
|
700
|
+
user_id?: number;
|
|
701
|
+
}
|
|
702
|
+
export interface UpdateExchangeRateData {
|
|
703
|
+
rate?: number;
|
|
704
|
+
expires?: number;
|
|
705
|
+
source?: string;
|
|
706
|
+
}
|
|
707
|
+
export interface Fee {
|
|
708
|
+
id: number;
|
|
709
|
+
title?: string;
|
|
710
|
+
total: number;
|
|
711
|
+
unit: number;
|
|
712
|
+
kind: number;
|
|
713
|
+
priority: number;
|
|
714
|
+
compound: boolean;
|
|
715
|
+
fee_payer: number;
|
|
716
|
+
currency_code?: string;
|
|
717
|
+
hash?: string;
|
|
718
|
+
fee_set_id?: number;
|
|
719
|
+
currency_id?: number;
|
|
720
|
+
user_id?: number;
|
|
721
|
+
inserted_at: string;
|
|
722
|
+
updated_at: string;
|
|
723
|
+
currency?: Currency;
|
|
724
|
+
user?: User;
|
|
725
|
+
}
|
|
726
|
+
export interface CreateFeeData {
|
|
727
|
+
title?: string;
|
|
728
|
+
total: number;
|
|
729
|
+
unit: number;
|
|
730
|
+
kind: number;
|
|
731
|
+
priority?: number;
|
|
732
|
+
compound?: boolean;
|
|
733
|
+
fee_payer?: number;
|
|
734
|
+
currency_code?: string;
|
|
735
|
+
fee_set_id?: number;
|
|
736
|
+
currency_id?: number;
|
|
737
|
+
user_id?: number;
|
|
738
|
+
}
|
|
739
|
+
export interface UpdateFeeData {
|
|
740
|
+
title?: string;
|
|
741
|
+
total?: number;
|
|
742
|
+
unit?: number;
|
|
743
|
+
kind?: number;
|
|
744
|
+
priority?: number;
|
|
745
|
+
compound?: boolean;
|
|
746
|
+
fee_payer?: number;
|
|
747
|
+
currency_code?: string;
|
|
748
|
+
fee_set_id?: number;
|
|
749
|
+
currency_id?: number;
|
|
750
|
+
user_id?: number;
|
|
751
|
+
}
|
|
752
|
+
export interface TransactionEntry {
|
|
753
|
+
id: number;
|
|
754
|
+
amount: number;
|
|
755
|
+
type: number;
|
|
756
|
+
transaction_id: number;
|
|
757
|
+
financial_account_id: number;
|
|
758
|
+
inserted_at: string;
|
|
759
|
+
updated_at: string;
|
|
760
|
+
financial_account?: FinancialAccount;
|
|
761
|
+
}
|
|
762
|
+
export interface CreateTransactionEntryData {
|
|
763
|
+
amount: number;
|
|
764
|
+
type: number;
|
|
765
|
+
transaction_id: number;
|
|
766
|
+
financial_account_id: number;
|
|
767
|
+
}
|
|
768
|
+
export interface UpdateTransactionEntryData {
|
|
769
|
+
amount?: number;
|
|
770
|
+
type?: number;
|
|
771
|
+
transaction_id?: number;
|
|
772
|
+
financial_account_id?: number;
|
|
773
|
+
}
|
|
774
|
+
export interface GenericResource {
|
|
775
|
+
id: number;
|
|
776
|
+
[key: string]: any;
|
|
777
|
+
inserted_at?: string;
|
|
778
|
+
updated_at?: string;
|
|
779
|
+
}
|
|
780
|
+
export interface BillingPlan {
|
|
781
|
+
id: number;
|
|
782
|
+
name: string;
|
|
783
|
+
description?: string;
|
|
784
|
+
flat_rate: number;
|
|
785
|
+
transaction_fee: number;
|
|
786
|
+
transaction_percentage: number;
|
|
787
|
+
transaction_percentage_additional: number;
|
|
788
|
+
transaction_minimum_fee: number;
|
|
789
|
+
minimum_fee: number;
|
|
790
|
+
duration: number;
|
|
791
|
+
status: StatusKey;
|
|
792
|
+
billing_cycle?: number;
|
|
793
|
+
trial_period: number;
|
|
794
|
+
charge_strategy: number;
|
|
795
|
+
kind: BillingPlanKind;
|
|
796
|
+
auto_charge: boolean;
|
|
797
|
+
public: boolean;
|
|
798
|
+
payout_period: number;
|
|
799
|
+
payout_value_limit: number;
|
|
800
|
+
payout_percentage_limit: number;
|
|
801
|
+
features?: Record<string, any>;
|
|
802
|
+
data?: Record<string, any>;
|
|
803
|
+
meta_data?: Record<string, any>;
|
|
804
|
+
uid: string;
|
|
805
|
+
currency_id: number;
|
|
806
|
+
payment_provider_id?: number;
|
|
807
|
+
inserted_at: string;
|
|
808
|
+
updated_at: string;
|
|
809
|
+
currency?: Currency;
|
|
810
|
+
}
|
|
811
|
+
export interface CreateBillingPlanData {
|
|
812
|
+
name: string;
|
|
813
|
+
description?: string;
|
|
814
|
+
flat_rate: number;
|
|
815
|
+
transaction_fee: number;
|
|
816
|
+
transaction_percentage: number;
|
|
817
|
+
transaction_percentage_additional?: number;
|
|
818
|
+
transaction_minimum_fee?: number;
|
|
819
|
+
minimum_fee?: number;
|
|
820
|
+
duration: number;
|
|
821
|
+
billing_cycle?: number;
|
|
822
|
+
trial_period?: number;
|
|
823
|
+
charge_strategy?: number;
|
|
824
|
+
kind?: BillingPlanKind | KindKey | number;
|
|
825
|
+
auto_charge?: boolean;
|
|
826
|
+
public?: boolean;
|
|
827
|
+
payout_period?: number;
|
|
828
|
+
payout_value_limit?: number;
|
|
829
|
+
payout_percentage_limit?: number;
|
|
830
|
+
features?: Record<string, any>;
|
|
831
|
+
data?: Record<string, any>;
|
|
832
|
+
meta_data?: Record<string, any>;
|
|
833
|
+
currency_id: number;
|
|
834
|
+
payment_provider_id?: number;
|
|
835
|
+
}
|
|
836
|
+
export interface UpdateBillingPlanData {
|
|
837
|
+
name?: string;
|
|
838
|
+
description?: string;
|
|
839
|
+
flat_rate?: number;
|
|
840
|
+
transaction_fee?: number;
|
|
841
|
+
transaction_percentage?: number;
|
|
842
|
+
transaction_percentage_additional?: number;
|
|
843
|
+
transaction_minimum_fee?: number;
|
|
844
|
+
minimum_fee?: number;
|
|
845
|
+
duration?: number;
|
|
846
|
+
status?: StatusKey;
|
|
847
|
+
billing_cycle?: number;
|
|
848
|
+
trial_period?: number;
|
|
849
|
+
charge_strategy?: number;
|
|
850
|
+
kind?: BillingPlanKind | KindKey | number;
|
|
851
|
+
auto_charge?: boolean;
|
|
852
|
+
public?: boolean;
|
|
853
|
+
payout_period?: number;
|
|
854
|
+
payout_value_limit?: number;
|
|
855
|
+
payout_percentage_limit?: number;
|
|
856
|
+
features?: Record<string, any>;
|
|
857
|
+
data?: Record<string, any>;
|
|
858
|
+
meta_data?: Record<string, any>;
|
|
859
|
+
currency_id?: number;
|
|
860
|
+
payment_provider_id?: number;
|
|
861
|
+
}
|
|
862
|
+
export interface Subscription {
|
|
863
|
+
id: number;
|
|
864
|
+
status: StatusKey;
|
|
865
|
+
kind: KindKey;
|
|
866
|
+
record_id: number;
|
|
867
|
+
record: string;
|
|
868
|
+
start_date: string;
|
|
869
|
+
end_date?: string;
|
|
870
|
+
current_period_start?: string;
|
|
871
|
+
current_period_end?: string;
|
|
872
|
+
trial_end?: string;
|
|
873
|
+
canceled_at?: string;
|
|
874
|
+
uid: string;
|
|
875
|
+
token?: string;
|
|
876
|
+
billing_plan_id: number;
|
|
877
|
+
customer_id?: number;
|
|
878
|
+
order_id?: number;
|
|
879
|
+
data?: Record<string, any>;
|
|
880
|
+
meta_data?: Record<string, any>;
|
|
881
|
+
inserted_at: string;
|
|
882
|
+
updated_at: string;
|
|
883
|
+
billing_plan?: BillingPlan;
|
|
884
|
+
customer?: Customer;
|
|
885
|
+
order?: Order;
|
|
886
|
+
subscription_periods?: SubscriptionPeriod[];
|
|
887
|
+
}
|
|
888
|
+
export interface CreateSubscriptionData {
|
|
889
|
+
billing_plan_id: number;
|
|
890
|
+
record: string;
|
|
891
|
+
record_id: number;
|
|
892
|
+
start_date: string;
|
|
893
|
+
end_date?: string;
|
|
894
|
+
status?: StatusKey;
|
|
895
|
+
kind?: KindKey;
|
|
896
|
+
current_period_start?: string;
|
|
897
|
+
current_period_end?: string;
|
|
898
|
+
trial_end?: string;
|
|
899
|
+
token?: string;
|
|
900
|
+
customer_id?: number;
|
|
901
|
+
order_id?: number;
|
|
902
|
+
data?: Record<string, any>;
|
|
903
|
+
meta_data?: Record<string, any>;
|
|
904
|
+
}
|
|
905
|
+
export interface SubscriptionPeriod {
|
|
906
|
+
id: number;
|
|
907
|
+
subscription_id: string;
|
|
908
|
+
start_date: string;
|
|
909
|
+
end_date: string;
|
|
910
|
+
status: string;
|
|
911
|
+
inserted_at: string;
|
|
912
|
+
updated_at: string;
|
|
913
|
+
}
|
|
914
|
+
export interface SubscriptionUsageResponse {
|
|
915
|
+
id: number;
|
|
916
|
+
subscription_id: string;
|
|
917
|
+
usage_amount: number;
|
|
918
|
+
recorded_at: string;
|
|
919
|
+
description?: string;
|
|
920
|
+
}
|
|
921
|
+
export interface SubscriptionCancelResponse {
|
|
922
|
+
id: number;
|
|
923
|
+
uid: string;
|
|
924
|
+
status: string;
|
|
925
|
+
canceled_at: string;
|
|
926
|
+
cancellation_reason?: string;
|
|
927
|
+
}
|
|
928
|
+
export interface SubscriptionLinkData {
|
|
929
|
+
uid: string;
|
|
930
|
+
token: string;
|
|
931
|
+
}
|
|
932
|
+
export interface SubscriptionChargeData {
|
|
933
|
+
amount?: number;
|
|
934
|
+
description?: string;
|
|
935
|
+
}
|
|
936
|
+
export interface User {
|
|
937
|
+
id: number;
|
|
938
|
+
email: string;
|
|
939
|
+
phone?: string;
|
|
940
|
+
first_name: string;
|
|
941
|
+
last_name: string;
|
|
942
|
+
username?: string;
|
|
943
|
+
status: AccountStatus;
|
|
944
|
+
level: number;
|
|
945
|
+
dob?: number | null;
|
|
946
|
+
sex?: number | null;
|
|
947
|
+
image?: string | null;
|
|
948
|
+
uid: string;
|
|
949
|
+
kind?: UserKind;
|
|
950
|
+
organisation_id?: number;
|
|
951
|
+
role_id?: number;
|
|
952
|
+
inserted_at: string;
|
|
953
|
+
updated_at: string;
|
|
954
|
+
organisation?: Organisation;
|
|
955
|
+
}
|
|
956
|
+
export interface CreateUserData {
|
|
957
|
+
email: string;
|
|
958
|
+
phone?: string;
|
|
959
|
+
first_name: string;
|
|
960
|
+
last_name: string;
|
|
961
|
+
username?: string;
|
|
962
|
+
password: string;
|
|
963
|
+
status?: AccountStatus | StatusKey | number;
|
|
964
|
+
level?: number;
|
|
965
|
+
dob?: number;
|
|
966
|
+
sex?: number;
|
|
967
|
+
image?: string;
|
|
968
|
+
kind?: UserKind | KindKey | number;
|
|
969
|
+
organisation_id?: number;
|
|
970
|
+
role_id?: number;
|
|
971
|
+
}
|
|
972
|
+
export interface UpdateUserData {
|
|
973
|
+
email?: string;
|
|
974
|
+
phone?: string;
|
|
975
|
+
first_name?: string;
|
|
398
976
|
last_name?: string;
|
|
399
977
|
username?: string;
|
|
400
|
-
status?: number;
|
|
978
|
+
status?: AccountStatus | StatusKey | number;
|
|
401
979
|
level?: number;
|
|
980
|
+
dob?: number;
|
|
981
|
+
sex?: number;
|
|
982
|
+
image?: string;
|
|
983
|
+
kind?: UserKind | KindKey | number;
|
|
984
|
+
organisation_id?: number;
|
|
402
985
|
role_id?: number;
|
|
403
986
|
}
|
|
404
987
|
export interface WebhookEvent {
|
|
@@ -442,4 +1025,293 @@ export interface PublicMerchantProducts {
|
|
|
442
1025
|
products: Product[];
|
|
443
1026
|
[key: string]: any;
|
|
444
1027
|
}
|
|
1028
|
+
export interface KycRequest {
|
|
1029
|
+
id: number;
|
|
1030
|
+
kind: KycKind | KindKey;
|
|
1031
|
+
status: KycStatus | StatusKey;
|
|
1032
|
+
user_id?: number;
|
|
1033
|
+
subject_id?: number;
|
|
1034
|
+
data?: Record<string, any>;
|
|
1035
|
+
inserted_at: string;
|
|
1036
|
+
updated_at: string;
|
|
1037
|
+
user?: User;
|
|
1038
|
+
}
|
|
1039
|
+
export interface CreateKycRequestData {
|
|
1040
|
+
kind: KycKind | KindKey;
|
|
1041
|
+
status?: KycStatus | StatusKey;
|
|
1042
|
+
user_id?: number;
|
|
1043
|
+
subject_id?: number;
|
|
1044
|
+
data?: Record<string, any>;
|
|
1045
|
+
}
|
|
1046
|
+
export interface UpdateKycRequestData {
|
|
1047
|
+
kind?: KycKind | KindKey;
|
|
1048
|
+
status?: KycStatus | StatusKey;
|
|
1049
|
+
user_id?: number;
|
|
1050
|
+
subject_id?: number;
|
|
1051
|
+
data?: Record<string, any>;
|
|
1052
|
+
}
|
|
1053
|
+
export interface PayoutRequest {
|
|
1054
|
+
id: number;
|
|
1055
|
+
total: number;
|
|
1056
|
+
status: StatusKey;
|
|
1057
|
+
balance_on_request: number;
|
|
1058
|
+
reference_id?: string;
|
|
1059
|
+
evidence_file_id?: number;
|
|
1060
|
+
merchant_id: number;
|
|
1061
|
+
requester_id: number;
|
|
1062
|
+
type: KindKey;
|
|
1063
|
+
sub_type: KindKey;
|
|
1064
|
+
reviewer_id?: number;
|
|
1065
|
+
reviewed_at?: string;
|
|
1066
|
+
due_at: string;
|
|
1067
|
+
fee_total: number;
|
|
1068
|
+
currency_id: number;
|
|
1069
|
+
inserted_at: string;
|
|
1070
|
+
updated_at: string;
|
|
1071
|
+
merchant?: Merchant;
|
|
1072
|
+
requester?: User;
|
|
1073
|
+
reviewer?: User;
|
|
1074
|
+
currency?: Currency;
|
|
1075
|
+
}
|
|
1076
|
+
export interface CreatePayoutRequestData {
|
|
1077
|
+
total: number;
|
|
1078
|
+
type?: KindKey;
|
|
1079
|
+
sub_type?: KindKey;
|
|
1080
|
+
reference_id?: string;
|
|
1081
|
+
evidence_file_id?: number;
|
|
1082
|
+
due_at?: string;
|
|
1083
|
+
currency_id?: number;
|
|
1084
|
+
}
|
|
1085
|
+
export interface UpdatePayoutRequestData {
|
|
1086
|
+
total?: number;
|
|
1087
|
+
status?: StatusKey;
|
|
1088
|
+
type?: KindKey;
|
|
1089
|
+
sub_type?: KindKey;
|
|
1090
|
+
reference_id?: string;
|
|
1091
|
+
evidence_file_id?: number;
|
|
1092
|
+
reviewer_id?: number;
|
|
1093
|
+
reviewed_at?: string;
|
|
1094
|
+
due_at?: string;
|
|
1095
|
+
fee_total?: number;
|
|
1096
|
+
currency_id?: number;
|
|
1097
|
+
}
|
|
1098
|
+
export interface InternalMerchant {
|
|
1099
|
+
id: number;
|
|
1100
|
+
name: string;
|
|
1101
|
+
email: string;
|
|
1102
|
+
username: string;
|
|
1103
|
+
about?: string;
|
|
1104
|
+
logo?: string;
|
|
1105
|
+
sector?: string;
|
|
1106
|
+
status: number;
|
|
1107
|
+
phone?: string;
|
|
1108
|
+
business_type?: string;
|
|
1109
|
+
theme_colour?: string;
|
|
1110
|
+
uid: string;
|
|
1111
|
+
address_id?: number;
|
|
1112
|
+
owner_id?: number;
|
|
1113
|
+
domain_id?: number;
|
|
1114
|
+
organisation_id?: number;
|
|
1115
|
+
platform_fee_structure: number;
|
|
1116
|
+
provider_fee_structure: number;
|
|
1117
|
+
parent_merchant_id?: number;
|
|
1118
|
+
data?: Record<string, any>;
|
|
1119
|
+
inserted_at: string;
|
|
1120
|
+
updated_at: string;
|
|
1121
|
+
}
|
|
1122
|
+
export interface InternalCreateMerchantData {
|
|
1123
|
+
name: string;
|
|
1124
|
+
email: string;
|
|
1125
|
+
phone?: string;
|
|
1126
|
+
about?: string;
|
|
1127
|
+
status?: number;
|
|
1128
|
+
platform_fee_structure?: number;
|
|
1129
|
+
provider_fee_structure?: number;
|
|
1130
|
+
}
|
|
1131
|
+
export interface InternalUpdateMerchantData {
|
|
1132
|
+
name?: string;
|
|
1133
|
+
email?: string;
|
|
1134
|
+
phone?: string;
|
|
1135
|
+
about?: string;
|
|
1136
|
+
status?: number;
|
|
1137
|
+
platform_fee_structure?: number;
|
|
1138
|
+
provider_fee_structure?: number;
|
|
1139
|
+
}
|
|
1140
|
+
export interface InternalCategory {
|
|
1141
|
+
id: number;
|
|
1142
|
+
name: string;
|
|
1143
|
+
description?: string | null;
|
|
1144
|
+
kind: number;
|
|
1145
|
+
kind_id?: number | null;
|
|
1146
|
+
parent_id?: number | null;
|
|
1147
|
+
uid: string;
|
|
1148
|
+
inserted_at: string;
|
|
1149
|
+
updated_at: string;
|
|
1150
|
+
}
|
|
1151
|
+
export interface InternalProduct {
|
|
1152
|
+
id: number;
|
|
1153
|
+
title: string;
|
|
1154
|
+
teaser?: string;
|
|
1155
|
+
price: number;
|
|
1156
|
+
permalink: string;
|
|
1157
|
+
image?: string | null;
|
|
1158
|
+
status: number;
|
|
1159
|
+
public: boolean;
|
|
1160
|
+
unlimited: boolean;
|
|
1161
|
+
units_remaining?: number | null;
|
|
1162
|
+
units_sold?: number | null;
|
|
1163
|
+
rating_sum?: number | null;
|
|
1164
|
+
rating_count?: number | null;
|
|
1165
|
+
tag_ids: number[];
|
|
1166
|
+
data?: Record<string, any>;
|
|
1167
|
+
meta?: Record<string, any>;
|
|
1168
|
+
uid: string;
|
|
1169
|
+
category_id?: number;
|
|
1170
|
+
currency_id?: number;
|
|
1171
|
+
user_id?: number;
|
|
1172
|
+
inserted_at: string;
|
|
1173
|
+
updated_at: string;
|
|
1174
|
+
}
|
|
1175
|
+
export interface InternalOrder {
|
|
1176
|
+
id: number;
|
|
1177
|
+
reference_id?: string;
|
|
1178
|
+
total: number;
|
|
1179
|
+
kind: number;
|
|
1180
|
+
status: number;
|
|
1181
|
+
status_on: number;
|
|
1182
|
+
uid: string;
|
|
1183
|
+
cart_id?: number | null;
|
|
1184
|
+
customer?: Customer;
|
|
1185
|
+
currency: Currency;
|
|
1186
|
+
billing_plan?: any | null;
|
|
1187
|
+
billing_subscription_id?: number;
|
|
1188
|
+
order_detail?: Record<string, any>;
|
|
1189
|
+
transactions?: any[];
|
|
1190
|
+
payment_methods?: PaymentMethod[];
|
|
1191
|
+
order_lines: OrderLine[];
|
|
1192
|
+
merchant: InternalMerchant;
|
|
1193
|
+
organisation: Organisation;
|
|
1194
|
+
payment_urls?: {
|
|
1195
|
+
short_link: string;
|
|
1196
|
+
};
|
|
1197
|
+
meta_data?: Record<string, any>;
|
|
1198
|
+
inserted_at: string;
|
|
1199
|
+
updated_at: string;
|
|
1200
|
+
}
|
|
1201
|
+
export interface InternalUser {
|
|
1202
|
+
id: number;
|
|
1203
|
+
email: string;
|
|
1204
|
+
phone?: string;
|
|
1205
|
+
first_name: string;
|
|
1206
|
+
last_name: string;
|
|
1207
|
+
username?: string;
|
|
1208
|
+
status: number;
|
|
1209
|
+
kind: number;
|
|
1210
|
+
level: number;
|
|
1211
|
+
dob?: number | null;
|
|
1212
|
+
sex?: number | null;
|
|
1213
|
+
image?: string | null;
|
|
1214
|
+
uid: string;
|
|
1215
|
+
organisation_id?: number;
|
|
1216
|
+
role_id?: number;
|
|
1217
|
+
inserted_at: string;
|
|
1218
|
+
updated_at: string;
|
|
1219
|
+
}
|
|
1220
|
+
export interface InternalPaymentLink {
|
|
1221
|
+
id: number;
|
|
1222
|
+
uid: string;
|
|
1223
|
+
title: string;
|
|
1224
|
+
description?: string;
|
|
1225
|
+
total: number;
|
|
1226
|
+
usage_limit: number;
|
|
1227
|
+
expires_at?: string;
|
|
1228
|
+
status: number;
|
|
1229
|
+
kind: number;
|
|
1230
|
+
data?: Record<string, any>;
|
|
1231
|
+
customer_id?: number;
|
|
1232
|
+
currency_id: number;
|
|
1233
|
+
order_id?: number;
|
|
1234
|
+
inserted_at: string;
|
|
1235
|
+
updated_at: string;
|
|
1236
|
+
}
|
|
1237
|
+
export interface InternalBillingPlan {
|
|
1238
|
+
id: number;
|
|
1239
|
+
name: string;
|
|
1240
|
+
description?: string;
|
|
1241
|
+
flat_rate: number;
|
|
1242
|
+
transaction_fee: number;
|
|
1243
|
+
transaction_percentage: number;
|
|
1244
|
+
transaction_percentage_additional: number;
|
|
1245
|
+
transaction_minimum_fee: number;
|
|
1246
|
+
minimum_fee: number;
|
|
1247
|
+
duration: number;
|
|
1248
|
+
status: number;
|
|
1249
|
+
kind: number;
|
|
1250
|
+
billing_cycle?: number;
|
|
1251
|
+
trial_period: number;
|
|
1252
|
+
charge_strategy: number;
|
|
1253
|
+
auto_charge: boolean;
|
|
1254
|
+
public: boolean;
|
|
1255
|
+
payout_period: number;
|
|
1256
|
+
payout_value_limit: number;
|
|
1257
|
+
payout_percentage_limit: number;
|
|
1258
|
+
features?: Record<string, any>;
|
|
1259
|
+
data?: Record<string, any>;
|
|
1260
|
+
meta_data?: Record<string, any>;
|
|
1261
|
+
uid: string;
|
|
1262
|
+
currency_id: number;
|
|
1263
|
+
payment_provider_id?: number;
|
|
1264
|
+
inserted_at: string;
|
|
1265
|
+
updated_at: string;
|
|
1266
|
+
currency?: Currency;
|
|
1267
|
+
}
|
|
1268
|
+
export interface InternalSubscription {
|
|
1269
|
+
id: number;
|
|
1270
|
+
status: number;
|
|
1271
|
+
kind: number;
|
|
1272
|
+
current_period_start: string;
|
|
1273
|
+
current_period_end: string;
|
|
1274
|
+
trial_end?: string;
|
|
1275
|
+
canceled_at?: string;
|
|
1276
|
+
start_date: string;
|
|
1277
|
+
end_date?: string;
|
|
1278
|
+
record: string;
|
|
1279
|
+
record_id: number;
|
|
1280
|
+
customer_id?: number;
|
|
1281
|
+
order_id?: number;
|
|
1282
|
+
uid: string;
|
|
1283
|
+
token?: string;
|
|
1284
|
+
billing_plan_id: number;
|
|
1285
|
+
has_token: boolean;
|
|
1286
|
+
billing_plan: InternalBillingPlan;
|
|
1287
|
+
subscription_periods?: SubscriptionPeriod[];
|
|
1288
|
+
data?: Record<string, any>;
|
|
1289
|
+
meta_data?: Record<string, any>;
|
|
1290
|
+
inserted_at: string;
|
|
1291
|
+
updated_at: string;
|
|
1292
|
+
}
|
|
1293
|
+
export interface InternalKycRequest {
|
|
1294
|
+
id: number;
|
|
1295
|
+
kind: number;
|
|
1296
|
+
status: number;
|
|
1297
|
+
data?: Record<string, any>;
|
|
1298
|
+
user_id: number;
|
|
1299
|
+
merchant_id?: number;
|
|
1300
|
+
uid: string;
|
|
1301
|
+
inserted_at: string;
|
|
1302
|
+
updated_at: string;
|
|
1303
|
+
}
|
|
1304
|
+
export interface InternalPayoutRequest {
|
|
1305
|
+
id: number;
|
|
1306
|
+
amount: number;
|
|
1307
|
+
currency_code: string;
|
|
1308
|
+
status: number;
|
|
1309
|
+
type: number;
|
|
1310
|
+
sub_type: number;
|
|
1311
|
+
data?: Record<string, any>;
|
|
1312
|
+
merchant_id: number;
|
|
1313
|
+
uid: string;
|
|
1314
|
+
inserted_at: string;
|
|
1315
|
+
updated_at: string;
|
|
1316
|
+
}
|
|
445
1317
|
//# sourceMappingURL=types.d.ts.map
|