squarefi-bff-api-module 1.30.0 → 1.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -573,6 +573,13 @@ export declare namespace API {
573
573
  count: number;
574
574
  data: Currency[];
575
575
  };
576
+ export interface SimplifiedCurrency {
577
+ icon?: string | null;
578
+ name: string;
579
+ uuid: string;
580
+ symbol: string;
581
+ decimal: number;
582
+ }
576
583
  export {};
577
584
  }
578
585
  namespace Developer {
@@ -1460,45 +1467,43 @@ export declare namespace API {
1460
1467
  sort_by?: string;
1461
1468
  sort_order?: 'asc' | 'desc';
1462
1469
  }
1463
- interface L2FOriginatorAddress {
1470
+ interface PaymentOriginatorAddress {
1464
1471
  address_line1?: string | null;
1465
1472
  city?: string | null;
1466
1473
  state?: string | null;
1467
1474
  postal_code?: string | null;
1468
1475
  country?: string | null;
1469
1476
  }
1470
- interface L2FOriginatorProfile {
1477
+ interface PaymentOriginatorProfile {
1471
1478
  name: string;
1472
- address?: L2FOriginatorAddress;
1479
+ address?: PaymentOriginatorAddress;
1473
1480
  }
1474
- interface L2FOriginatorAccountInfo {
1481
+ interface PaymentOriginatorAccountInfo {
1475
1482
  account_number: string;
1476
1483
  routing_number?: string | null;
1477
1484
  swift_bic?: string | null;
1478
1485
  institution_name?: string | null;
1479
1486
  }
1480
- interface L2FOriginator {
1481
- profile: L2FOriginatorProfile;
1482
- account_information: L2FOriginatorAccountInfo;
1487
+ interface PaymentOriginator {
1488
+ profile: PaymentOriginatorProfile;
1489
+ account_information: PaymentOriginatorAccountInfo;
1483
1490
  reference?: string | null;
1484
1491
  memo?: string | null;
1485
1492
  }
1486
1493
  interface OrderMeta {
1487
1494
  order_uuid: string;
1488
1495
  request_id?: string | null;
1489
- billing_amount: number;
1490
- billing_currency: string;
1491
- billing_amount_currency: string;
1492
- transaction_amount: number;
1493
- transaction_currency: string;
1494
- transaction_amount_currency: string;
1496
+ billing_amount?: number;
1497
+ billing_currency?: string;
1498
+ transaction_amount?: number;
1499
+ transaction_currency?: string;
1495
1500
  network_fee?: number | null;
1496
1501
  network_fee_currency?: string | null;
1497
- exchange_rate: number;
1498
- fee: number;
1499
- fee_currency: string;
1500
- from_currency_id: string;
1501
- to_currency_id: string;
1502
+ exchange_rate?: number;
1503
+ fee?: number;
1504
+ fee_currency?: string;
1505
+ from_currency_id?: string;
1506
+ to_currency_id?: string;
1502
1507
  chain_id?: number | null;
1503
1508
  counterparty_destination_id?: string | null;
1504
1509
  counterparty_account_id?: string | null;
@@ -1510,14 +1515,24 @@ export declare namespace API {
1510
1515
  reference?: string | null;
1511
1516
  note?: string | null;
1512
1517
  order_id?: string | null;
1513
- originator?: L2FOriginator | null;
1518
+ originator?: PaymentOriginator | null;
1514
1519
  sub_account_id?: string | null;
1515
1520
  to_address?: string | null;
1516
1521
  sub_account_currency?: string | null;
1517
1522
  crypto_transaction_hash?: string | null;
1523
+ workflow_type?: string;
1524
+ processing_type?: string;
1525
+ workflow_status?: string;
1526
+ qstash_message_id?: string;
1527
+ vendor_account_id?: string;
1528
+ processing_started_at?: string;
1529
+ workflow_status_updated_at?: string;
1530
+ card_id?: string;
1531
+ vendor_id?: string;
1532
+ fiat_account_id?: string;
1518
1533
  }
1519
1534
  interface OrderItem {
1520
- id: number;
1535
+ id: string;
1521
1536
  order_uuid: string;
1522
1537
  request_id?: string | null;
1523
1538
  wallet_uuid: string;
@@ -1540,51 +1555,106 @@ export declare namespace API {
1540
1555
  interface Request {
1541
1556
  order_uuid: string;
1542
1557
  }
1543
- type OrderMetaSimplified = Pick<API.Orders.V2.List.ByWallet.OrderMeta, 'order_uuid' | 'request_id' | 'counterparty_destination_id' | 'counterparty_account_id' | 'counterparty_account_name' | 'counterparty_account_nickname' | 'virtual_account_id' | 'virtual_account_name' | 'originator'>;
1558
+ type OrderMetaExtended = Omit<API.Orders.V2.List.ByWallet.OrderMeta, 'to_crypto_address' | 'sub_account_id' | 'to_address' | 'sub_account_currency' | 'crypto_transaction_hash'>;
1544
1559
  interface CounterpartyAccount {
1545
1560
  id: string;
1546
1561
  name: string;
1547
1562
  type: string;
1548
1563
  email?: string | null;
1549
1564
  phone?: string | null;
1565
+ wallet_id: string;
1550
1566
  }
1551
1567
  interface ExternalBankingData {
1568
+ id: string;
1552
1569
  account_number: string;
1553
1570
  routing_number?: string | null;
1554
1571
  bank_name: string;
1555
1572
  swift_bic?: string | null;
1556
1573
  iban?: string | null;
1557
1574
  note?: string | null;
1575
+ address_id?: string | null;
1558
1576
  }
1559
1577
  interface ExternalCryptoData {
1578
+ id: string;
1560
1579
  address: string;
1561
1580
  currency_id: string;
1562
1581
  memo?: string | null;
1563
1582
  }
1564
1583
  interface CounterpartyDestination {
1565
1584
  id: string;
1566
- type: string;
1585
+ counterparty_account_id: string;
1567
1586
  nickname?: string | null;
1587
+ type: string;
1588
+ external_banking_data_id?: string | null;
1589
+ external_crypto_data_id?: string | null;
1590
+ created_at: string;
1591
+ updated_at: string;
1592
+ deleted_at?: string | null;
1593
+ is_deleted?: boolean | null;
1568
1594
  counterparty_account: CounterpartyAccount;
1569
1595
  external_banking_data?: ExternalBankingData | null;
1570
1596
  external_crypto_data?: ExternalCryptoData | null;
1571
1597
  }
1598
+ interface IntegrationVendorExtended extends API.VirtualAccounts.Programs.IntegrationVendor {
1599
+ type: string;
1600
+ }
1601
+ interface DepositInstructionAddress {
1602
+ address_line1: string;
1603
+ city: string;
1604
+ state: string;
1605
+ postal_code: string;
1606
+ country_code: string;
1607
+ }
1608
+ interface DepositInstruction {
1609
+ instruction_type: string;
1610
+ asset_type_id: string;
1611
+ account_number: string;
1612
+ routing_number?: string;
1613
+ account_routing_number?: string;
1614
+ institution_name: string;
1615
+ account_holder_name?: string;
1616
+ memo: string;
1617
+ institution_address?: DepositInstructionAddress;
1618
+ account_holder_address?: DepositInstructionAddress;
1619
+ }
1620
+ interface VirtualAccountAccountDetails {
1621
+ rail_account_id: string;
1622
+ rail_asset_type: string;
1623
+ rail_product_id: string;
1624
+ rail_customer_id: string;
1625
+ }
1572
1626
  interface VirtualAccountDetails {
1573
1627
  id: string;
1628
+ created_at: string;
1574
1629
  wallet_id: string;
1575
1630
  status: string;
1631
+ account_currency: string;
1632
+ destination_currency: string;
1633
+ destination_address?: string | null;
1634
+ va_programs_id: string;
1635
+ integration_vendor_id: string;
1576
1636
  vendor_account_id: string;
1577
- balance: number;
1578
- account_currency_details: API.Currencies.Currency;
1579
- destination_currency_details: API.Currencies.Currency;
1580
- integration_vendor: API.VirtualAccounts.Programs.IntegrationVendor;
1581
- account_details: API.VirtualAccounts.VirtualAccount.AccountDetails;
1582
- }
1583
- type OrderDetails = Omit<API.Orders.V2.List.ByWallet.OrderItem, 'meta' | 'updated_at' | 'request_id' | 'sub_account_id'> & {
1584
- meta: OrderMetaSimplified;
1585
- wallet: API.Wallets.Wallet;
1586
- from_currency: API.Currencies.Currency;
1587
- to_currency: API.Currencies.Currency;
1637
+ vendor_status: string;
1638
+ current_balance: number;
1639
+ available_balance: number;
1640
+ customer_name: string;
1641
+ asset_type_id: string;
1642
+ deposit_type: string;
1643
+ meta?: Record<string, unknown>;
1644
+ account_details: VirtualAccountAccountDetails;
1645
+ deposit_instructions?: DepositInstruction[];
1646
+ account_currency_details: API.Currencies.SimplifiedCurrency;
1647
+ destination_currency_details: API.Currencies.SimplifiedCurrency;
1648
+ integration_vendor: IntegrationVendorExtended;
1649
+ }
1650
+ type OrderDetails = Omit<API.Orders.V2.List.ByWallet.OrderItem, 'id' | 'meta'> & {
1651
+ id: string;
1652
+ meta: OrderMetaExtended;
1653
+ request_id: string;
1654
+ updated_at: string;
1655
+ wallet: API.Wallets.SimplifiedWallet;
1656
+ from_currency: API.Currencies.SimplifiedCurrency;
1657
+ to_currency: API.Currencies.SimplifiedCurrency;
1588
1658
  virtual_account?: VirtualAccountDetails | null;
1589
1659
  counterparty_destination?: CounterpartyDestination | null;
1590
1660
  };
@@ -2015,6 +2085,11 @@ export declare namespace API {
2015
2085
  }
2016
2086
  }
2017
2087
  namespace Wallets {
2088
+ interface SimplifiedWallet {
2089
+ uuid: string;
2090
+ user_id: string;
2091
+ tenant_id: string;
2092
+ }
2018
2093
  interface WallletBalanceCryptoDetails {
2019
2094
  uuid: string;
2020
2095
  amount: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squarefi-bff-api-module",
3
- "version": "1.30.0",
3
+ "version": "1.30.1",
4
4
  "description": "Squarefi BFF API client module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -692,6 +692,15 @@ export namespace API {
692
692
  count: number;
693
693
  data: Currency[];
694
694
  };
695
+
696
+ // Упрощенная версия валюты (используется в некоторых эндпоинтах)
697
+ export interface SimplifiedCurrency {
698
+ icon?: string | null;
699
+ name: string;
700
+ uuid: string;
701
+ symbol: string;
702
+ decimal: number;
703
+ }
695
704
  }
696
705
 
697
706
  export namespace Developer {
@@ -1916,7 +1925,7 @@ export namespace API {
1916
1925
  sort_order?: 'asc' | 'desc';
1917
1926
  }
1918
1927
 
1919
- export interface L2FOriginatorAddress {
1928
+ export interface PaymentOriginatorAddress {
1920
1929
  address_line1?: string | null;
1921
1930
  city?: string | null;
1922
1931
  state?: string | null;
@@ -1924,21 +1933,21 @@ export namespace API {
1924
1933
  country?: string | null;
1925
1934
  }
1926
1935
 
1927
- export interface L2FOriginatorProfile {
1936
+ export interface PaymentOriginatorProfile {
1928
1937
  name: string;
1929
- address?: L2FOriginatorAddress;
1938
+ address?: PaymentOriginatorAddress;
1930
1939
  }
1931
1940
 
1932
- export interface L2FOriginatorAccountInfo {
1941
+ export interface PaymentOriginatorAccountInfo {
1933
1942
  account_number: string;
1934
1943
  routing_number?: string | null;
1935
1944
  swift_bic?: string | null;
1936
1945
  institution_name?: string | null;
1937
1946
  }
1938
1947
 
1939
- export interface L2FOriginator {
1940
- profile: L2FOriginatorProfile;
1941
- account_information: L2FOriginatorAccountInfo;
1948
+ export interface PaymentOriginator {
1949
+ profile: PaymentOriginatorProfile;
1950
+ account_information: PaymentOriginatorAccountInfo;
1942
1951
  reference?: string | null;
1943
1952
  memo?: string | null;
1944
1953
  }
@@ -1946,19 +1955,19 @@ export namespace API {
1946
1955
  export interface OrderMeta {
1947
1956
  order_uuid: string;
1948
1957
  request_id?: string | null;
1949
- billing_amount: number;
1950
- billing_currency: string;
1951
- billing_amount_currency: string;
1952
- transaction_amount: number;
1953
- transaction_currency: string;
1954
- transaction_amount_currency: string;
1958
+ billing_amount?: number;
1959
+ billing_currency?: string;
1960
+ // billing_amount_currency?: string; // double billing_currency field
1961
+ transaction_amount?: number;
1962
+ transaction_currency?: string;
1963
+ // transaction_amount_currency?: string; // double transaction_currency field
1955
1964
  network_fee?: number | null;
1956
1965
  network_fee_currency?: string | null;
1957
- exchange_rate: number;
1958
- fee: number;
1959
- fee_currency: string;
1960
- from_currency_id: string;
1961
- to_currency_id: string;
1966
+ exchange_rate?: number;
1967
+ fee?: number;
1968
+ fee_currency?: string;
1969
+ from_currency_id?: string;
1970
+ to_currency_id?: string;
1962
1971
  chain_id?: number | null;
1963
1972
  counterparty_destination_id?: string | null;
1964
1973
  counterparty_account_id?: string | null;
@@ -1970,15 +1979,26 @@ export namespace API {
1970
1979
  reference?: string | null;
1971
1980
  note?: string | null;
1972
1981
  order_id?: string | null;
1973
- originator?: L2FOriginator | null;
1982
+ originator?: PaymentOriginator | null;
1974
1983
  sub_account_id?: string | null;
1975
1984
  to_address?: string | null;
1976
1985
  sub_account_currency?: string | null;
1977
1986
  crypto_transaction_hash?: string | null;
1987
+ // Дополнительные поля для разных типов ордеров
1988
+ workflow_type?: string;
1989
+ processing_type?: string;
1990
+ workflow_status?: string;
1991
+ qstash_message_id?: string;
1992
+ vendor_account_id?: string;
1993
+ processing_started_at?: string;
1994
+ workflow_status_updated_at?: string;
1995
+ card_id?: string;
1996
+ vendor_id?: string;
1997
+ fiat_account_id?: string;
1978
1998
  }
1979
1999
 
1980
2000
  export interface OrderItem {
1981
- id: number;
2001
+ id: string;
1982
2002
  order_uuid: string;
1983
2003
  request_id?: string | null;
1984
2004
  wallet_uuid: string;
@@ -2004,18 +2024,9 @@ export namespace API {
2004
2024
  order_uuid: string;
2005
2025
  }
2006
2026
 
2007
- // Упрощенная мета (без финансовых данных, они есть в amount_from/amount_to)
2008
- export type OrderMetaSimplified = Pick<
2027
+ export type OrderMetaExtended = Omit<
2009
2028
  API.Orders.V2.List.ByWallet.OrderMeta,
2010
- | 'order_uuid'
2011
- | 'request_id'
2012
- | 'counterparty_destination_id'
2013
- | 'counterparty_account_id'
2014
- | 'counterparty_account_name'
2015
- | 'counterparty_account_nickname'
2016
- | 'virtual_account_id'
2017
- | 'virtual_account_name'
2018
- | 'originator'
2029
+ 'to_crypto_address' | 'sub_account_id' | 'to_address' | 'sub_account_currency' | 'crypto_transaction_hash'
2019
2030
  >;
2020
2031
 
2021
2032
  export interface CounterpartyAccount {
@@ -2024,18 +2035,22 @@ export namespace API {
2024
2035
  type: string;
2025
2036
  email?: string | null;
2026
2037
  phone?: string | null;
2038
+ wallet_id: string;
2027
2039
  }
2028
2040
 
2029
2041
  export interface ExternalBankingData {
2042
+ id: string;
2030
2043
  account_number: string;
2031
2044
  routing_number?: string | null;
2032
2045
  bank_name: string;
2033
2046
  swift_bic?: string | null;
2034
2047
  iban?: string | null;
2035
2048
  note?: string | null;
2049
+ address_id?: string | null;
2036
2050
  }
2037
2051
 
2038
2052
  export interface ExternalCryptoData {
2053
+ id: string;
2039
2054
  address: string;
2040
2055
  currency_id: string;
2041
2056
  memo?: string | null;
@@ -2043,33 +2058,85 @@ export namespace API {
2043
2058
 
2044
2059
  export interface CounterpartyDestination {
2045
2060
  id: string;
2046
- type: string;
2061
+ counterparty_account_id: string;
2047
2062
  nickname?: string | null;
2063
+ type: string;
2064
+ external_banking_data_id?: string | null;
2065
+ external_crypto_data_id?: string | null;
2066
+ created_at: string;
2067
+ updated_at: string;
2068
+ deleted_at?: string | null;
2069
+ is_deleted?: boolean | null;
2048
2070
  counterparty_account: CounterpartyAccount;
2049
2071
  external_banking_data?: ExternalBankingData | null;
2050
2072
  external_crypto_data?: ExternalCryptoData | null;
2051
2073
  }
2052
2074
 
2075
+ export interface IntegrationVendorExtended extends API.VirtualAccounts.Programs.IntegrationVendor {
2076
+ type: string;
2077
+ }
2078
+
2079
+ export interface DepositInstructionAddress {
2080
+ address_line1: string;
2081
+ city: string;
2082
+ state: string;
2083
+ postal_code: string;
2084
+ country_code: string;
2085
+ }
2086
+
2087
+ export interface DepositInstruction {
2088
+ instruction_type: string;
2089
+ asset_type_id: string;
2090
+ account_number: string;
2091
+ routing_number?: string;
2092
+ account_routing_number?: string;
2093
+ institution_name: string;
2094
+ account_holder_name?: string;
2095
+ memo: string;
2096
+ institution_address?: DepositInstructionAddress;
2097
+ account_holder_address?: DepositInstructionAddress;
2098
+ }
2099
+
2100
+ export interface VirtualAccountAccountDetails {
2101
+ rail_account_id: string;
2102
+ rail_asset_type: string;
2103
+ rail_product_id: string;
2104
+ rail_customer_id: string;
2105
+ }
2106
+
2053
2107
  export interface VirtualAccountDetails {
2054
2108
  id: string;
2109
+ created_at: string;
2055
2110
  wallet_id: string;
2056
2111
  status: string;
2112
+ account_currency: string;
2113
+ destination_currency: string;
2114
+ destination_address?: string | null;
2115
+ va_programs_id: string;
2116
+ integration_vendor_id: string;
2057
2117
  vendor_account_id: string;
2058
- balance: number;
2059
- account_currency_details: API.Currencies.Currency;
2060
- destination_currency_details: API.Currencies.Currency;
2061
- integration_vendor: API.VirtualAccounts.Programs.IntegrationVendor;
2062
- account_details: API.VirtualAccounts.VirtualAccount.AccountDetails;
2063
- }
2064
-
2065
- export type OrderDetails = Omit<
2066
- API.Orders.V2.List.ByWallet.OrderItem,
2067
- 'meta' | 'updated_at' | 'request_id' | 'sub_account_id'
2068
- > & {
2069
- meta: OrderMetaSimplified;
2070
- wallet: API.Wallets.Wallet;
2071
- from_currency: API.Currencies.Currency;
2072
- to_currency: API.Currencies.Currency;
2118
+ vendor_status: string;
2119
+ current_balance: number;
2120
+ available_balance: number;
2121
+ customer_name: string;
2122
+ asset_type_id: string;
2123
+ deposit_type: string;
2124
+ meta?: Record<string, unknown>;
2125
+ account_details: VirtualAccountAccountDetails;
2126
+ deposit_instructions?: DepositInstruction[];
2127
+ account_currency_details: API.Currencies.SimplifiedCurrency;
2128
+ destination_currency_details: API.Currencies.SimplifiedCurrency;
2129
+ integration_vendor: IntegrationVendorExtended;
2130
+ }
2131
+
2132
+ export type OrderDetails = Omit<API.Orders.V2.List.ByWallet.OrderItem, 'id' | 'meta'> & {
2133
+ id: string;
2134
+ meta: OrderMetaExtended;
2135
+ request_id: string;
2136
+ updated_at: string;
2137
+ wallet: API.Wallets.SimplifiedWallet;
2138
+ from_currency: API.Currencies.SimplifiedCurrency;
2139
+ to_currency: API.Currencies.SimplifiedCurrency;
2073
2140
  virtual_account?: VirtualAccountDetails | null;
2074
2141
  counterparty_destination?: CounterpartyDestination | null;
2075
2142
  };
@@ -2562,6 +2629,13 @@ export namespace API {
2562
2629
  }
2563
2630
 
2564
2631
  export namespace Wallets {
2632
+ // Упрощенная версия кошелька (используется в некоторых эндпоинтах)
2633
+ export interface SimplifiedWallet {
2634
+ uuid: string;
2635
+ user_id: string;
2636
+ tenant_id: string;
2637
+ }
2638
+
2565
2639
  export interface WallletBalanceCryptoDetails {
2566
2640
  uuid: string;
2567
2641
  amount: number;