monime-package 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,45 +1,253 @@
1
+ interface AllCheckout {
2
+ success: boolean;
3
+ messages: string[];
4
+ result: Result$5[];
5
+ pagination: Pagination$5;
6
+ }
7
+ interface Pagination$5 {
8
+ count: number;
9
+ next: string;
10
+ }
11
+ interface OneCheckout {
12
+ success: boolean;
13
+ messages: string[];
14
+ result: Result$5;
15
+ }
16
+ interface CreateCheckout {
17
+ success: boolean;
18
+ messages: string[];
19
+ result: Result$5;
20
+ }
21
+ interface Result$5 {
22
+ id: string;
23
+ status: string;
24
+ name: string;
25
+ orderNumber: string;
26
+ reference: string;
27
+ description: string;
28
+ redirectUrl: string;
29
+ cancelUrl: string;
30
+ successUrl: string;
31
+ lineItems: LineItems;
32
+ financialAccountId: string;
33
+ brandingOptions: BrandingOptions;
34
+ expireTime: string;
35
+ createTime: string;
36
+ ownershipGraph: OwnershipGraph$4;
37
+ }
38
+ interface Result$5 {
39
+ id: string;
40
+ status: string;
41
+ name: string;
42
+ orderNumber: string;
43
+ reference: string;
44
+ description: string;
45
+ redirectUrl: string;
46
+ cancelUrl: string;
47
+ successUrl: string;
48
+ lineItems: LineItems;
49
+ financialAccountId: string;
50
+ brandingOptions: BrandingOptions;
51
+ expireTime: string;
52
+ createTime: string;
53
+ ownershipGraph: OwnershipGraph$4;
54
+ }
55
+ interface Result$5 {
56
+ id: string;
57
+ status: string;
58
+ name: string;
59
+ orderNumber: string;
60
+ reference: string;
61
+ description: string;
62
+ redirectUrl: string;
63
+ cancelUrl: string;
64
+ successUrl: string;
65
+ lineItems: LineItems;
66
+ financialAccountId: string;
67
+ brandingOptions: BrandingOptions;
68
+ expireTime: string;
69
+ createTime: string;
70
+ ownershipGraph: OwnershipGraph$4;
71
+ }
72
+ interface OwnershipGraph$4 {
73
+ owner: Owner2$4;
74
+ }
75
+ interface OwnershipGraph$4 {
76
+ owner: Owner2$4;
77
+ }
78
+ interface OwnershipGraph$4 {
79
+ owner: Owner2$4;
80
+ }
81
+ interface Owner2$4 {
82
+ id: string;
83
+ type: string;
84
+ owner: Owner$4;
85
+ }
86
+ interface Owner2$4 {
87
+ id: string;
88
+ type: string;
89
+ owner: Owner$4;
90
+ }
91
+ interface Owner2$4 {
92
+ id: string;
93
+ type: string;
94
+ owner: Owner$4;
95
+ }
96
+ interface Owner$4 {
97
+ id: string;
98
+ type: string;
99
+ }
100
+ interface Owner$4 {
101
+ id: string;
102
+ type: string;
103
+ }
104
+ interface Owner$4 {
105
+ id: string;
106
+ type: string;
107
+ }
108
+ interface BrandingOptions {
109
+ primaryColor: string;
110
+ }
111
+ interface BrandingOptions {
112
+ primaryColor: string;
113
+ }
114
+ interface BrandingOptions {
115
+ primaryColor: string;
116
+ }
117
+ interface LineItems {
118
+ data: Datum[];
119
+ }
120
+ interface LineItems {
121
+ data: Datum[];
122
+ }
123
+ interface LineItems {
124
+ data: Datum[];
125
+ }
126
+ interface Datum {
127
+ type: string;
128
+ id: string;
129
+ name: string;
130
+ price: Price;
131
+ quantity: number;
132
+ reference: string;
133
+ description: string;
134
+ images: string[];
135
+ }
136
+ interface Datum {
137
+ type: string;
138
+ id: string;
139
+ name: string;
140
+ price: Price;
141
+ quantity: number;
142
+ reference: string;
143
+ description: string;
144
+ images: string[];
145
+ }
146
+ interface Datum {
147
+ type: string;
148
+ id: string;
149
+ name: string;
150
+ price: Price;
151
+ quantity: number;
152
+ reference: string;
153
+ description: string;
154
+ images: string[];
155
+ }
156
+ interface Price {
157
+ currency: string;
158
+ value: number;
159
+ }
160
+ interface Price {
161
+ currency: string;
162
+ value: number;
163
+ }
164
+ interface Price {
165
+ currency: string;
166
+ value: number;
167
+ }
168
+
169
+ declare function CheckoutSessionAPI(client: MonimeClient): {
170
+ create: (name: string, amount: number, quantity: number, successUrl: string, cancelUrl: string, description?: string, financialAccountId?: string, primaryColor?: string, images?: string[]) => Promise<{
171
+ success: boolean;
172
+ error?: Error;
173
+ data: CreateCheckout;
174
+ }>;
175
+ get: () => Promise<{
176
+ success: boolean;
177
+ error?: Error;
178
+ data: AllCheckout;
179
+ }>;
180
+ getOne: (checkoutId: string) => Promise<{
181
+ success: boolean;
182
+ error?: Error;
183
+ data: OneCheckout;
184
+ }>;
185
+ delete: (checkoutId: string) => Promise<{
186
+ success: boolean;
187
+ error?: Error;
188
+ }>;
189
+ };
190
+
1
191
  interface CreateFinancialAccount {
2
192
  success: boolean;
3
193
  messages: string[];
4
- result: Result$3;
194
+ result: Result$4;
5
195
  }
