squarefi-bff-api-module 1.30.0 → 1.30.2

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,103 @@ 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'>;
1544
1558
  interface CounterpartyAccount {
1545
1559
  id: string;
1546
1560
  name: string;
1547
1561
  type: string;
1548
1562
  email?: string | null;
1549
1563
  phone?: string | null;
1564
+ wallet_id: string;
1550
1565
  }
1551
1566
  interface ExternalBankingData {
1567
+ id: string;
1552
1568
  account_number: string;
1553
1569
  routing_number?: string | null;
1554
1570
  bank_name: string;
1555
1571
  swift_bic?: string | null;
1556
1572
  iban?: string | null;
1557
1573
  note?: string | null;
1574
+ address_id?: string | null;
1558
1575
  }
1559
1576
  interface ExternalCryptoData {
1577
+ id: string;
1560
1578
  address: string;
1561
1579
  currency_id: string;
1562
1580
  memo?: string | null;
1563
1581
  }
1564
1582
  interface CounterpartyDestination {
1565
1583
  id: string;
1566
- type: string;
1584
+ counterparty_account_id: string;
1567
1585
  nickname?: string | null;
1586
+ type: string;
1587
+ external_banking_data_id?: string | null;
1588
+ external_crypto_data_id?: string | null;
1589
+ created_at: string;
1590
+ updated_at: string;
1591
+ deleted_at?: string | null;
1592
+ is_deleted?: boolean | null;
1568
1593
  counterparty_account: CounterpartyAccount;
1569
1594
  external_banking_data?: ExternalBankingData | null;
1570
1595
  external_crypto_data?: ExternalCryptoData | null;
1571
1596
  }
1597
+ interface IntegrationVendorExtended extends API.VirtualAccounts.Programs.IntegrationVendor {
1598
+ type: string;
1599
+ }
1600
+ interface DepositInstructionAddress {
1601
+ address_line1: string;
1602
+ city: string;
1603
+ state: string;
1604
+ postal_code: string;
1605
+ country_code: string;
1606
+ }
1607
+ interface DepositInstruction {
1608
+ instruction_type: string;
1609
+ asset_type_id: string;
1610
+ account_number: string;
1611
+ routing_number?: string;
1612
+ account_routing_number?: string;
1613
+ institution_name: string;
1614
+ account_holder_name?: string;
1615
+ memo: string;
1616
+ institution_address?: DepositInstructionAddress;
1617
+ account_holder_address?: DepositInstructionAddress;
1618
+ }
1619
+ interface VirtualAccountAccountDetails {
1620
+ rail_account_id: string;
1621
+ rail_asset_type: string;
1622
+ rail_product_id: string;
1623
+ rail_customer_id: string;
1624
+ }
1572
1625
  interface VirtualAccountDetails {
1573
1626
  id: string;
1627
+ created_at: string;
1574
1628
  wallet_id: string;
1575
1629
  status: string;
1630
+ account_currency: string;
1631
+ destination_currency: string;
1632
+ destination_address?: string | null;
1633
+ va_programs_id: string;
1634
+ integration_vendor_id: string;
1576
1635
  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;
1636
+ vendor_status: string;
1637
+ current_balance: number;
1638
+ available_balance: number;
1639
+ customer_name: string;
1640
+ asset_type_id: string;
1641
+ deposit_type: string;
1642
+ meta?: Record<string, unknown>;
1643
+ account_details: VirtualAccountAccountDetails;
1644
+ deposit_instructions?: DepositInstruction[];
1645
+ account_currency_details: API.Currencies.SimplifiedCurrency;
1646
+ destination_currency_details: API.Currencies.SimplifiedCurrency;
1647
+ integration_vendor: IntegrationVendorExtended;
1648
+ }
1649
+ type OrderDetails = API.Orders.V2.List.ByWallet.OrderItem & {
1650
+ request_id: string;
1651
+ updated_at: string;
1652
+ wallet: API.Wallets.SimplifiedWallet;
1653
+ from_currency: API.Currencies.SimplifiedCurrency;
1654
+ to_currency: API.Currencies.SimplifiedCurrency;
1588
1655
  virtual_account?: VirtualAccountDetails | null;
1589
1656
  counterparty_destination?: CounterpartyDestination | null;
1590
1657
  };
@@ -2015,6 +2082,11 @@ export declare namespace API {
2015
2082
  }
2016
2083
  }
