monime-package 1.0.3 → 1.0.5
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/README.md +277 -77
- package/dist/index.d.mts +576 -68
- package/dist/index.d.ts +576 -68
- package/dist/index.js +332 -69
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +325 -62
- package/dist/index.mjs.map +1 -1
- package/package.json +39 -37
package/dist/index.d.mts
CHANGED
|
@@ -1,45 +1,63 @@
|
|
|
1
1
|
interface CreateFinancialAccount {
|
|
2
2
|
success: boolean;
|
|
3
3
|
messages: string[];
|
|
4
|
-
result: Result$
|
|
4
|
+
result: Result$4;
|
|
5
5
|
}
|
|
6
6
|
interface GetFinancialAccount {
|
|
7
7
|
success: boolean;
|
|
8
8
|
messages: string[];
|
|
9
|
-
result: Result$
|
|
9
|
+
result: Result$4;
|
|
10
10
|
}
|
|
11
|
-
interface
|
|
11
|
+
interface AllFinancialAccount {
|
|
12
|
+
success: boolean;
|
|
13
|
+
messages: string[];
|
|
14
|
+
result: Result$4[];
|
|
15
|
+
pagination: Pagination$4;
|
|
16
|
+
}
|
|
17
|
+
interface Pagination$4 {
|
|
18
|
+
count: number;
|
|
19
|
+
next: string;
|
|
20
|
+
}
|
|
21
|
+
interface Result$4 {
|
|
12
22
|
id: string;
|
|
13
23
|
uvan: string;
|
|
14
24
|
name: string;
|
|
15
25
|
currency: string;
|
|
16
26
|
reference: string;
|
|
17
27
|
description: string;
|
|
18
|
-
balance: Balance;
|
|
28
|
+
balance: Balance$1;
|
|
19
29
|
createTime: string;
|
|
20
30
|
updateTime: string;
|
|
21
|
-
metadata: Metadata$2;
|
|
22
31
|
}
|
|
23
|
-
interface Result$
|
|
32
|
+
interface Result$4 {
|
|
24
33
|
id: string;
|
|
25
34
|
uvan: string;
|
|
26
35
|
name: string;
|
|
27
36
|
currency: string;
|
|
28
37
|
reference: string;
|
|
29
38
|
description: string;
|
|
30
|
-
balance: Balance;
|
|
39
|
+
balance: Balance$1;
|
|
31
40
|
createTime: string;
|
|
32
41
|
updateTime: string;
|
|
33
|
-
metadata: Metadata$2;
|
|
34
42
|
}
|
|
35
|
-
interface
|
|
43
|
+
interface Result$4 {
|
|
44
|
+
id: string;
|
|
45
|
+
uvan: string;
|
|
46
|
+
name: string;
|
|
47
|
+
currency: string;
|
|
48
|
+
reference: string;
|
|
49
|
+
description: string;
|
|
50
|
+
balance: Balance$1;
|
|
51
|
+
createTime: string;
|
|
52
|
+
updateTime: string;
|
|
36
53
|
}
|
|
37
|
-
interface
|
|
54
|
+
interface Balance$1 {
|
|
55
|
+
available: Available;
|
|
38
56
|
}
|
|
39
|
-
interface Balance {
|
|
57
|
+
interface Balance$1 {
|
|
40
58
|
available: Available;
|
|
41
59
|
}
|
|
42
|
-
interface Balance {
|
|
60
|
+
interface Balance$1 {
|
|
43
61
|
available: Available;
|
|
44
62
|
}
|
|
45
63
|
interface Available {
|
|
@@ -50,42 +68,113 @@ interface Available {
|
|
|
50
68
|
currency: string;
|
|
51
69
|
value: number;
|
|
52
70
|
}
|
|
71
|
+
interface Available {
|
|
72
|
+
currency: string;
|
|
73
|
+
value: number;
|
|
74
|
+
}
|
|
53
75
|
|
|
54
76
|
interface CreateInternalTransfer {
|
|
55
77
|
success: boolean;
|
|
56
78
|
messages: string[];
|
|
57
|
-
result: Result$
|
|
79
|
+
result: Result$3;
|
|
58
80
|
}
|
|
59
|
-
interface
|
|
81
|
+
interface AllInternalTransfers {
|
|
82
|
+
success: boolean;
|
|
83
|
+
messages: string[];
|
|
84
|
+
result: Result$3[];
|
|
85
|
+
pagination: Pagination$3;
|
|
86
|
+
}
|
|
87
|
+
interface Pagination$3 {
|
|
88
|
+
count: number;
|
|
89
|
+
next: string;
|
|
90
|
+
}
|
|
91
|
+
interface InternalTransfer {
|
|
92
|
+
success: boolean;
|
|
93
|
+
messages: string[];
|
|
94
|
+
result: Result$3;
|
|
95
|
+
}
|
|
96
|
+
interface Result$3 {
|
|
60
97
|
id: string;
|
|
61
98
|
status: string;
|
|
62
|
-
amount: Amount$
|
|
99
|
+
amount: Amount$3;
|
|
63
100
|
sourceFinancialAccount: SourceFinancialAccount;
|
|
64
101
|
destinationFinancialAccount: SourceFinancialAccount;
|
|
65
102
|
financialTransactionReference: string;
|
|
66
103
|
description: string;
|
|
67
104
|
failureDetail: FailureDetail$1;
|
|
68
|
-
ownershipGraph: OwnershipGraph$
|
|
105
|
+
ownershipGraph: OwnershipGraph$3;
|
|
69
106
|
createTime: string;
|
|
70
107
|
updateTime: string;
|
|
71
|
-
metadata: Metadata$1;
|
|
72
108
|
}
|
|
73
|
-
interface
|
|
74
|
-
|
|
109
|
+
interface Result$3 {
|
|
110
|
+
id: string;
|
|
111
|
+
status: string;
|
|
112
|
+
amount: Amount$3;
|
|
113
|
+
sourceFinancialAccount: SourceFinancialAccount;
|
|
114
|
+
destinationFinancialAccount: SourceFinancialAccount;
|
|
115
|
+
financialTransactionReference: string;
|
|
116
|
+
description: string;
|
|
117
|
+
failureDetail: FailureDetail$1;
|
|
118
|
+
ownershipGraph: OwnershipGraph$3;
|
|
119
|
+
createTime: string;
|
|
120
|
+
updateTime: string;
|
|
75
121
|
}
|
|
76
|
-
interface
|
|
122
|
+
interface Result$3 {
|
|
123
|
+
id: string;
|
|
124
|
+
status: string;
|
|
125
|
+
amount: Amount$3;
|
|
126
|
+
sourceFinancialAccount: SourceFinancialAccount;
|
|
127
|
+
destinationFinancialAccount: SourceFinancialAccount;
|
|
128
|
+
financialTransactionReference: string;
|
|
129
|
+
description: string;
|
|
130
|
+
failureDetail: FailureDetail$1;
|
|
131
|
+
ownershipGraph: OwnershipGraph$3;
|
|
132
|
+
createTime: string;
|
|
133
|
+
updateTime: string;
|
|
134
|
+
}
|
|
135
|
+
interface OwnershipGraph$3 {
|
|
136
|
+
owner: Owner2$3;
|
|
137
|
+
}
|
|
138
|
+
interface OwnershipGraph$3 {
|
|
139
|
+
owner: Owner2$3;
|
|
140
|
+
}
|
|
141
|
+
interface OwnershipGraph$3 {
|
|
142
|
+
owner: Owner2$3;
|
|
143
|
+
}
|
|
144
|
+
interface Owner2$3 {
|
|
77
145
|
id: string;
|
|
78
146
|
type: string;
|
|
79
|
-
|
|
80
|
-
owner: Owner$1;
|
|
147
|
+
owner: Owner$3;
|
|
81
148
|
}
|
|
82
|
-
interface
|
|
149
|
+
interface Owner2$3 {
|
|
150
|
+
id: string;
|
|
151
|
+
type: string;
|
|
152
|
+
owner: Owner$3;
|
|
153
|
+
}
|
|
154
|
+
interface Owner2$3 {
|
|
155
|
+
id: string;
|
|
156
|
+
type: string;
|
|
157
|
+
owner: Owner$3;
|
|
158
|
+
}
|
|
159
|
+
interface Owner$3 {
|
|
160
|
+
id: string;
|
|
161
|
+
type: string;
|
|
162
|
+
}
|
|
163
|
+
interface Owner$3 {
|
|
164
|
+
id: string;
|
|
165
|
+
type: string;
|
|
166
|
+
}
|
|
167
|
+
interface Owner$3 {
|
|
83
168
|
id: string;
|
|
84
169
|
type: string;
|
|
85
|
-
metadata: Metadata$1;
|
|
86
|
-
owner: Metadata$1;
|
|
87
170
|
}
|
|
88
|
-
interface
|
|
171
|
+
interface FailureDetail$1 {
|
|
172
|
+
code: string;
|
|
173
|
+
message: string;
|
|
174
|
+
}
|
|
175
|
+
interface FailureDetail$1 {
|
|
176
|
+
code: string;
|
|
177
|
+
message: string;
|
|
89
178
|
}
|
|
90
179
|
interface FailureDetail$1 {
|
|
91
180
|
code: string;
|
|
@@ -94,7 +183,21 @@ interface FailureDetail$1 {
|
|
|
94
183
|
interface SourceFinancialAccount {
|
|
95
184
|
id: string;
|
|
96
185
|
}
|
|
97
|
-
interface
|
|
186
|
+
interface SourceFinancialAccount {
|
|
187
|
+
id: string;
|
|
188
|
+
}
|
|
189
|
+
interface SourceFinancialAccount {
|
|
190
|
+
id: string;
|
|
191
|
+
}
|
|
192
|
+
interface Amount$3 {
|
|
193
|
+
currency: string;
|
|
194
|
+
value: number;
|
|
195
|
+
}
|
|
196
|
+
interface Amount$3 {
|
|
197
|
+
currency: string;
|
|
198
|
+
value: number;
|
|
199
|
+
}
|
|
200
|
+
interface Amount$3 {
|
|
98
201
|
currency: string;
|
|
99
202
|
value: number;
|
|
100
203
|
}
|
|
@@ -102,9 +205,24 @@ interface Amount$1 {
|
|
|
102
205
|
interface CreatePaymentCode {
|
|
103
206
|
success: boolean;
|
|
104
207
|
messages: string[];
|
|
105
|
-
result: Result$
|
|
208
|
+
result: Result$2;
|
|
106
209
|
}
|
|
107
|
-
interface
|
|
210
|
+
interface GetAllPaymentCode {
|
|
211
|
+
success: boolean;
|
|
212
|
+
messages: string[];
|
|
213
|
+
result: Result$2[];
|
|
214
|
+
pagination: Pagination$2;
|
|
215
|
+
}
|
|
216
|
+
interface Pagination$2 {
|
|
217
|
+
count: number;
|
|
218
|
+
next: string;
|
|
219
|
+
}
|
|
220
|
+
interface GetOne {
|
|
221
|
+
success: boolean;
|
|
222
|
+
messages: string[];
|
|
223
|
+
result: Result$2;
|
|
224
|
+
}
|
|
225
|
+
interface Result$2 {
|
|
108
226
|
id: string;
|
|
109
227
|
mode: string;
|
|
110
228
|
status: string;
|
|
@@ -133,22 +251,82 @@ interface Result$1 {
|
|
|
133
251
|
processedPaymentData: ProcessedPaymentData;
|
|
134
252
|
createTime: string;
|
|
135
253
|
updateTime: string;
|
|
136
|
-
ownershipGraph: OwnershipGraph$
|
|
137
|
-
metadata: {};
|
|
254
|
+
ownershipGraph: OwnershipGraph$2;
|
|
138
255
|
}
|
|
139
|
-
interface
|
|
256
|
+
interface Result$2 {
|
|
257
|
+
id: string;
|
|
258
|
+
mode: string;
|
|
259
|
+
status: string;
|
|
260
|
+
name: string;
|
|
261
|
+
amount: Amount$2;
|
|
262
|
+
enable: boolean;
|
|
263
|
+
expireTime: string;
|
|
264
|
+
customer: Customer;
|
|
265
|
+
ussdCode: string;
|
|
266
|
+
reference: string;
|
|
267
|
+
authorizedProviders: string[];
|
|
268
|
+
authorizedPhoneNumber: string;
|
|
269
|
+
recurrentPaymentTarget: RecurrentPaymentTarget;
|
|
270
|
+
financialAccountId: string;
|
|
271
|
+
processedPaymentData: ProcessedPaymentData;
|
|
272
|
+
createTime: string;
|
|
273
|
+
updateTime: string;
|
|
274
|
+
ownershipGraph: OwnershipGraph$2;
|
|
275
|
+
}
|
|
276
|
+
interface Result$2 {
|
|
277
|
+
id: string;
|
|
278
|
+
mode: string;
|
|
279
|
+
status: string;
|
|
280
|
+
name: string;
|
|
281
|
+
amount: Amount$2;
|
|
282
|
+
enable: boolean;
|
|
283
|
+
expireTime: string;
|
|
284
|
+
customer: Customer;
|
|
285
|
+
ussdCode: string;
|
|
286
|
+
reference: string;
|
|
287
|
+
authorizedProviders: string[];
|
|
288
|
+
authorizedPhoneNumber: string;
|
|
289
|
+
recurrentPaymentTarget: RecurrentPaymentTarget;
|
|
290
|
+
financialAccountId: string;
|
|
291
|
+
processedPaymentData: ProcessedPaymentData;
|
|
292
|
+
createTime: string;
|
|
293
|
+
updateTime: string;
|
|
294
|
+
ownershipGraph: OwnershipGraph$2;
|
|
295
|
+
}
|
|
296
|
+
interface OwnershipGraph$2 {
|
|
140
297
|
owner: {
|
|
141
298
|
id: string;
|
|
142
299
|
type: string;
|
|
143
|
-
metadata: {};
|
|
144
300
|
owner: {
|
|
145
301
|
id: string;
|
|
146
302
|
type: string;
|
|
147
|
-
metadata: {};
|
|
148
|
-
owner: {};
|
|
149
303
|
};
|
|
150
304
|
};
|
|
151
305
|
}
|
|
306
|
+
interface OwnershipGraph$2 {
|
|
307
|
+
owner: Owner2$2;
|
|
308
|
+
}
|
|
309
|
+
interface OwnershipGraph$2 {
|
|
310
|
+
owner: Owner2$2;
|
|
311
|
+
}
|
|
312
|
+
interface Owner2$2 {
|
|
313
|
+
id: string;
|
|
314
|
+
type: string;
|
|
315
|
+
owner: Owner$2;
|
|
316
|
+
}
|
|
317
|
+
interface Owner2$2 {
|
|
318
|
+
id: string;
|
|
319
|
+
type: string;
|
|
320
|
+
owner: Owner$2;
|
|
321
|
+
}
|
|
322
|
+
interface Owner$2 {
|
|
323
|
+
id: string;
|
|
324
|
+
type: string;
|
|
325
|
+
}
|
|
326
|
+
interface Owner$2 {
|
|
327
|
+
id: string;
|
|
328
|
+
type: string;
|
|
329
|
+
}
|
|
152
330
|
interface ProcessedPaymentData {
|
|
153
331
|
amount: {
|
|
154
332
|
currency: string;
|
|
@@ -163,41 +341,168 @@ interface ProcessedPaymentData {
|
|
|
163
341
|
reference: string;
|
|
164
342
|
};
|
|
165
343
|
financialTransactionReference: string;
|
|
166
|
-
|
|
344
|
+
}
|
|
345
|
+
interface ProcessedPaymentData {
|
|
346
|
+
amount: Amount$2;
|
|
347
|
+
orderId: string;
|
|
348
|
+
paymentId: string;
|
|
349
|
+
orderNumber: string;
|
|
350
|
+
channelData: ChannelData;
|
|
351
|
+
financialTransactionReference: string;
|
|
352
|
+
}
|
|
353
|
+
interface ProcessedPaymentData {
|
|
354
|
+
amount: Amount$2;
|
|
355
|
+
orderId: string;
|
|
356
|
+
paymentId: string;
|
|
357
|
+
orderNumber: string;
|
|
358
|
+
channelData: ChannelData;
|
|
359
|
+
financialTransactionReference: string;
|
|
360
|
+
}
|
|
361
|
+
interface ChannelData {
|
|
362
|
+
providerId: string;
|
|
363
|
+
accountId: string;
|
|
364
|
+
reference: string;
|
|
365
|
+
}
|
|
366
|
+
interface ChannelData {
|
|
367
|
+
providerId: string;
|
|
368
|
+
accountId: string;
|
|
369
|
+
reference: string;
|
|
370
|
+
}
|
|
371
|
+
interface RecurrentPaymentTarget {
|
|
372
|
+
expectedPaymentCount: number;
|
|
373
|
+
expectedPaymentTotal: Amount$2;
|
|
374
|
+
}
|
|
375
|
+
interface RecurrentPaymentTarget {
|
|
376
|
+
expectedPaymentCount: number;
|
|
377
|
+
expectedPaymentTotal: Amount$2;
|
|
378
|
+
}
|
|
379
|
+
interface Customer {
|
|
380
|
+
name: string;
|
|
381
|
+
}
|
|
382
|
+
interface Customer {
|
|
383
|
+
name: string;
|
|
384
|
+
}
|
|
385
|
+
interface Amount$2 {
|
|
386
|
+
currency: string;
|
|
387
|
+
value: number;
|
|
388
|
+
}
|
|
389
|
+
interface Amount$2 {
|
|
390
|
+
currency: string;
|
|
391
|
+
value: number;
|
|
167
392
|
}
|
|
168
393
|
|
|
394
|
+
type DestinationOption = {
|
|
395
|
+
type: "momo";
|
|
396
|
+
providerId: "m17" | "m18";
|
|
397
|
+
phoneNumber: string;
|
|
398
|
+
} | {
|
|
399
|
+
type: "bank";
|
|
400
|
+
providerId: "b01" | "b02" | "b03";
|
|
401
|
+
accountNumber: string;
|
|
402
|
+
} | {
|
|
403
|
+
type: "wallet";
|
|
404
|
+
providerId: "w01" | "w02";
|
|
405
|
+
walletId: string;
|
|
406
|
+
};
|
|
169
407
|
interface CreatePayout {
|
|
170
408
|
success: boolean;
|
|
171
409
|
messages: string[];
|
|
172
|
-
result: Result;
|
|
410
|
+
result: Result$1;
|
|
173
411
|
}
|
|
174
|
-
interface
|
|
412
|
+
interface GetAll {
|
|
413
|
+
success: boolean;
|
|
414
|
+
messages: string[];
|
|
415
|
+
result: Result$1[];
|
|
416
|
+
pagination: Pagination$1;
|
|
417
|
+
}
|
|
418
|
+
interface Pagination$1 {
|
|
419
|
+
count: number;
|
|
420
|
+
next: string;
|
|
421
|
+
}
|
|
422
|
+
interface GetOnePayout {
|
|
423
|
+
success: boolean;
|
|
424
|
+
messages: string[];
|
|
425
|
+
result: Result$1;
|
|
426
|
+
}
|
|
427
|
+
interface Result$1 {
|
|
175
428
|
id: string;
|
|
176
429
|
status: string;
|
|
177
|
-
amount: Amount;
|
|
430
|
+
amount: Amount$1;
|
|
178
431
|
source: Source;
|
|
179
432
|
destination: Destination;
|
|
180
433
|
fees: Fee[];
|
|
181
434
|
failureDetail: FailureDetail;
|
|
182
435
|
createTime: string;
|
|
183
436
|
updateTime: string;
|
|
184
|
-
ownershipGraph: OwnershipGraph;
|
|
185
|
-
metadata: Metadata;
|
|
437
|
+
ownershipGraph: OwnershipGraph$1;
|
|
186
438
|
}
|
|
187
|
-
interface
|
|
188
|
-
|
|
439
|
+
interface Result$1 {
|
|
440
|
+
id: string;
|
|
441
|
+
status: string;
|
|
442
|
+
amount: Amount$1;
|
|
443
|
+
source: Source;
|
|
444
|
+
destination: Destination;
|
|
445
|
+
fees: Fee[];
|
|
446
|
+
failureDetail: FailureDetail;
|
|
447
|
+
createTime: string;
|
|
448
|
+
updateTime: string;
|
|
449
|
+
ownershipGraph: OwnershipGraph$1;
|
|
189
450
|
}
|
|
190
|
-
interface
|
|
451
|
+
interface Result$1 {
|
|
452
|
+
id: string;
|
|
453
|
+
status: string;
|
|
454
|
+
amount: Amount$1;
|
|
455
|
+
source: Source;
|
|
456
|
+
destination: Destination;
|
|
457
|
+
fees: Fee[];
|
|
458
|
+
failureDetail: FailureDetail;
|
|
459
|
+
createTime: string;
|
|
460
|
+
updateTime: string;
|
|
461
|
+
ownershipGraph: OwnershipGraph$1;
|
|
462
|
+
}
|
|
463
|
+
interface OwnershipGraph$1 {
|
|
464
|
+
owner: Owner2$1;
|
|
465
|
+
}
|
|
466
|
+
interface OwnershipGraph$1 {
|
|
467
|
+
owner: Owner2$1;
|
|
468
|
+
}
|
|
469
|
+
interface OwnershipGraph$1 {
|
|
470
|
+
owner: Owner2$1;
|
|
471
|
+
}
|
|
472
|
+
interface Owner2$1 {
|
|
191
473
|
id: string;
|
|
192
474
|
type: string;
|
|
193
|
-
|
|
194
|
-
owner: Owner;
|
|
475
|
+
owner: Owner$1;
|
|
195
476
|
}
|
|
196
|
-
interface
|
|
477
|
+
interface Owner2$1 {
|
|
478
|
+
id: string;
|
|
479
|
+
type: string;
|
|
480
|
+
owner: Owner$1;
|
|
481
|
+
}
|
|
482
|
+
interface Owner2$1 {
|
|
197
483
|
id: string;
|
|
198
484
|
type: string;
|
|
199
|
-
|
|
200
|
-
|
|
485
|
+
owner: Owner$1;
|
|
486
|
+
}
|
|
487
|
+
interface Owner$1 {
|
|
488
|
+
id: string;
|
|
489
|
+
type: string;
|
|
490
|
+
}
|
|
491
|
+
interface Owner$1 {
|
|
492
|
+
id: string;
|
|
493
|
+
type: string;
|
|
494
|
+
}
|
|
495
|
+
interface Owner$1 {
|
|
496
|
+
id: string;
|
|
497
|
+
type: string;
|
|
498
|
+
}
|
|
499
|
+
interface FailureDetail {
|
|
500
|
+
code: string;
|
|
501
|
+
message: string;
|
|
502
|
+
}
|
|
503
|
+
interface FailureDetail {
|
|
504
|
+
code: string;
|
|
505
|
+
message: string;
|
|
201
506
|
}
|
|
202
507
|
interface FailureDetail {
|
|
203
508
|
code: string;
|
|
@@ -205,10 +510,27 @@ interface FailureDetail {
|
|
|
205
510
|
}
|
|
206
511
|
interface Fee {
|
|
207
512
|
code: string;
|
|
208
|
-
amount: Amount;
|
|
209
|
-
|
|
513
|
+
amount: Amount$1;
|
|
514
|
+
}
|
|
515
|
+
interface Fee {
|
|
516
|
+
code: string;
|
|
517
|
+
amount: Amount$1;
|
|
518
|
+
}
|
|
519
|
+
interface Fee {
|
|
520
|
+
code: string;
|
|
521
|
+
amount: Amount$1;
|
|
210
522
|
}
|
|
211
|
-
interface
|
|
523
|
+
interface Destination {
|
|
524
|
+
type: string;
|
|
525
|
+
providerId: string;
|
|
526
|
+
accountNumber: string;
|
|
527
|
+
transactionReference: string;
|
|
528
|
+
}
|
|
529
|
+
interface Destination {
|
|
530
|
+
type: string;
|
|
531
|
+
providerId: string;
|
|
532
|
+
accountNumber: string;
|
|
533
|
+
transactionReference: string;
|
|
212
534
|
}
|
|
213
535
|
interface Destination {
|
|
214
536
|
type: string;
|
|
@@ -220,48 +542,234 @@ interface Source {
|
|
|
220
542
|
financialAccountId: string;
|
|
221
543
|
transactionReference: string;
|
|
222
544
|
}
|
|
223
|
-
interface
|
|
545
|
+
interface Source {
|
|
546
|
+
financialAccountId: string;
|
|
547
|
+
transactionReference: string;
|
|
548
|
+
}
|
|
549
|
+
interface Source {
|
|
550
|
+
financialAccountId: string;
|
|
551
|
+
transactionReference: string;
|
|
552
|
+
}
|
|
553
|
+
interface Amount$1 {
|
|
224
554
|
currency: string;
|
|
225
555
|
value: number;
|
|
226
556
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
accessToken: string;
|
|
557
|
+
interface Amount$1 {
|
|
558
|
+
currency: string;
|
|
559
|
+
value: number;
|
|
231
560
|
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
561
|
+
interface Amount$1 {
|
|
562
|
+
currency: string;
|
|
563
|
+
value: number;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
declare function FinancialAccountAPI(client: MonimeClient): {
|
|
567
|
+
create: (name: string) => Promise<{
|
|
236
568
|
success: boolean;
|
|
237
569
|
data?: CreateFinancialAccount;
|
|
238
570
|
error?: Error;
|
|
239
571
|
}>;
|
|
240
|
-
|
|
572
|
+
get: (financialAccountId: string) => Promise<{
|
|
241
573
|
success: boolean;
|
|
242
574
|
data?: GetFinancialAccount;
|
|
243
575
|
error?: Error;
|
|
244
576
|
}>;
|
|
245
|
-
|
|
577
|
+
getAll: () => Promise<{
|
|
578
|
+
success: boolean;
|
|
579
|
+
data?: AllFinancialAccount;
|
|
580
|
+
error?: Error;
|
|
581
|
+
}>;
|
|
582
|
+
};
|
|
583
|
+
|
|
584
|
+
interface GetTransaction {
|
|
585
|
+
success: boolean;
|
|
586
|
+
messages: string[];
|
|
587
|
+
result: Result;
|
|
588
|
+
}
|
|
589
|
+
interface AllTransaction {
|
|
590
|
+
success: boolean;
|
|
591
|
+
messages: string[];
|
|
592
|
+
result: Result[];
|
|
593
|
+
pagination: Pagination;
|
|
594
|
+
}
|
|
595
|
+
interface Pagination {
|
|
596
|
+
count: number;
|
|
597
|
+
next: string;
|
|
598
|
+
}
|
|
599
|
+
interface Result {
|
|
600
|
+
id: string;
|
|
601
|
+
type: string;
|
|
602
|
+
amount: Amount;
|
|
603
|
+
timestamp: string;
|
|
604
|
+
reference: string;
|
|
605
|
+
financialAccount: FinancialAccount;
|
|
606
|
+
originatingReversal: OriginatingReversal;
|
|
607
|
+
originatingFee: OriginatingFee;
|
|
608
|
+
ownershipGraph: OwnershipGraph;
|
|
609
|
+
}
|
|
610
|
+
interface Result {
|
|
611
|
+
id: string;
|
|
612
|
+
type: string;
|
|
613
|
+
amount: Amount;
|
|
614
|
+
timestamp: string;
|
|
615
|
+
reference: string;
|
|
616
|
+
financialAccount: FinancialAccount;
|
|
617
|
+
originatingReversal: OriginatingReversal;
|
|
618
|
+
originatingFee: OriginatingFee;
|
|
619
|
+
ownershipGraph: OwnershipGraph;
|
|
620
|
+
}
|
|
621
|
+
interface OwnershipGraph {
|
|
622
|
+
owner: Owner2;
|
|
623
|
+
}
|
|
624
|
+
interface OwnershipGraph {
|
|
625
|
+
owner: Owner2;
|
|
626
|
+
}
|
|
627
|
+
interface Owner2 {
|
|
628
|
+
id: string;
|
|
629
|
+
type: string;
|
|
630
|
+
owner: Owner;
|
|
631
|
+
}
|
|
632
|
+
interface Owner2 {
|
|
633
|
+
id: string;
|
|
634
|
+
type: string;
|
|
635
|
+
owner: Owner;
|
|
636
|
+
}
|
|
637
|
+
interface Owner {
|
|
638
|
+
id: string;
|
|
639
|
+
type: string;
|
|
640
|
+
}
|
|
641
|
+
interface Owner {
|
|
642
|
+
id: string;
|
|
643
|
+
type: string;
|
|
644
|
+
}
|
|
645
|
+
interface OriginatingFee {
|
|
646
|
+
code: string;
|
|
647
|
+
}
|
|
648
|
+
interface OriginatingFee {
|
|
649
|
+
code: string;
|
|
650
|
+
}
|
|
651
|
+
interface OriginatingReversal {
|
|
652
|
+
originTxnId: string;
|
|
653
|
+
originTxnRef: string;
|
|
654
|
+
}
|
|
655
|
+
interface OriginatingReversal {
|
|
656
|
+
originTxnId: string;
|
|
657
|
+
originTxnRef: string;
|
|
658
|
+
}
|
|
659
|
+
interface FinancialAccount {
|
|
660
|
+
id: string;
|
|
661
|
+
balance: Balance;
|
|
662
|
+
}
|
|
663
|
+
interface FinancialAccount {
|
|
664
|
+
id: string;
|
|
665
|
+
balance: Balance;
|
|
666
|
+
}
|
|
667
|
+
interface Balance {
|
|
668
|
+
after: Amount;
|
|
669
|
+
}
|
|
670
|
+
interface Balance {
|
|
671
|
+
after: Amount;
|
|
672
|
+
}
|
|
673
|
+
interface Amount {
|
|
674
|
+
currency: string;
|
|
675
|
+
value: number;
|
|
676
|
+
}
|
|
677
|
+
interface Amount {
|
|
678
|
+
currency: string;
|
|
679
|
+
value: number;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
declare function FinancialTransactionAPI(client: MonimeClient): {
|
|
683
|
+
get: (transactionId: string) => Promise<{
|
|
684
|
+
success: boolean;
|
|
685
|
+
error?: Error;
|
|
686
|
+
data?: GetTransaction;
|
|
687
|
+
}>;
|
|
688
|
+
getAll: () => Promise<{
|
|
689
|
+
success: boolean;
|
|
690
|
+
error?: Error;
|
|
691
|
+
data?: AllTransaction;
|
|
692
|
+
}>;
|
|
693
|
+
};
|
|
694
|
+
|
|
695
|
+
declare function InternalTransferAPI(client: MonimeClient): {
|
|
696
|
+
create: (sourceAccount: string, destinationAccount: string, amount: number) => Promise<{
|
|
246
697
|
success: boolean;
|
|
247
698
|
data?: CreateInternalTransfer;
|
|
248
699
|
error?: Error;
|
|
249
700
|
}>;
|
|
250
|
-
|
|
701
|
+
get: (internalTransferId: string) => Promise<{
|
|
251
702
|
success: boolean;
|
|
703
|
+
data?: InternalTransfer;
|
|
252
704
|
error?: Error;
|
|
253
|
-
data?: CreatePaymentCode;
|
|
254
705
|
}>;
|
|
255
|
-
|
|
706
|
+
getAll: () => Promise<{
|
|
707
|
+
success: boolean;
|
|
708
|
+
error?: Error;
|
|
709
|
+
data?: AllInternalTransfers;
|
|
710
|
+
}>;
|
|
711
|
+
delete: (internalTransferId: string) => Promise<{
|
|
256
712
|
success: boolean;
|
|
257
713
|
error?: Error;
|
|
714
|
+
}>;
|
|
715
|
+
};
|
|
716
|
+
|
|
717
|
+
declare function PaymentCodeAPI(client: MonimeClient): {
|
|
718
|
+
create: (paymentName: string, amount: number, financialAccount: string, username: string, phoneNumber: string) => Promise<{
|
|
719
|
+
success: boolean;
|
|
258
720
|
data?: CreatePaymentCode;
|
|
721
|
+
error?: Error;
|
|
722
|
+
}>;
|
|
723
|
+
delete: (paymentCodeId: string) => Promise<{
|
|
724
|
+
success: boolean;
|
|
725
|
+
error?: Error;
|
|
726
|
+
}>;
|
|
727
|
+
getAll: () => Promise<{
|
|
728
|
+
success: boolean;
|
|
729
|
+
data?: GetAllPaymentCode;
|
|
730
|
+
error?: Error;
|
|
259
731
|
}>;
|
|
260
|
-
|
|
732
|
+
get: (paymentCodeId: string) => Promise<{
|
|
261
733
|
success: boolean;
|
|
734
|
+
data?: GetOne;
|
|
262
735
|
error?: Error;
|
|
736
|
+
}>;
|
|
737
|
+
};
|
|
738
|
+
|
|
739
|
+
declare function PayoutAPI(client: MonimeClient): {
|
|
740
|
+
create: (amount: number, destination: DestinationOption, sourceAccount: string) => Promise<{
|
|
741
|
+
success: boolean;
|
|
263
742
|
data?: CreatePayout;
|
|
743
|
+
error?: Error;
|
|
744
|
+
}>;
|
|
745
|
+
get: () => Promise<{
|
|
746
|
+
success: boolean;
|
|
747
|
+
data?: GetAll;
|
|
748
|
+
error?: Error;
|
|
264
749
|
}>;
|
|
750
|
+
getOne: (payoutId: string) => Promise<{
|
|
751
|
+
success: boolean;
|
|
752
|
+
data?: GetOnePayout;
|
|
753
|
+
error?: Error;
|
|
754
|
+
}>;
|
|
755
|
+
delete: (payoutId: string) => Promise<{
|
|
756
|
+
success: boolean;
|
|
757
|
+
error?: Error;
|
|
758
|
+
}>;
|
|
759
|
+
};
|
|
760
|
+
|
|
761
|
+
interface ClientOptions {
|
|
762
|
+
monimeSpaceId: string;
|
|
763
|
+
accessToken: string;
|
|
764
|
+
}
|
|
765
|
+
declare class MonimeClient {
|
|
766
|
+
private monimeSpaceId;
|
|
767
|
+
private accessToken;
|
|
768
|
+
financialAccount: ReturnType<typeof FinancialAccountAPI>;
|
|
769
|
+
internalTransfer: ReturnType<typeof InternalTransferAPI>;
|
|
770
|
+
paymentCode: ReturnType<typeof PaymentCodeAPI>;
|
|
771
|
+
payout: ReturnType<typeof PayoutAPI>;
|
|
772
|
+
financialTransaction: ReturnType<typeof FinancialTransactionAPI>;
|
|
265
773
|
constructor(options: ClientOptions);
|
|
266
774
|
_getConfig(): {
|
|
267
775
|
monimeSpaceId: string;
|
|
@@ -271,4 +779,4 @@ declare class MonimeClient {
|
|
|
271
779
|
|
|
272
780
|
declare function createClient(options: ClientOptions): MonimeClient;
|
|
273
781
|
|
|
274
|
-
export { type ClientOptions, MonimeClient, createClient };
|
|
782
|
+
export { type AllFinancialAccount, type AllInternalTransfers, type ClientOptions, type CreateFinancialAccount, type CreateInternalTransfer, type CreatePaymentCode, type CreatePayout, type DestinationOption, type GetAll, type GetAllPaymentCode, type GetFinancialAccount, type GetOne, type GetOnePayout, type InternalTransfer, MonimeClient, createClient };
|