squarefi-bff-api-module 1.5.16 → 1.6.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 +155 -0
- package/README.md +75 -10
- package/dist/api/counterparties.d.ts +13 -0
- package/dist/api/counterparties.js +47 -0
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.js +3 -0
- package/dist/api/location.d.ts +6 -0
- package/dist/api/location.js +9 -0
- package/dist/api/types.d.ts +383 -181
- package/dist/constants.d.ts +12 -0
- package/dist/constants.js +15 -1
- package/package.json +1 -1
- package/src/api/counterparties.ts +50 -0
- package/src/api/index.ts +5 -0
- package/src/api/location.ts +8 -0
- package/src/api/types.ts +441 -194
- package/src/constants.ts +14 -0
package/dist/api/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { APIKeyRole, CardFormFactor, CardTransactionType, CardType, CurrencyType, KYCStatuses, OrderStatuses, OrderType, SortingDirection, SubAccountType, WalletTransactionMethod, WalletTransactionRecordType, WalletTransactionType } from '../constants';
|
|
1
|
+
import { APIKeyRole, CardFormFactor, CardTransactionType, CardType, CounterpartyDestinationType, CounterpartyType, CurrencyType, KYCStatuses, OrderStatuses, OrderType, SortingDirection, SubAccountType, WalletTransactionMethod, WalletTransactionRecordType, WalletTransactionType } from '../constants';
|
|
2
2
|
import { WalletType } from '../';
|
|
3
3
|
export declare namespace API {
|
|
4
4
|
namespace Auth {
|
|
@@ -317,6 +317,18 @@ export declare namespace API {
|
|
|
317
317
|
type FiatAccountResponse = IssuingCardDetailItem;
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
|
+
namespace Chains {
|
|
321
|
+
interface Chain {
|
|
322
|
+
id: number;
|
|
323
|
+
name: string;
|
|
324
|
+
symbol: string;
|
|
325
|
+
is_beta: boolean | null;
|
|
326
|
+
}
|
|
327
|
+
type ChainList = {
|
|
328
|
+
count: number;
|
|
329
|
+
data: Chain[];
|
|
330
|
+
};
|
|
331
|
+
}
|
|
320
332
|
namespace Common {
|
|
321
333
|
namespace Pagination {
|
|
322
334
|
interface Request {
|
|
@@ -336,6 +348,213 @@ export declare namespace API {
|
|
|
336
348
|
}
|
|
337
349
|
}
|
|
338
350
|
}
|
|
351
|
+
namespace Counterparties {
|
|
352
|
+
interface Counterparty {
|
|
353
|
+
id: string;
|
|
354
|
+
email: string;
|
|
355
|
+
phone: string;
|
|
356
|
+
name: string;
|
|
357
|
+
nickname: string;
|
|
358
|
+
type: CounterpartyType | string;
|
|
359
|
+
created_at: string;
|
|
360
|
+
}
|
|
361
|
+
namespace Destination {
|
|
362
|
+
namespace List {
|
|
363
|
+
interface DestinationListItemCommonFields {
|
|
364
|
+
id: string;
|
|
365
|
+
nickname: string;
|
|
366
|
+
type: CounterpartyDestinationType | string;
|
|
367
|
+
created_at: string;
|
|
368
|
+
}
|
|
369
|
+
interface DestinationListItemExternalBankingData {
|
|
370
|
+
account_number: string;
|
|
371
|
+
routing_number: string;
|
|
372
|
+
bank_name: string;
|
|
373
|
+
note: string;
|
|
374
|
+
swift_bic: string;
|
|
375
|
+
address?: {
|
|
376
|
+
city?: string;
|
|
377
|
+
country_id?: number;
|
|
378
|
+
postcode?: string;
|
|
379
|
+
street1?: string;
|
|
380
|
+
street2?: string;
|
|
381
|
+
memo?: string;
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
interface DestinationListItemExternalCryptoData {
|
|
385
|
+
address: string;
|
|
386
|
+
currency_id: string;
|
|
387
|
+
}
|
|
388
|
+
interface DestinationListItemWithExternalBankingData extends DestinationListItemCommonFields {
|
|
389
|
+
type: CounterpartyDestinationType.DOMESTIC_WIRE | CounterpartyDestinationType.ACH | CounterpartyDestinationType.SWIFT | CounterpartyDestinationType.SEPA;
|
|
390
|
+
external_banking_data: DestinationListItemExternalBankingData;
|
|
391
|
+
external_crypto_data?: never;
|
|
392
|
+
}
|
|
393
|
+
interface DestinationListItemWithExternalCryptoData extends DestinationListItemCommonFields {
|
|
394
|
+
type: CounterpartyDestinationType.CRYPTO_EXTERNAL | CounterpartyDestinationType.CRYPTO_INTERNAL;
|
|
395
|
+
external_banking_data?: never;
|
|
396
|
+
external_crypto_data: DestinationListItemExternalCryptoData;
|
|
397
|
+
}
|
|
398
|
+
type CounterpartyDestinationListItem = DestinationListItemWithExternalBankingData | DestinationListItemWithExternalCryptoData;
|
|
399
|
+
interface Request {
|
|
400
|
+
wallet_id: string;
|
|
401
|
+
counterparty_account_id: string;
|
|
402
|
+
limit?: number;
|
|
403
|
+
offset?: number;
|
|
404
|
+
search?: string;
|
|
405
|
+
type?: CounterpartyDestinationType | string;
|
|
406
|
+
sort_by?: 'created_at' | 'nickname' | 'type';
|
|
407
|
+
sort_order?: SortingDirection;
|
|
408
|
+
filter?: {
|
|
409
|
+
type?: CounterpartyDestinationType;
|
|
410
|
+
nickname?: string;
|
|
411
|
+
created_at?: string;
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
type Response = {
|
|
415
|
+
total: number;
|
|
416
|
+
data: CounterpartyDestinationListItem[];
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
namespace Detail {
|
|
420
|
+
type DestinationDetailItemCommonFields = API.Counterparties.Destination.List.DestinationListItemCommonFields;
|
|
421
|
+
interface DestinationDetailItemExternalBankingData extends API.Counterparties.Destination.List.DestinationListItemExternalBankingData {
|
|
422
|
+
address: API.Counterparties.Destination.List.DestinationListItemExternalBankingData['address'] & {
|
|
423
|
+
country?: API.Location.Countries.Country;
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
interface DestinationDetailItemExternalCryptoData extends API.Counterparties.Destination.List.DestinationListItemExternalCryptoData {
|
|
427
|
+
currency: API.Currencies.Currency;
|
|
428
|
+
}
|
|
429
|
+
interface DestinationDetailItemWithExternalBankingData extends DestinationDetailItemCommonFields {
|
|
430
|
+
type: CounterpartyDestinationType.DOMESTIC_WIRE | CounterpartyDestinationType.ACH | CounterpartyDestinationType.SWIFT | CounterpartyDestinationType.SEPA;
|
|
431
|
+
external_banking_data: DestinationDetailItemExternalBankingData;
|
|
432
|
+
external_crypto_data?: never;
|
|
433
|
+
}
|
|
434
|
+
interface DestinationDetailItemWithExternalCryptoData extends DestinationDetailItemCommonFields {
|
|
435
|
+
type: CounterpartyDestinationType.CRYPTO_EXTERNAL | CounterpartyDestinationType.CRYPTO_INTERNAL;
|
|
436
|
+
external_banking_data?: never;
|
|
437
|
+
external_crypto_data: DestinationDetailItemExternalCryptoData;
|
|
438
|
+
}
|
|
439
|
+
type DestinationDetailItem = DestinationDetailItemWithExternalBankingData | DestinationDetailItemWithExternalCryptoData;
|
|
440
|
+
interface Request {
|
|
441
|
+
wallet_id: string;
|
|
442
|
+
counterparty_account_id: string;
|
|
443
|
+
counterparty_destination_id: string;
|
|
444
|
+
}
|
|
445
|
+
type Response = DestinationDetailItem;
|
|
446
|
+
}
|
|
447
|
+
namespace Create {
|
|
448
|
+
interface Request {
|
|
449
|
+
wallet_id: string;
|
|
450
|
+
counterparty_account_id: string;
|
|
451
|
+
type: CounterpartyDestinationType;
|
|
452
|
+
nickname: string;
|
|
453
|
+
external_banking_data?: API.Counterparties.Destination.Detail.DestinationDetailItemExternalBankingData;
|
|
454
|
+
external_crypto_data?: API.Counterparties.Destination.Detail.DestinationDetailItemExternalCryptoData;
|
|
455
|
+
}
|
|
456
|
+
interface Response extends API.Counterparties.Destination.Detail.DestinationDetailItemCommonFields {
|
|
457
|
+
id: string;
|
|
458
|
+
nickname: string;
|
|
459
|
+
created_at: string;
|
|
460
|
+
type: CounterpartyDestinationType;
|
|
461
|
+
external_banking_data?: API.Counterparties.Destination.Detail.DestinationDetailItemExternalBankingData;
|
|
462
|
+
external_crypto_data?: API.Counterparties.Destination.Detail.DestinationDetailItemExternalCryptoData;
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
namespace Update {
|
|
466
|
+
interface Request {
|
|
467
|
+
wallet_id: string;
|
|
468
|
+
counterparty_account_id: string;
|
|
469
|
+
counterparty_destination_id: string;
|
|
470
|
+
nickname: string;
|
|
471
|
+
}
|
|
472
|
+
type Response = API.Counterparties.Destination.Detail.DestinationDetailItemCommonFields;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
namespace GetById {
|
|
476
|
+
interface Request {
|
|
477
|
+
wallet_id: string;
|
|
478
|
+
counterparty_account_id: string;
|
|
479
|
+
}
|
|
480
|
+
type Response = Counterparty;
|
|
481
|
+
}
|
|
482
|
+
namespace List {
|
|
483
|
+
interface Request {
|
|
484
|
+
wallet_id: string;
|
|
485
|
+
offset?: number;
|
|
486
|
+
limit?: number;
|
|
487
|
+
sort_by?: 'created_at' | 'nickname' | 'type' | 'email' | 'phone';
|
|
488
|
+
sort_order?: SortingDirection;
|
|
489
|
+
filter?: {
|
|
490
|
+
type?: CounterpartyDestinationType;
|
|
491
|
+
nickname?: string;
|
|
492
|
+
created_at?: string;
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
type Response = {
|
|
496
|
+
total: number;
|
|
497
|
+
data: Counterparty[];
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
namespace Create {
|
|
501
|
+
interface Request {
|
|
502
|
+
email: string;
|
|
503
|
+
phone: string;
|
|
504
|
+
wallet_id: string;
|
|
505
|
+
nickname: string;
|
|
506
|
+
type: CounterpartyType;
|
|
507
|
+
}
|
|
508
|
+
type Response = Counterparty;
|
|
509
|
+
}
|
|
510
|
+
namespace Update {
|
|
511
|
+
interface Request {
|
|
512
|
+
wallet_id: string;
|
|
513
|
+
counterparty_account_id: string;
|
|
514
|
+
nickname: string;
|
|
515
|
+
}
|
|
516
|
+
type Response = Counterparty;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
namespace Currencies {
|
|
520
|
+
interface CommonCurrencyFields {
|
|
521
|
+
uuid: string;
|
|
522
|
+
decimal: number | null;
|
|
523
|
+
is_memo: boolean | null;
|
|
524
|
+
is_stablecoin: boolean;
|
|
525
|
+
is_enabled: boolean;
|
|
526
|
+
render_decimal: number;
|
|
527
|
+
meta: {
|
|
528
|
+
icon: string;
|
|
529
|
+
name: string;
|
|
530
|
+
symbol: string;
|
|
531
|
+
description: string;
|
|
532
|
+
};
|
|
533
|
+
type: CurrencyType;
|
|
534
|
+
}
|
|
535
|
+
export interface CryptoCurrency extends CommonCurrencyFields {
|
|
536
|
+
is_crypto: true;
|
|
537
|
+
meta: CommonCurrencyFields['meta'] & {
|
|
538
|
+
chain_id: number;
|
|
539
|
+
contract: string;
|
|
540
|
+
chain_name: string;
|
|
541
|
+
};
|
|
542
|
+
}
|
|
543
|
+
export interface FiatCurrency extends CommonCurrencyFields {
|
|
544
|
+
is_crypto: false;
|
|
545
|
+
meta: CommonCurrencyFields['meta'] & {
|
|
546
|
+
code: string;
|
|
547
|
+
iso_code: number;
|
|
548
|
+
sign: string;
|
|
549
|
+
};
|
|
550
|
+
}
|
|
551
|
+
export type Currency = CryptoCurrency | FiatCurrency;
|
|
552
|
+
export type CurrencyList = {
|
|
553
|
+
count: number;
|
|
554
|
+
data: Currency[];
|
|
555
|
+
};
|
|
556
|
+
export {};
|
|
557
|
+
}
|
|
339
558
|
namespace Developer {
|
|
340
559
|
namespace ApiCode {
|
|
341
560
|
interface ApiCode {
|
|
@@ -594,188 +813,37 @@ export declare namespace API {
|
|
|
594
813
|
}
|
|
595
814
|
}
|
|
596
815
|
}
|
|
597
|
-
namespace
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
decimal: number | null;
|
|
601
|
-
is_memo: boolean | null;
|
|
602
|
-
is_stablecoin: boolean;
|
|
603
|
-
is_enabled: boolean;
|
|
604
|
-
render_decimal: number;
|
|
605
|
-
meta: {
|
|
606
|
-
icon: string;
|
|
607
|
-
name: string;
|
|
608
|
-
symbol: string;
|
|
609
|
-
description: string;
|
|
610
|
-
};
|
|
611
|
-
type: CurrencyType;
|
|
612
|
-
}
|
|
613
|
-
export interface CryptoCurrency extends CommonCurrencyFields {
|
|
614
|
-
is_crypto: true;
|
|
615
|
-
meta: CommonCurrencyFields['meta'] & {
|
|
616
|
-
chain_id: number;
|
|
617
|
-
contract: string;
|
|
618
|
-
chain_name: string;
|
|
619
|
-
};
|
|
620
|
-
}
|
|
621
|
-
export interface FiatCurrency extends CommonCurrencyFields {
|
|
622
|
-
is_crypto: false;
|
|
623
|
-
meta: CommonCurrencyFields['meta'] & {
|
|
624
|
-
code: string;
|
|
625
|
-
iso_code: number;
|
|
626
|
-
sign: string;
|
|
627
|
-
};
|
|
628
|
-
}
|
|
629
|
-
export type Currency = CryptoCurrency | FiatCurrency;
|
|
630
|
-
export type CurrencyList = {
|
|
631
|
-
count: number;
|
|
632
|
-
data: Currency[];
|
|
633
|
-
};
|
|
634
|
-
export {};
|
|
635
|
-
}
|
|
636
|
-
namespace Chains {
|
|
637
|
-
interface Chain {
|
|
638
|
-
id: number;
|
|
639
|
-
name: string;
|
|
640
|
-
symbol: string;
|
|
641
|
-
is_beta: boolean | null;
|
|
642
|
-
}
|
|
643
|
-
type ChainList = {
|
|
644
|
-
count: number;
|
|
645
|
-
data: Chain[];
|
|
646
|
-
};
|
|
647
|
-
}
|
|
648
|
-
namespace Wallets {
|
|
649
|
-
interface WallletBalanceCryptoDetails {
|
|
650
|
-
uuid: string;
|
|
651
|
-
amount: number;
|
|
652
|
-
fiat_amount: number;
|
|
653
|
-
currency: API.Currencies.Currency;
|
|
654
|
-
}
|
|
655
|
-
interface WalletBalanceItem {
|
|
656
|
-
symbol: string;
|
|
657
|
-
icon: string;
|
|
658
|
-
name: string;
|
|
659
|
-
is_crypto: boolean;
|
|
660
|
-
decimal?: number | null;
|
|
661
|
-
amount: number;
|
|
662
|
-
fiat_amount: number;
|
|
663
|
-
details: WallletBalanceCryptoDetails[];
|
|
664
|
-
}
|
|
665
|
-
type WalletBalance = WalletBalanceItem[];
|
|
666
|
-
namespace WalletChain {
|
|
667
|
-
interface WalletChain {
|
|
668
|
-
uuid: string;
|
|
669
|
-
created_ad: string;
|
|
670
|
-
address: string;
|
|
671
|
-
wallet_uuid: string;
|
|
672
|
-
chain: number;
|
|
673
|
-
}
|
|
674
|
-
namespace Create {
|
|
675
|
-
interface Request {
|
|
676
|
-
wallet_uuid: string;
|
|
677
|
-
chain: number;
|
|
678
|
-
label: string;
|
|
679
|
-
}
|
|
680
|
-
type Response = WalletChain;
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
interface Wallet {
|
|
684
|
-
uuid: string;
|
|
685
|
-
type: WalletType | string;
|
|
686
|
-
created_at: string;
|
|
687
|
-
fiat_total: number;
|
|
688
|
-
crypto_total: number;
|
|
689
|
-
total_amount: number;
|
|
690
|
-
balance: WalletBalance;
|
|
691
|
-
}
|
|
692
|
-
namespace WalletsList {
|
|
693
|
-
interface WalletsListItem {
|
|
694
|
-
type: WalletType | string;
|
|
695
|
-
uuid: string;
|
|
696
|
-
created_at: string;
|
|
697
|
-
}
|
|
698
|
-
type Response = {
|
|
699
|
-
total: number;
|
|
700
|
-
data: WalletsListItem[];
|
|
701
|
-
};
|
|
702
|
-
}
|
|
703
|
-
namespace WalletTransactions {
|
|
704
|
-
interface WalletTransactionMeta {
|
|
705
|
-
transaction_hash?: string;
|
|
706
|
-
fee?: number;
|
|
707
|
-
order_id?: string;
|
|
708
|
-
from_address?: string;
|
|
709
|
-
to_address?: string;
|
|
710
|
-
network_fee?: number;
|
|
711
|
-
network_fee_currency?: string;
|
|
712
|
-
fee_currency?: string;
|
|
713
|
-
billing_amount?: number;
|
|
714
|
-
utila_transaction?: string;
|
|
715
|
-
transcation_amount?: number;
|
|
716
|
-
transaction_amount?: number;
|
|
717
|
-
billing_amount_currency?: string;
|
|
718
|
-
transcation_amount_currency?: string;
|
|
719
|
-
transaction_amount_currency?: string;
|
|
720
|
-
exchange_rate?: number;
|
|
721
|
-
fiat_account_id?: string;
|
|
722
|
-
txid?: string;
|
|
723
|
-
chain_id?: number;
|
|
724
|
-
from_user_data?: number;
|
|
725
|
-
to_user_data?: number;
|
|
726
|
-
to_card_id?: string;
|
|
727
|
-
to_card_last4?: string;
|
|
728
|
-
to_fiat_account_id?: string;
|
|
729
|
-
to_vendor_id?: string;
|
|
730
|
-
}
|
|
731
|
-
interface Transaction {
|
|
816
|
+
namespace Location {
|
|
817
|
+
namespace Countries {
|
|
818
|
+
interface Country {
|
|
732
819
|
id: number;
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
wallet_id: string;
|
|
758
|
-
method: WalletTransactionMethod | string;
|
|
759
|
-
meta: WalletTransactionMeta;
|
|
760
|
-
record_type: WalletTransactionRecordType | string;
|
|
761
|
-
currency: API.Currencies.Currency;
|
|
762
|
-
}
|
|
763
|
-
namespace GetByUuid {
|
|
764
|
-
type Request = {
|
|
765
|
-
wallet_uuid: string;
|
|
766
|
-
uuid: string;
|
|
767
|
-
};
|
|
820
|
+
capital: string;
|
|
821
|
+
currency: string;
|
|
822
|
+
currency_name: string;
|
|
823
|
+
currency_symbol: string;
|
|
824
|
+
emoji: string;
|
|
825
|
+
emojiU: string;
|
|
826
|
+
flag: number;
|
|
827
|
+
iso2: string;
|
|
828
|
+
iso3: string;
|
|
829
|
+
latitude: number;
|
|
830
|
+
longitude: number;
|
|
831
|
+
name: string;
|
|
832
|
+
nationality: string;
|
|
833
|
+
native: string;
|
|
834
|
+
numeric_code: string;
|
|
835
|
+
phonecode: string;
|
|
836
|
+
region: string;
|
|
837
|
+
region_id: number;
|
|
838
|
+
subregion: string;
|
|
839
|
+
subregion_id: number;
|
|
840
|
+
timezones: object[];
|
|
841
|
+
tld: string;
|
|
842
|
+
translations: object[];
|
|
843
|
+
wikiDataId: string;
|
|
768
844
|
}
|
|
769
|
-
namespace
|
|
770
|
-
type
|
|
771
|
-
wallet_uuid: string;
|
|
772
|
-
limit?: number;
|
|
773
|
-
offset?: number;
|
|
774
|
-
};
|
|
775
|
-
type Response = {
|
|
776
|
-
total: number;
|
|
777
|
-
data: Transaction[];
|
|
778
|
-
};
|
|
845
|
+
namespace List {
|
|
846
|
+
type Response = API.Location.Countries.Country[];
|
|
779
847
|
}
|
|
780
848
|
}
|
|
781
849
|
}
|
|
@@ -975,4 +1043,138 @@ export declare namespace API {
|
|
|
975
1043
|
}
|
|
976
1044
|
}
|
|
977
1045
|
}
|
|
1046
|
+
namespace Wallets {
|
|
1047
|
+
interface WallletBalanceCryptoDetails {
|
|
1048
|
+
uuid: string;
|
|
1049
|
+
amount: number;
|
|
1050
|
+
fiat_amount: number;
|
|
1051
|
+
currency: API.Currencies.Currency;
|
|
1052
|
+
}
|
|
1053
|
+
interface WalletBalanceItem {
|
|
1054
|
+
symbol: string;
|
|
1055
|
+
icon: string;
|
|
1056
|
+
name: string;
|
|
1057
|
+
is_crypto: boolean;
|
|
1058
|
+
decimal?: number | null;
|
|
1059
|
+
amount: number;
|
|
1060
|
+
fiat_amount: number;
|
|
1061
|
+
details: WallletBalanceCryptoDetails[];
|
|
1062
|
+
}
|
|
1063
|
+
type WalletBalance = WalletBalanceItem[];
|
|
1064
|
+
namespace WalletChain {
|
|
1065
|
+
interface WalletChain {
|
|
1066
|
+
uuid: string;
|
|
1067
|
+
created_ad: string;
|
|
1068
|
+
address: string;
|
|
1069
|
+
wallet_uuid: string;
|
|
1070
|
+
chain: number;
|
|
1071
|
+
}
|
|
1072
|
+
namespace Create {
|
|
1073
|
+
interface Request {
|
|
1074
|
+
wallet_uuid: string;
|
|
1075
|
+
chain: number;
|
|
1076
|
+
label: string;
|
|
1077
|
+
}
|
|
1078
|
+
type Response = WalletChain;
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
interface Wallet {
|
|
1082
|
+
uuid: string;
|
|
1083
|
+
type: WalletType | string;
|
|
1084
|
+
created_at: string;
|
|
1085
|
+
fiat_total: number;
|
|
1086
|
+
crypto_total: number;
|
|
1087
|
+
total_amount: number;
|
|
1088
|
+
balance: WalletBalance;
|
|
1089
|
+
}
|
|
1090
|
+
namespace WalletsList {
|
|
1091
|
+
interface WalletsListItem {
|
|
1092
|
+
type: WalletType | string;
|
|
1093
|
+
uuid: string;
|
|
1094
|
+
created_at: string;
|
|
1095
|
+
}
|
|
1096
|
+
type Response = {
|
|
1097
|
+
total: number;
|
|
1098
|
+
data: WalletsListItem[];
|
|
1099
|
+
};
|
|
1100
|
+
}
|
|
1101
|
+
namespace WalletTransactions {
|
|
1102
|
+
interface WalletTransactionMeta {
|
|
1103
|
+
transaction_hash?: string;
|
|
1104
|
+
fee?: number;
|
|
1105
|
+
order_id?: string;
|
|
1106
|
+
from_address?: string;
|
|
1107
|
+
to_address?: string;
|
|
1108
|
+
network_fee?: number;
|
|
1109
|
+
network_fee_currency?: string;
|
|
1110
|
+
fee_currency?: string;
|
|
1111
|
+
billing_amount?: number;
|
|
1112
|
+
utila_transaction?: string;
|
|
1113
|
+
transcation_amount?: number;
|
|
1114
|
+
transaction_amount?: number;
|
|
1115
|
+
billing_amount_currency?: string;
|
|
1116
|
+
transcation_amount_currency?: string;
|
|
1117
|
+
transaction_amount_currency?: string;
|
|
1118
|
+
exchange_rate?: number;
|
|
1119
|
+
fiat_account_id?: string;
|
|
1120
|
+
txid?: string;
|
|
1121
|
+
chain_id?: number;
|
|
1122
|
+
from_user_data?: number;
|
|
1123
|
+
to_user_data?: number;
|
|
1124
|
+
to_card_id?: string;
|
|
1125
|
+
to_card_last4?: string;
|
|
1126
|
+
to_fiat_account_id?: string;
|
|
1127
|
+
to_vendor_id?: string;
|
|
1128
|
+
}
|
|
1129
|
+
interface Transaction {
|
|
1130
|
+
id: number;
|
|
1131
|
+
created_at: string;
|
|
1132
|
+
type: WalletTransactionType | string;
|
|
1133
|
+
method: WalletTransactionMethod | string;
|
|
1134
|
+
status: string;
|
|
1135
|
+
amount: number;
|
|
1136
|
+
from: string | null;
|
|
1137
|
+
to: string | null;
|
|
1138
|
+
wallet_id: string;
|
|
1139
|
+
txid: string;
|
|
1140
|
+
info: string;
|
|
1141
|
+
currency: API.Currencies.Currency;
|
|
1142
|
+
record_type: WalletTransactionRecordType | string;
|
|
1143
|
+
meta?: WalletTransactionMeta;
|
|
1144
|
+
}
|
|
1145
|
+
interface DetailedTransaction {
|
|
1146
|
+
id: number;
|
|
1147
|
+
amount: number;
|
|
1148
|
+
created_at: string;
|
|
1149
|
+
from: string;
|
|
1150
|
+
info: string;
|
|
1151
|
+
status: string;
|
|
1152
|
+
to: string;
|
|
1153
|
+
txid: string;
|
|
1154
|
+
type: WalletTransactionType | string;
|
|
1155
|
+
wallet_id: string;
|
|
1156
|
+
method: WalletTransactionMethod | string;
|
|
1157
|
+
meta: WalletTransactionMeta;
|
|
1158
|
+
record_type: WalletTransactionRecordType | string;
|
|
1159
|
+
currency: API.Currencies.Currency;
|
|
1160
|
+
}
|
|
1161
|
+
namespace GetByUuid {
|
|
1162
|
+
type Request = {
|
|
1163
|
+
wallet_uuid: string;
|
|
1164
|
+
uuid: string;
|
|
1165
|
+
};
|
|
1166
|
+
}
|
|
1167
|
+
namespace TransactionList {
|
|
1168
|
+
type Request = {
|
|
1169
|
+
wallet_uuid: string;
|
|
1170
|
+
limit?: number;
|
|
1171
|
+
offset?: number;
|
|
1172
|
+
};
|
|
1173
|
+
type Response = {
|
|
1174
|
+
total: number;
|
|
1175
|
+
data: Transaction[];
|
|
1176
|
+
};
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
978
1180
|
}
|
package/dist/constants.d.ts
CHANGED
|
@@ -151,3 +151,15 @@ export declare enum SortingDirection {
|
|
|
151
151
|
ASC = "ASC",
|
|
152
152
|
DESC = "DESC"
|
|
153
153
|
}
|
|
154
|
+
export declare enum CounterpartyType {
|
|
155
|
+
INDIVIDUAL = "INDIVIDUAL",
|
|
156
|
+
BUSINESS = "BUSINESS"
|
|
157
|
+
}
|
|
158
|
+
export declare enum CounterpartyDestinationType {
|
|
159
|
+
DOMESTIC_WIRE = "DOMESTIC_WIRE",
|
|
160
|
+
ACH = "ACH",
|
|
161
|
+
SWIFT = "SWIFT",
|
|
162
|
+
SEPA = "SEPA",
|
|
163
|
+
CRYPTO_EXTERNAL = "CRYPTO_EXTERNAL",
|
|
164
|
+
CRYPTO_INTERNAL = "CRYPTO_INTERNAL"
|
|
165
|
+
}
|
package/dist/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SortingDirection = exports.APIKeyRole = exports.OrderType = exports.CurrencyType = exports.SubAccountType = exports.FiatAccountStatus = exports.CardStatus = exports.OrderStatuses = exports.KYCStatuses = exports.defaultPaginationParams = exports.walletType = exports.WalletTypeValues = exports.ResponseStatus = exports.RequestLoadingType = exports.RequestStatus = exports.WalletTransactionRecordType = exports.WalletTransactionMethod = exports.WalletTransactionType = exports.CardTransactionType = exports.CardType = exports.CardFormFactor = exports.AppEnviroment = exports.falsyValues = void 0;
|
|
3
|
+
exports.CounterpartyDestinationType = exports.CounterpartyType = exports.SortingDirection = exports.APIKeyRole = exports.OrderType = exports.CurrencyType = exports.SubAccountType = exports.FiatAccountStatus = exports.CardStatus = exports.OrderStatuses = exports.KYCStatuses = exports.defaultPaginationParams = exports.walletType = exports.WalletTypeValues = exports.ResponseStatus = exports.RequestLoadingType = exports.RequestStatus = exports.WalletTransactionRecordType = exports.WalletTransactionMethod = exports.WalletTransactionType = exports.CardTransactionType = exports.CardType = exports.CardFormFactor = exports.AppEnviroment = exports.falsyValues = void 0;
|
|
4
4
|
exports.falsyValues = ['false', '0', '', 'FALSE', false, null, undefined, NaN, 0];
|
|
5
5
|
var AppEnviroment;
|
|
6
6
|
(function (AppEnviroment) {
|
|
@@ -175,3 +175,17 @@ var SortingDirection;
|
|
|
175
175
|
SortingDirection["ASC"] = "ASC";
|
|
176
176
|
SortingDirection["DESC"] = "DESC";
|
|
177
177
|
})(SortingDirection || (exports.SortingDirection = SortingDirection = {}));
|
|
178
|
+
var CounterpartyType;
|
|
179
|
+
(function (CounterpartyType) {
|
|
180
|
+
CounterpartyType["INDIVIDUAL"] = "INDIVIDUAL";
|
|
181
|
+
CounterpartyType["BUSINESS"] = "BUSINESS";
|
|
182
|
+
})(CounterpartyType || (exports.CounterpartyType = CounterpartyType = {}));
|
|
183
|
+
var CounterpartyDestinationType;
|
|
184
|
+
(function (CounterpartyDestinationType) {
|
|
185
|
+
CounterpartyDestinationType["DOMESTIC_WIRE"] = "DOMESTIC_WIRE";
|
|
186
|
+
CounterpartyDestinationType["ACH"] = "ACH";
|
|
187
|
+
CounterpartyDestinationType["SWIFT"] = "SWIFT";
|
|
188
|
+
CounterpartyDestinationType["SEPA"] = "SEPA";
|
|
189
|
+
CounterpartyDestinationType["CRYPTO_EXTERNAL"] = "CRYPTO_EXTERNAL";
|
|
190
|
+
CounterpartyDestinationType["CRYPTO_INTERNAL"] = "CRYPTO_INTERNAL";
|
|
191
|
+
})(CounterpartyDestinationType || (exports.CounterpartyDestinationType = CounterpartyDestinationType = {}));
|