6
196
  interface GetFinancialAccount {
7
197
  success: boolean;
8
198
  messages: string[];
9
- result: Result$3;
199
+ result: Result$4;
10
200
  }
11
- interface Result$3 {
201
+ interface AllFinancialAccount {
202
+ success: boolean;
203
+ messages: string[];
204
+ result: Result$4[];
205
+ pagination: Pagination$4;
206
+ }
207
+ interface Pagination$4 {
208
+ count: number;
209
+ next: string;
210
+ }
211
+ interface Result$4 {
12
212
  id: string;
13
213
  uvan: string;
14
214
  name: string;
15
215
  currency: string;
16
216
  reference: string;
17
217
  description: string;
18
- balance: Balance;
218
+ balance: Balance$1;
19
219
  createTime: string;
20
220
  updateTime: string;
21
- metadata: Metadata$2;
22
221
  }
23
- interface Result$3 {
222
+ interface Result$4 {
24
223
  id: string;
25
224
  uvan: string;
26
225
  name: string;
27
226
  currency: string;
28
227
  reference: string;
29
228
  description: string;
30
- balance: Balance;
229
+ balance: Balance$1;
31
230
  createTime: string;
32
231
  updateTime: string;
33
- metadata: Metadata$2;
34
232
  }
35
- interface Metadata$2 {
233
+ interface Result$4 {
234
+ id: string;
235
+ uvan: string;
236
+ name: string;
237
+ currency: string;
238
+ reference: string;
239
+ description: string;
240
+ balance: Balance$1;
241
+ createTime: string;
242
+ updateTime: string;
36
243
  }
37
- interface Metadata$2 {
244
+ interface Balance$1 {
245
+ available: Available;
38
246
  }
39
- interface Balance {
247
+ interface Balance$1 {
40
248
  available: Available;
41
249
  }
42
- interface Balance {
250
+ interface Balance$1 {
43
251
  available: Available;
44
252
  }
45
253
  interface Available {
@@ -50,42 +258,113 @@ interface Available {
50
258
  currency: string;
51
259
  value: number;
52
260
  }
261
+ interface Available {
262
+ currency: string;
263
+ value: number;
264
+ }
53
265
 
54
266
  interface CreateInternalTransfer {
55
267
  success: boolean;
56
268
  messages: string[];
57
- result: Result$2;
269
+ result: Result$3;
58
270
  }
59
- interface Result$2 {
271
+ interface AllInternalTransfers {
272
+ success: boolean;
273
+ messages: string[];
274
+ result: Result$3[];
275
+ pagination: Pagination$3;
276
+ }
277
+ interface Pagination$3 {
278
+ count: number;
279
+ next: string;
280
+ }
281
+ interface InternalTransfer {
282
+ success: boolean;
283
+ messages: string[];
284
+ result: Result$3;
285
+ }
286
+ interface Result$3 {
60
287
  id: string;
61
288
  status: string;
62
- amount: Amount$1;
289
+ amount: Amount$3;
63
290
  sourceFinancialAccount: SourceFinancialAccount;
64
291
  destinationFinancialAccount: SourceFinancialAccount;
65
292
  financialTransactionReference: string;
66
293
  description: string;
67
294
  failureDetail: FailureDetail$1;
68
- ownershipGraph: OwnershipGraph$2;
295
+ ownershipGraph: OwnershipGraph$3;
69
296
  createTime: string;
70
297
  updateTime: string;
71
- metadata: Metadata$1;
72
298
  }
73
- interface OwnershipGraph$2 {
74
- owner: Owner2$1;
299
+ interface Result$3 {
300
+ id: string;
301
+ status: string;
302
+ amount: Amount$3;
303
+ sourceFinancialAccount: SourceFinancialAccount;
304
+ destinationFinancialAccount: SourceFinancialAccount;
305
+ financialTransactionReference: string;
306
+ description: string;
307
+ failureDetail: FailureDetail$1;
308
+ ownershipGraph: OwnershipGraph$3;
309
+ createTime: string;
310
+ updateTime: string;
75
311
  }
76
- interface Owner2$1 {
312
+ interface Result$3 {
313
+ id: string;
314
+ status: string;
315
+ amount: Amount$3;
316
+ sourceFinancialAccount: SourceFinancialAccount;
317
+ destinationFinancialAccount: SourceFinancialAccount;
318
+ financialTransactionReference: string;
319
+ description: string;
320
+ failureDetail: FailureDetail$1;
321
+ ownershipGraph: OwnershipGraph$3;
322
+ createTime: string;
323
+ updateTime: string;
324
+ }
325
+ interface OwnershipGraph$3 {
326
+ owner: Owner2$3;
327
+ }
328
+ interface OwnershipGraph$3 {
329
+ owner: Owner2$3;
330
+ }
331
+ interface OwnershipGraph$3 {
332
+ owner: Owner2$3;
333
+ }
334
+ interface Owner2$3 {
77
335
  id: string;
78
336
  type: string;
79
- metadata: Metadata$1;
80
- owner: Owner$1;
337
+ owner: Owner$3;
81
338
  }
82
- interface Owner$1 {
339
+ interface Owner2$3 {
83
340
  id: string;
84
341
  type: string;
85
- metadata: Metadata$1;
86
- owner: Metadata$1;
342
+ owner: Owner$3;
343
+ }
344
+ interface Owner2$3 {
345
+ id: string;
346
+ type: string;
347
+ owner: Owner$3;
348
+ }
349
+ interface Owner$3 {
350
+ id: string;
351
+ type: string;
352
+ }
353
+ interface Owner$3 {
354
+ id: string;
355
+ type: string;
356
+ }
357
+ interface Owner$3 {
358
+ id: string;
359
+ type: string;
360
+ }
361
+ interface FailureDetail$1 {
362
+ code: string;
363
+ message: string;
87
364
  }
88
- interface Metadata$1 {
365
+ interface FailureDetail$1 {
366
+ code: string;
367
+ message: string;
89
368
  }
90
369
  interface FailureDetail$1 {
91
370
  code: string;
@@ -94,7 +373,21 @@ interface FailureDetail$1 {
94
373
  interface SourceFinancialAccount {
95
374
  id: string;
96
375
  }
97
- interface Amount$1 {
376
+ interface SourceFinancialAccount {
377
+ id: string;
378
+ }
379
+ interface SourceFinancialAccount {
380
+ id: string;
381
+ }
382
+ interface Amount$3 {
383
+ currency: string;
384
+ value: number;
385
+ }
386
+ interface Amount$3 {
387
+ currency: string;
388
+ value: number;
389
+ }
390
+ interface Amount$3 {
98
391
  currency: string;
99
392
  value: number;
100
393
  }
@@ -102,9 +395,24 @@ interface Amount$1 {
102
395
  interface CreatePaymentCode {
103
396
  success: boolean;
104
397
  messages: string[];
105
- result: Result$1;
398
+ result: Result$2;
106
399
  }
107
- interface Result$1 {
400
+ interface GetAllPaymentCode {
401
+ success: boolean;
402
+ messages: string[];
403
+ result: Result$2[];
404
+ pagination: Pagination$2;
405
+ }
406
+ interface Pagination$2 {
407
+ count: number;
408
+ next: string;
409
+ }
410
+ interface GetOne {
411
+ success: boolean;
412
+ messages: string[];
413
+ result: Result$2;
414
+ }
415
+ interface Result$2 {
108
416
  id: string;
109
417
  mode: string;
110
418
  status: string;
@@ -133,75 +441,258 @@ interface Result$1 {
133
441
  processedPaymentData: ProcessedPaymentData;
134
442
  createTime: string;
135
443
  updateTime: string;
136
- ownershipGraph: OwnershipGraph$1;
137
- metadata: {};
444
+ ownershipGraph: OwnershipGraph$2;
138
445
  }
139
- interface OwnershipGraph$1 {
140
- owner: {
141
- id: string;
142
- type: string;
143
- metadata: {};
144
- owner: {
145
- id: string;
146
- type: string;
147
- metadata: {};
148
- owner: {};
149
- };
150
- };
446
+ interface Result$2 {
447
+ id: string;
448
+ mode: string;
449
+ status: string;
450
+ name: string;
451
+ amount: Amount$2;
452
+ enable: boolean;
453
+ expireTime: string;
454
+ customer: Customer;
455
+ ussdCode: string;
456
+ reference: string;
457
+ authorizedProviders: string[];
458
+ authorizedPhoneNumber: string;
459
+ recurrentPaymentTarget: RecurrentPaymentTarget;
460
+ financialAccountId: string;
461
+ processedPaymentData: ProcessedPaymentData;
462
+ createTime: string;
463
+ updateTime: string;
464
+ ownershipGraph: OwnershipGraph$2;
151
465
  }
152
- interface ProcessedPaymentData {
153
- amount: {
154
- currency: string;
155
- value: number;
156
- };
157
- orderId: string;
158
- paymentId: string;
159
- orderNumber: string;
160
- channelData: {
466
+ interface Result$2 {
467
+ id: string;
468
+ mode: string;
469
+ status: string;
470
+ name: string;
471
+ amount: Amount$2;
472
+ enable: boolean;
473
+ expireTime: string;
474
+ customer: Customer;
475
+ ussdCode: string;
476
+ reference: string;
477
+ authorizedProviders: string[];
478
+ authorizedPhoneNumber: string;
479
+ recurrentPaymentTarget: RecurrentPaymentTarget;
480
+ financialAccountId: string;
481
+ processedPaymentData: ProcessedPaymentData;
482
+ createTime: string;
483
+ updateTime: string;
484
+ ownershipGraph: OwnershipGraph$2;
485
+ }
486
+ interface OwnershipGraph$2 {
487
+ owner: {
488
+ id: string;
489
+ type: string;
490
+ owner: {
491
+ id: string;
492
+ type: string;
493
+ };
494
+ };
495
+ }
496
+ interface OwnershipGraph$2 {
497
+ owner: Owner2$2;
498
+ }
499
+ interface OwnershipGraph$2 {
500
+ owner: Owner2$2;
501
+ }
502
+ interface Owner2$2 {
503
+ id: string;
504
+ type: string;
505
+ owner: Owner$2;
506
+ }
507
+ interface Owner2$2 {
508
+ id: string;
509
+ type: string;
510
+ owner: Owner$2;
511
+ }
512
+ interface Owner$2 {
513
+ id: string;
514
+ type: string;
515
+ }
516
+ interface Owner$2 {
517
+ id: string;
518
+ type: string;
519
+ }
520
+ interface ProcessedPaymentData {
521
+ amount: {
522
+ currency: string;
523
+ value: number;
524
+ };
525
+ orderId: string;
526
+ paymentId: string;
527
+ orderNumber: string;
528
+ channelData: {
161
529
  providerId: string;
162
530
  accountId: string;
163
531
  reference: string;
164
532
  };
165
533
  financialTransactionReference: string;
166
- metadata: {};
167
534
  }
168
- interface DeletePaymentCode {
169
- success: boolean;
170
- messages: [any];
535
+ interface ProcessedPaymentData {
536
+ amount: Amount$2;
537
+ orderId: string;
538
+ paymentId: string;
539
+ orderNumber: string;
540
+ channelData: ChannelData;
541
+ financialTransactionReference: string;
542
+ }
543
+ interface ProcessedPaymentData {
544
+ amount: Amount$2;
545
+ orderId: string;
546
+ paymentId: string;
547
+ orderNumber: string;
548
+ channelData: ChannelData;
549
+ financialTransactionReference: string;
550
+ }
551
+ interface ChannelData {
552
+ providerId: string;
553
+ accountId: string;
554
+ reference: string;
555
+ }
556
+ interface ChannelData {
557
+ providerId: string;
558
+ accountId: string;
559
+ reference: string;
560
+ }
561
+ interface RecurrentPaymentTarget {
562
+ expectedPaymentCount: number;
563
+ expectedPaymentTotal: Amount$2;
564
+ }
565
+ interface RecurrentPaymentTarget {
566
+ expectedPaymentCount: number;
567
+ expectedPaymentTotal: Amount$2;
568
+ }
569
+ interface Customer {
570
+ name: string;
571
+ }
572
+ interface Customer {
573
+ name: string;
574
+ }
575
+ interface Amount$2 {
576
+ currency: string;
577
+ value: number;
578
+ }
579
+ interface Amount$2 {
580
+ currency: string;
581
+ value: number;
171
582
  }
172
583
 
584
+ type DestinationOption = {
585
+ type: "momo";
586
+ providerId: "m17" | "m18";
587
+ phoneNumber: string;
588
+ } | {
589
+ type: "bank";
590
+ providerId: "b01" | "b02" | "b03";
591
+ accountNumber: string;
592
+ } | {
593
+ type: "wallet";
594
+ providerId: "w01" | "w02";
595
+ walletId: string;
596
+ };
173
597
  interface CreatePayout {
174
598
  success: boolean;
175
599
  messages: string[];
176
- result: Result;
600
+ result: Result$1;
177
601
  }
178
- interface Result {
602
+ interface GetAll {
603
+ success: boolean;
604
+ messages: string[];
605
+ result: Result$1[];
606
+ pagination: Pagination$1;
607
+ }
608
+ interface Pagination$1 {
609
+ count: number;
610
+ next: string;
611
+ }
612
+ interface GetOnePayout {
613
+ success: boolean;
614
+ messages: string[];
615
+ result: Result$1;
616
+ }
617
+ interface Result$1 {
179
618
  id: string;
180
619
  status: string;
181
- amount: Amount;
620
+ amount: Amount$1;
182
621
  source: Source;
183
622
  destination: Destination;
184
623
  fees: Fee[];
185
624
  failureDetail: FailureDetail;
186
625
  createTime: string;
187
626
  updateTime: string;
188
- ownershipGraph: OwnershipGraph;
189
- metadata: Metadata;
627
+ ownershipGraph: OwnershipGraph$1;
190
628
  }
191
- interface OwnershipGraph {
192
- owner: Owner2;
629
+ interface Result$1 {
630
+ id: string;
631
+ status: string;
632
+ amount: Amount$1;
633
+ source: Source;
634
+ destination: Destination;
635
+ fees: Fee[];
636
+ failureDetail: FailureDetail;
637
+ createTime: string;
638
+ updateTime: string;
639
+ ownershipGraph: OwnershipGraph$1;
193
640
  }
194
- interface Owner2 {
641
+ interface Result$1 {
642
+ id: string;
643
+ status: string;
644
+ amount: Amount$1;
645
+ source: Source;
646
+ destination: Destination;
647
+ fees: Fee[];
648
+ failureDetail: FailureDetail;
649
+ createTime: string;
650
+ updateTime: string;
651
+ ownershipGraph: OwnershipGraph$1;
652
+ }
653
+ interface OwnershipGraph$1 {
654
+ owner: Owner2$1;
655
+ }
656
+ interface OwnershipGraph$1 {
657
+ owner: Owner2$1;
658
+ }
659
+ interface OwnershipGraph$1 {
660
+ owner: Owner2$1;
661
+ }
662
+ interface Owner2$1 {
195
663
  id: string;
196
664
  type: string;
197
- metadata: Metadata;
198
- owner: Owner;
665
+ owner: Owner$1;
199
666
  }
200
- interface Owner {
667
+ interface Owner2$1 {
668
+ id: string;
669
+ type: string;
670
+ owner: Owner$1;
671
+ }
672
+ interface Owner2$1 {
673
+ id: string;
674
+ type: string;
675
+ owner: Owner$1;
676
+ }
677
+ interface Owner$1 {
678
+ id: string;
679
+ type: string;
680
+ }
681
+ interface Owner$1 {
201
682
  id: string;
202
683
  type: string;
203
- metadata: Metadata;
204
- owner: Metadata;
684
+ }
685
+ interface Owner$1 {
686
+ id: string;
687
+ type: string;
688
+ }
689
+ interface FailureDetail {
690
+ code: string;
691
+ message: string;
692
+ }
693
+ interface FailureDetail {
694
+ code: string;
695
+ message: string;
205
696
  }
206
697
  interface FailureDetail {
207
698
  code: string;
@@ -209,10 +700,27 @@ interface FailureDetail {
209
700
  }
210
701
  interface Fee {
211
702
  code: string;
212
- amount: Amount;
213
- metadata: Metadata;
703
+ amount: Amount$1;
214
704
  }
215
- interface Metadata {
705
+ interface Fee {
706
+ code: string;
707
+ amount: Amount$1;
708
+ }
709
+ interface Fee {
710
+ code: string;
711
+ amount: Amount$1;
712
+ }
713
+ interface Destination {
714
+ type: string;
715
+ providerId: string;
716
+ accountNumber: string;
717
+ transactionReference: string;
718
+ }
719
+ interface Destination {
720
+ type: string;
721
+ providerId: string;
722
+ accountNumber: string;
723
+ transactionReference: string;
216
724
  }
217
725
  interface Destination {
218
726
  type: string;
@@ -224,48 +732,235 @@ interface Source {
224
732
  financialAccountId: string;
225
733
  transactionReference: string;
226
734
  }
227
- interface Amount {
735
+ interface Source {
736
+ financialAccountId: string;
737
+ transactionReference: string;
738
+ }
739
+ interface Source {
740
+ financialAccountId: string;
741
+ transactionReference: string;
742
+ }
743
+ interface Amount$1 {
228
744
  currency: string;
229
745
  value: number;
230
746
  }
231
-
232
- interface ClientOptions {
233
- monimeSpaceeId: string;
234
- accessToken: string;
747
+ interface Amount$1 {
748
+ currency: string;
749
+ value: number;
235
750
  }
236
- declare class MonimeClient {
237
- private monimeSpaceId;
238
- private accessToken;
239
- createFinancialAccount: (name: string) => Promise<{
751
+ interface Amount$1 {
752
+ currency: string;
753
+ value: number;
754
+ }
755
+
756
+ declare function FinancialAccountAPI(client: MonimeClient): {
757
+ create: (name: string) => Promise<{
240
758
  success: boolean;
241
759
  data?: CreateFinancialAccount;
242
760
  error?: Error;
243
761
  }>;
244
- getFinancialAccount: (financialAccountId: string) => Promise<{
762
+ get: (financialAccountId: string) => Promise<{
245
763
  success: boolean;
246
764
  data?: GetFinancialAccount;
247
765
  error?: Error;
248
766
  }>;
249
- createInternalTransfer: (sourceAccount: string, destinationAccount: string, amount: number) => Promise<{
767
+ getAll: () => Promise<{
768
+ success: boolean;
769
+ data?: AllFinancialAccount;
770
+ error?: Error;
771
+ }>;
772
+ };
773
+
774
+ interface GetTransaction {
775
+ success: boolean;
776
+ messages: string[];
777
+ result: Result;
778
+ }
779
+ interface AllTransaction {
780
+ success: boolean;
781
+ messages: string[];
782
+ result: Result[];
783
+ pagination: Pagination;
784
+ }
785
+ interface Pagination {
786
+ count: number;
787
+ next: string;
788
+ }
789
+ interface Result {
790
+ id: string;
791
+ type: string;
792
+ amount: Amount;
793
+ timestamp: string;
794
+ reference: string;
795
+ financialAccount: FinancialAccount;
796
+ originatingReversal: OriginatingReversal;
797
+ originatingFee: OriginatingFee;
798
+ ownershipGraph: OwnershipGraph;
799
+ }
800
+ interface Result {
801
+ id: string;
802
+ type: string;
803
+ amount: Amount;
804
+ timestamp: string;
805
+ reference: string;
806
+ financialAccount: FinancialAccount;
807
+ originatingReversal: OriginatingReversal;
808
+ originatingFee: OriginatingFee;
809
+ ownershipGraph: OwnershipGraph;
810
+ }
811
+ interface OwnershipGraph {
812
+ owner: Owner2;
813
+ }
814
+ interface OwnershipGraph {
815
+ owner: Owner2;
816
+ }
817
+ interface Owner2 {
818
+ id: string;
819
+ type: string;
820
+ owner: Owner;
821
+ }
822
+ interface Owner2 {
823
+ id: string;
824
+ type: string;
825
+ owner: Owner;
826
+ }
827
+ interface Owner {
828
+ id: string;
829
+ type: string;
830
+ }
831
+ interface Owner {
832
+ id: string;
833
+ type: string;
834
+ }
835
+ interface OriginatingFee {
836
+ code: string;
837
+ }
838
+ interface OriginatingFee {
839
+ code: string;
840
+ }
841
+ interface OriginatingReversal {
842
+ originTxnId: string;
843
+ originTxnRef: string;
844
+ }
845
+ interface OriginatingReversal {
846
+ originTxnId: string;
847
+ originTxnRef: string;
848
+ }
849
+ interface FinancialAccount {
850
+ id: string;
851
+ balance: Balance;
852
+ }
853
+ interface FinancialAccount {
854
+ id: string;
855
+ balance: Balance;
856
+ }
857
+ interface Balance {
858
+ after: Amount;
859
+ }
860
+ interface Balance {
861
+ after: Amount;
862
+ }
863
+ interface Amount {
864
+ currency: string;
865
+ value: number;
866
+ }
867
+ interface Amount {
868
+ currency: string;
869
+ value: number;
870
+ }
871
+
872
+ declare function FinancialTransactionAPI(client: MonimeClient): {
873
+ get: (transactionId: string) => Promise<{
874
+ success: boolean;
875
+ error?: Error;
876
+ data?: GetTransaction;
877
+ }>;
878
+ getAll: () => Promise<{
879
+ success: boolean;
880
+ error?: Error;
881
+ data?: AllTransaction;
882
+ }>;
883
+ };
884
+
885
+ declare function InternalTransferAPI(client: MonimeClient): {
886
+ create: (sourceAccount: string, destinationAccount: string, amount: number) => Promise<{
250
887
  success: boolean;
251
888
  data?: CreateInternalTransfer;
252
889
  error?: Error;
253
890
  }>;
254
- createPaymentCode: (paymentName: string, amount: number, financialAccount: string, username: string, phoneNumber: string) => Promise<{
891
+ get: (internalTransferId: string) => Promise<{
255
892
  success: boolean;
893
+ data?: InternalTransfer;
256
894
  error?: Error;
257
- data?: CreatePaymentCode;
258
895
  }>;
259
- deletePaymentCode: (paymentCodeId: string) => Promise<{
896
+ getAll: () => Promise<{
897
+ success: boolean;
898
+ error?: Error;
899
+ data?: AllInternalTransfers;
900
+ }>;
901
+ delete: (internalTransferId: string) => Promise<{
260
902
  success: boolean;
261
903
  error?: Error;
904
+ }>;
905
+ };
906
+
907
+ declare function PaymentCodeAPI(client: MonimeClient): {
908
+ create: (paymentName: string, amount: number, financialAccount: string, username: string, phoneNumber: string) => Promise<{
909
+ success: boolean;
262
910
  data?: CreatePaymentCode;
911
+ error?: Error;
912
+ }>;
913
+ delete: (paymentCodeId: string) => Promise<{
914
+ success: boolean;
915
+ error?: Error;
916
+ }>;
917
+ getAll: () => Promise<{
918
+ success: boolean;
919
+ data?: GetAllPaymentCode;
920
+ error?: Error;
263
921
  }>;
264
- createPayout: (amount: number, phoneNumber: string, sourceAccount: string) => Promise<{
922
+ get: (paymentCodeId: string) => Promise<{
265
923
  success: boolean;
924
+ data?: GetOne;
266
925
  error?: Error;
926
+ }>;
927
+ };
928
+
929
+ declare function PayoutAPI(client: MonimeClient): {
930
+ create: (amount: number, destination: DestinationOption, sourceAccount: string) => Promise<{
931
+ success: boolean;
267
932
  data?: CreatePayout;
933
+ error?: Error;
934
+ }>;
935
+ get: () => Promise<{
936
+ success: boolean;
937
+ data?: GetAll;
938
+ error?: Error;
939
+ }>;
940
+ getOne: (payoutId: string) => Promise<{
941
+ success: boolean;
942
+ data?: GetOnePayout;
943
+ error?: Error;
268
944
  }>;
945
+ delete: (payoutId: string) => Promise<{
946
+ success: boolean;
947
+ error?: Error;
948
+ }>;
949
+ };
950
+
951
+ interface ClientOptions {
952
+ monimeSpaceId: string;
953
+ accessToken: string;
954
+ }
955
+ declare class MonimeClient {
956
+ private monimeSpaceId;
957
+ private accessToken;
958
+ financialAccount: ReturnType<typeof FinancialAccountAPI>;
959
+ internalTransfer: ReturnType<typeof InternalTransferAPI>;
960
+ paymentCode: ReturnType<typeof PaymentCodeAPI>;
961
+ payout: ReturnType<typeof PayoutAPI>;
962
+ financialTransaction: ReturnType<typeof FinancialTransactionAPI>;
963
+ checkoutSession: ReturnType<typeof CheckoutSessionAPI>;
269
964
  constructor(options: ClientOptions);
270
965
  _getConfig(): {
271
966
  monimeSpaceId: string;
@@ -275,4 +970,4 @@ declare class MonimeClient {
275
970
 
276
971
  declare function createClient(options: ClientOptions): MonimeClient;
277
972
 
278
- export { type ClientOptions, type CreateFinancialAccount, type CreateInternalTransfer, type CreatePaymentCode, type CreatePayout, type DeletePaymentCode, type GetFinancialAccount, MonimeClient, createClient };
973
+ 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 };