2017
2084
  namespace Wallets {
2085
+ interface SimplifiedWallet {
2086
+ uuid: string;
2087
+ user_id: string;
2088
+ tenant_id: string;
2089
+ }
2018
2090
  interface WallletBalanceCryptoDetails {
2019
2091
  uuid: string;
2020
2092
  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.2",
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,38 +2024,28 @@ export namespace API {
2004
2024
  order_uuid: string;
2005
2025
  }
2006
2026
 
2007
- // Упрощенная мета (без финансовых данных, они есть в amount_from/amount_to)
2008
- export type OrderMetaSimplified = Pick<
2009
- 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'
2019
- >;
2020
-
2021
2027
  export interface CounterpartyAccount {
2022
2028
  id: string;
2023
2029
  name: string;
2024
2030
  type: string;
2025
2031
  email?: string | null;
2026
2032
  phone?: string | null;
2033
+ wallet_id: string;
2027
2034
  }
2028
2035
 
2029
2036
  export interface ExternalBankingData {
2037
+ id: string;
2030
2038
  account_number: string;
2031
2039
  routing_number?: string | null;
2032
2040
  bank_name: string;
2033
2041
  swift_bic?: string | null;
2034
2042
  iban?: string | null;
2035
2043
  note?: string | null;
2044
+ address_id?: string | null;
2036
2045
  }
2037
2046
 
2038
2047
  export interface ExternalCryptoData {
2048
+ id: string;
2039
2049
  address: string;
2040
2050
  currency_id: string;
2041
2051
  memo?: string | null;
@@ -2043,33 +2053,83 @@ export namespace API {
2043
2053
 
2044
2054
  export interface CounterpartyDestination {
2045
2055
  id: string;
2046
- type: string;
2056
+ counterparty_account_id: string;
2047
2057
  nickname?: string | null;
2058
+ type: string;
2059
+ external_banking_data_id?: string | null;
2060
+ external_crypto_data_id?: string | null;
2061
+ created_at: string;
2062
+ updated_at: string;
2063
+ deleted_at?: string | null;
2064
+ is_deleted?: boolean | null;
2048
2065
  counterparty_account: CounterpartyAccount;
2049
2066
  external_banking_data?: ExternalBankingData | null;
2050
2067
  external_crypto_data?: ExternalCryptoData | null;
2051
2068
  }
2052
2069
 
2070
+ export interface IntegrationVendorExtended extends API.VirtualAccounts.Programs.IntegrationVendor {
2071
+ type: string;
2072
+ }
2073
+
2074
+ export interface DepositInstructionAddress {
2075
+ address_line1: string;
2076
+ city: string;
2077
+ state: string;
2078
+ postal_code: string;
2079
+ country_code: string;
2080
+ }
2081
+
2082
+ export interface DepositInstruction {
2083
+ instruction_type: string;
2084
+ asset_type_id: string;
2085
+ account_number: string;
2086
+ routing_number?: string;
2087
+ account_routing_number?: string;
2088
+ institution_name: string;
2089
+ account_holder_name?: string;
2090
+ memo: string;
2091
+ institution_address?: DepositInstructionAddress;
2092
+ account_holder_address?: DepositInstructionAddress;
2093
+ }
2094
+
2095
+ export interface VirtualAccountAccountDetails {
2096
+ rail_account_id: string;
2097
+ rail_asset_type: string;
2098
+ rail_product_id: string;
2099
+ rail_customer_id: string;
2100
+ }
2101
+
2053
2102
  export interface VirtualAccountDetails {
2054
2103
  id: string;
2104
+ created_at: string;
2055
2105
  wallet_id: string;
2056
2106
  status: string;
2107
+ account_currency: string;
2108
+ destination_currency: string;
2109
+ destination_address?: string | null;
2110
+ va_programs_id: string;
2111
+ integration_vendor_id: string;
2057
2112
  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;
2113
+ vendor_status: string;
2114
+ current_balance: number;
2115
+ available_balance: number;
2116
+ customer_name: string;
2117
+ asset_type_id: string;
2118
+ deposit_type: string;
2119
+ meta?: Record<string, unknown>;
2120
+ account_details: VirtualAccountAccountDetails;
2121
+ deposit_instructions?: DepositInstruction[];
2122
+ account_currency_details: API.Currencies.SimplifiedCurrency;
2123
+ destination_currency_details: API.Currencies.SimplifiedCurrency;
2124
+ integration_vendor: IntegrationVendorExtended;
2125
+ }
2126
+
2127
+ export type OrderDetails = API.Orders.V2.List.ByWallet.OrderItem & {
2128
+ request_id: string;
2129
+ updated_at: string;
2130
+ wallet: API.Wallets.SimplifiedWallet;
2131
+ from_currency: API.Currencies.SimplifiedCurrency;
2132
+ to_currency: API.Currencies.SimplifiedCurrency;
2073
2133
  virtual_account?: VirtualAccountDetails | null;
2074
2134
  counterparty_destination?: CounterpartyDestination | null;
2075
2135
  };
@@ -2562,6 +2622,13 @@ export namespace API {
2562
2622
  }
2563
2623
 
2564
2624
  export namespace Wallets {
2625
+ // Упрощенная версия кошелька (используется в некоторых эндпоинтах)
2626
+ export interface SimplifiedWallet {
2627
+ uuid: string;
2628
+ user_id: string;
2629
+ tenant_id: string;
2630
+ }
2631
+
2565
2632
  export interface WallletBalanceCryptoDetails {
2566
2633
  uuid: string;
2567
2634
  amount: number;