squarefi-bff-api-module 1.29.3 → 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.
- package/dist/api/orders.d.ts +4 -0
- package/dist/api/orders.js +9 -0
- package/dist/api/types/types.d.ts +214 -0
- package/package.json +1 -1
- package/src/api/orders.ts +13 -0
- package/src/api/types/types.ts +245 -0
package/dist/api/orders.d.ts
CHANGED
|
@@ -41,5 +41,9 @@ export declare const orders: {
|
|
|
41
41
|
L2F_WIRE_OFFRAMP: (data: API.Orders.V2.Create.ByOrderType.L2F_WIRE_OFFRAMP.Request) => Promise<API.Orders.V2.Create.ByOrderType.L2F_WIRE_OFFRAMP.Response>;
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
|
+
list: {
|
|
45
|
+
byWallet: ({ wallet_uuid, ...params }: API.Orders.V2.List.ByWallet.Request) => Promise<API.Orders.V2.List.ByWallet.Response>;
|
|
46
|
+
};
|
|
47
|
+
getById: ({ order_uuid }: API.Orders.V2.GetById.Request) => Promise<API.Orders.V2.GetById.Response>;
|
|
44
48
|
};
|
|
45
49
|
};
|
package/dist/api/orders.js
CHANGED
|
@@ -94,5 +94,14 @@ exports.orders = {
|
|
|
94
94
|
[constants_1.OrderType.L2F_WIRE_OFFRAMP]: (data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/L2F_WIRE_OFFRAMP', { data }),
|
|
95
95
|
},
|
|
96
96
|
},
|
|
97
|
+
list: {
|
|
98
|
+
byWallet: (_a) => {
|
|
99
|
+
var { wallet_uuid } = _a, params = __rest(_a, ["wallet_uuid"]);
|
|
100
|
+
return apiClientFactory_1.apiClientV1.getRequest(`/v2/orders/list/${wallet_uuid}`, {
|
|
101
|
+
params,
|
|
102
|
+
});
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
getById: ({ order_uuid }) => apiClientFactory_1.apiClientV1.getRequest(`/v2/orders/id/${order_uuid}`),
|
|
97
106
|
},
|
|
98
107
|
};
|
|
@@ -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 {
|
|
@@ -1451,6 +1458,208 @@ export declare namespace API {
|
|
|
1451
1458
|
type Response = OrderInfo[];
|
|
1452
1459
|
}
|
|
1453
1460
|
}
|
|
1461
|
+
namespace List {
|
|
1462
|
+
namespace ByWallet {
|
|
1463
|
+
interface Request {
|
|
1464
|
+
wallet_uuid: string;
|
|
1465
|
+
offset?: number;
|
|
1466
|
+
limit?: number;
|
|
1467
|
+
sort_by?: string;
|
|
1468
|
+
sort_order?: 'asc' | 'desc';
|
|
1469
|
+
}
|
|
1470
|
+
interface PaymentOriginatorAddress {
|
|
1471
|
+
address_line1?: string | null;
|
|
1472
|
+
city?: string | null;
|
|
1473
|
+
state?: string | null;
|
|
1474
|
+
postal_code?: string | null;
|
|
1475
|
+
country?: string | null;
|
|
1476
|
+
}
|
|
1477
|
+
interface PaymentOriginatorProfile {
|
|
1478
|
+
name: string;
|
|
1479
|
+
address?: PaymentOriginatorAddress;
|
|
1480
|
+
}
|
|
1481
|
+
interface PaymentOriginatorAccountInfo {
|
|
1482
|
+
account_number: string;
|
|
1483
|
+
routing_number?: string | null;
|
|
1484
|
+
swift_bic?: string | null;
|
|
1485
|
+
institution_name?: string | null;
|
|
1486
|
+
}
|
|
1487
|
+
interface PaymentOriginator {
|
|
1488
|
+
profile: PaymentOriginatorProfile;
|
|
1489
|
+
account_information: PaymentOriginatorAccountInfo;
|
|
1490
|
+
reference?: string | null;
|
|
1491
|
+
memo?: string | null;
|
|
1492
|
+
}
|
|
1493
|
+
interface OrderMeta {
|
|
1494
|
+
order_uuid: string;
|
|
1495
|
+
request_id?: string | null;
|
|
1496
|
+
billing_amount?: number;
|
|
1497
|
+
billing_currency?: string;
|
|
1498
|
+
transaction_amount?: number;
|
|
1499
|
+
transaction_currency?: string;
|
|
1500
|
+
network_fee?: number | null;
|
|
1501
|
+
network_fee_currency?: string | null;
|
|
1502
|
+
exchange_rate?: number;
|
|
1503
|
+
fee?: number;
|
|
1504
|
+
fee_currency?: string;
|
|
1505
|
+
from_currency_id?: string;
|
|
1506
|
+
to_currency_id?: string;
|
|
1507
|
+
chain_id?: number | null;
|
|
1508
|
+
counterparty_destination_id?: string | null;
|
|
1509
|
+
counterparty_account_id?: string | null;
|
|
1510
|
+
counterparty_account_name?: string | null;
|
|
1511
|
+
counterparty_account_nickname?: string | null;
|
|
1512
|
+
virtual_account_id?: string | null;
|
|
1513
|
+
virtual_account_name?: string | null;
|
|
1514
|
+
to_crypto_address?: string | null;
|
|
1515
|
+
reference?: string | null;
|
|
1516
|
+
note?: string | null;
|
|
1517
|
+
order_id?: string | null;
|
|
1518
|
+
originator?: PaymentOriginator | null;
|
|
1519
|
+
sub_account_id?: string | null;
|
|
1520
|
+
to_address?: string | null;
|
|
1521
|
+
sub_account_currency?: string | null;
|
|
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;
|
|
1533
|
+
}
|
|
1534
|
+
interface OrderItem {
|
|
1535
|
+
id: string;
|
|
1536
|
+
order_uuid: string;
|
|
1537
|
+
request_id?: string | null;
|
|
1538
|
+
wallet_uuid: string;
|
|
1539
|
+
from_uuid: string;
|
|
1540
|
+
to_uuid: string;
|
|
1541
|
+
amount_from: number;
|
|
1542
|
+
amount_to: number;
|
|
1543
|
+
order_type: string;
|
|
1544
|
+
status: 'PENDING' | 'PROCESSING' | 'COMPLETE' | 'FAILED' | 'CANCELED';
|
|
1545
|
+
created_at: string;
|
|
1546
|
+
updated_at?: string | null;
|
|
1547
|
+
sub_account_id?: string | null;
|
|
1548
|
+
meta: OrderMeta;
|
|
1549
|
+
info?: string | null;
|
|
1550
|
+
}
|
|
1551
|
+
type Response = OrderItem[];
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
namespace GetById {
|
|
1555
|
+
interface Request {
|
|
1556
|
+
order_uuid: string;
|
|
1557
|
+
}
|
|
1558
|
+
type OrderMetaExtended = Omit<API.Orders.V2.List.ByWallet.OrderMeta, 'to_crypto_address' | 'sub_account_id' | 'to_address' | 'sub_account_currency' | 'crypto_transaction_hash'>;
|
|
1559
|
+
interface CounterpartyAccount {
|
|
1560
|
+
id: string;
|
|
1561
|
+
name: string;
|
|
1562
|
+
type: string;
|
|
1563
|
+
email?: string | null;
|
|
1564
|
+
phone?: string | null;
|
|
1565
|
+
wallet_id: string;
|
|
1566
|
+
}
|
|
1567
|
+
interface ExternalBankingData {
|
|
1568
|
+
id: string;
|
|
1569
|
+
account_number: string;
|
|
1570
|
+
routing_number?: string | null;
|
|
1571
|
+
bank_name: string;
|
|
1572
|
+
swift_bic?: string | null;
|
|
1573
|
+
iban?: string | null;
|
|
1574
|
+
note?: string | null;
|
|
1575
|
+
address_id?: string | null;
|
|
1576
|
+
}
|
|
1577
|
+
interface ExternalCryptoData {
|
|
1578
|
+
id: string;
|
|
1579
|
+
address: string;
|
|
1580
|
+
currency_id: string;
|
|
1581
|
+
memo?: string | null;
|
|
1582
|
+
}
|
|
1583
|
+
interface CounterpartyDestination {
|
|
1584
|
+
id: string;
|
|
1585
|
+
counterparty_account_id: string;
|
|
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;
|
|
1594
|
+
counterparty_account: CounterpartyAccount;
|
|
1595
|
+
external_banking_data?: ExternalBankingData | null;
|
|
1596
|
+
external_crypto_data?: ExternalCryptoData | null;
|
|
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
|
+
}
|
|
1626
|
+
interface VirtualAccountDetails {
|
|
1627
|
+
id: string;
|
|
1628
|
+
created_at: string;
|
|
1629
|
+
wallet_id: string;
|
|
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;
|
|
1636
|
+
vendor_account_id: string;
|
|
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;
|
|
1658
|
+
virtual_account?: VirtualAccountDetails | null;
|
|
1659
|
+
counterparty_destination?: CounterpartyDestination | null;
|
|
1660
|
+
};
|
|
1661
|
+
type Response = OrderDetails;
|
|
1662
|
+
}
|
|
1454
1663
|
}
|
|
1455
1664
|
}
|
|
1456
1665
|
namespace Persona {
|
|
@@ -1876,6 +2085,11 @@ export declare namespace API {
|
|
|
1876
2085
|
}
|
|
1877
2086
|
}
|
|
1878
2087
|
namespace Wallets {
|
|
2088
|
+
interface SimplifiedWallet {
|
|
2089
|
+
uuid: string;
|
|
2090
|
+
user_id: string;
|
|
2091
|
+
tenant_id: string;
|
|
2092
|
+
}
|
|
1879
2093
|
interface WallletBalanceCryptoDetails {
|
|
1880
2094
|
uuid: string;
|
|
1881
2095
|
amount: number;
|
package/package.json
CHANGED
package/src/api/orders.ts
CHANGED
|
@@ -238,5 +238,18 @@ export const orders = {
|
|
|
238
238
|
),
|
|
239
239
|
},
|
|
240
240
|
},
|
|
241
|
+
|
|
242
|
+
list: {
|
|
243
|
+
byWallet: ({
|
|
244
|
+
wallet_uuid,
|
|
245
|
+
...params
|
|
246
|
+
}: API.Orders.V2.List.ByWallet.Request): Promise<API.Orders.V2.List.ByWallet.Response> =>
|
|
247
|
+
apiClientV1.getRequest<API.Orders.V2.List.ByWallet.Response>(`/v2/orders/list/${wallet_uuid}`, {
|
|
248
|
+
params,
|
|
249
|
+
}),
|
|
250
|
+
},
|
|
251
|
+
|
|
252
|
+
getById: ({ order_uuid }: API.Orders.V2.GetById.Request): Promise<API.Orders.V2.GetById.Response> =>
|
|
253
|
+
apiClientV1.getRequest<API.Orders.V2.GetById.Response>(`/v2/orders/id/${order_uuid}`),
|
|
241
254
|
},
|
|
242
255
|
};
|
package/src/api/types/types.ts
CHANGED
|
@@ -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 {
|
|
@@ -1905,6 +1914,235 @@ export namespace API {
|
|
|
1905
1914
|
export type Response = OrderInfo[];
|
|
1906
1915
|
}
|
|
1907
1916
|
}
|
|
1917
|
+
|
|
1918
|
+
export namespace List {
|
|
1919
|
+
export namespace ByWallet {
|
|
1920
|
+
export interface Request {
|
|
1921
|
+
wallet_uuid: string;
|
|
1922
|
+
offset?: number;
|
|
1923
|
+
limit?: number;
|
|
1924
|
+
sort_by?: string;
|
|
1925
|
+
sort_order?: 'asc' | 'desc';
|
|
1926
|
+
}
|
|
1927
|
+
|
|
1928
|
+
export interface PaymentOriginatorAddress {
|
|
1929
|
+
address_line1?: string | null;
|
|
1930
|
+
city?: string | null;
|
|
1931
|
+
state?: string | null;
|
|
1932
|
+
postal_code?: string | null;
|
|
1933
|
+
country?: string | null;
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1936
|
+
export interface PaymentOriginatorProfile {
|
|
1937
|
+
name: string;
|
|
1938
|
+
address?: PaymentOriginatorAddress;
|
|
1939
|
+
}
|
|
1940
|
+
|
|
1941
|
+
export interface PaymentOriginatorAccountInfo {
|
|
1942
|
+
account_number: string;
|
|
1943
|
+
routing_number?: string | null;
|
|
1944
|
+
swift_bic?: string | null;
|
|
1945
|
+
institution_name?: string | null;
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
export interface PaymentOriginator {
|
|
1949
|
+
profile: PaymentOriginatorProfile;
|
|
1950
|
+
account_information: PaymentOriginatorAccountInfo;
|
|
1951
|
+
reference?: string | null;
|
|
1952
|
+
memo?: string | null;
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
|
+
export interface OrderMeta {
|
|
1956
|
+
order_uuid: string;
|
|
1957
|
+
request_id?: string | null;
|
|
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
|
|
1964
|
+
network_fee?: number | null;
|
|
1965
|
+
network_fee_currency?: string | null;
|
|
1966
|
+
exchange_rate?: number;
|
|
1967
|
+
fee?: number;
|
|
1968
|
+
fee_currency?: string;
|
|
1969
|
+
from_currency_id?: string;
|
|
1970
|
+
to_currency_id?: string;
|
|
1971
|
+
chain_id?: number | null;
|
|
1972
|
+
counterparty_destination_id?: string | null;
|
|
1973
|
+
counterparty_account_id?: string | null;
|
|
1974
|
+
counterparty_account_name?: string | null;
|
|
1975
|
+
counterparty_account_nickname?: string | null;
|
|
1976
|
+
virtual_account_id?: string | null;
|
|
1977
|
+
virtual_account_name?: string | null;
|
|
1978
|
+
to_crypto_address?: string | null;
|
|
1979
|
+
reference?: string | null;
|
|
1980
|
+
note?: string | null;
|
|
1981
|
+
order_id?: string | null;
|
|
1982
|
+
originator?: PaymentOriginator | null;
|
|
1983
|
+
sub_account_id?: string | null;
|
|
1984
|
+
to_address?: string | null;
|
|
1985
|
+
sub_account_currency?: string | null;
|
|
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;
|
|
1998
|
+
}
|
|
1999
|
+
|
|
2000
|
+
export interface OrderItem {
|
|
2001
|
+
id: string;
|
|
2002
|
+
order_uuid: string;
|
|
2003
|
+
request_id?: string | null;
|
|
2004
|
+
wallet_uuid: string;
|
|
2005
|
+
from_uuid: string;
|
|
2006
|
+
to_uuid: string;
|
|
2007
|
+
amount_from: number;
|
|
2008
|
+
amount_to: number;
|
|
2009
|
+
order_type: string;
|
|
2010
|
+
status: 'PENDING' | 'PROCESSING' | 'COMPLETE' | 'FAILED' | 'CANCELED';
|
|
2011
|
+
created_at: string;
|
|
2012
|
+
updated_at?: string | null;
|
|
2013
|
+
sub_account_id?: string | null;
|
|
2014
|
+
meta: OrderMeta;
|
|
2015
|
+
info?: string | null;
|
|
2016
|
+
}
|
|
2017
|
+
|
|
2018
|
+
export type Response = OrderItem[];
|
|
2019
|
+
}
|
|
2020
|
+
}
|
|
2021
|
+
|
|
2022
|
+
export namespace GetById {
|
|
2023
|
+
export interface Request {
|
|
2024
|
+
order_uuid: string;
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
export type OrderMetaExtended = Omit<
|
|
2028
|
+
API.Orders.V2.List.ByWallet.OrderMeta,
|
|
2029
|
+
'to_crypto_address' | 'sub_account_id' | 'to_address' | 'sub_account_currency' | 'crypto_transaction_hash'
|
|
2030
|
+
>;
|
|
2031
|
+
|
|
2032
|
+
export interface CounterpartyAccount {
|
|
2033
|
+
id: string;
|
|
2034
|
+
name: string;
|
|
2035
|
+
type: string;
|
|
2036
|
+
email?: string | null;
|
|
2037
|
+
phone?: string | null;
|
|
2038
|
+
wallet_id: string;
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2041
|
+
export interface ExternalBankingData {
|
|
2042
|
+
id: string;
|
|
2043
|
+
account_number: string;
|
|
2044
|
+
routing_number?: string | null;
|
|
2045
|
+
bank_name: string;
|
|
2046
|
+
swift_bic?: string | null;
|
|
2047
|
+
iban?: string | null;
|
|
2048
|
+
note?: string | null;
|
|
2049
|
+
address_id?: string | null;
|
|
2050
|
+
}
|
|
2051
|
+
|
|
2052
|
+
export interface ExternalCryptoData {
|
|
2053
|
+
id: string;
|
|
2054
|
+
address: string;
|
|
2055
|
+
currency_id: string;
|
|
2056
|
+
memo?: string | null;
|
|
2057
|
+
}
|
|
2058
|
+
|
|
2059
|
+
export interface CounterpartyDestination {
|
|
2060
|
+
id: string;
|
|
2061
|
+
counterparty_account_id: string;
|
|
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;
|
|
2070
|
+
counterparty_account: CounterpartyAccount;
|
|
2071
|
+
external_banking_data?: ExternalBankingData | null;
|
|
2072
|
+
external_crypto_data?: ExternalCryptoData | null;
|
|
2073
|
+
}
|
|
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
|
+
|
|
2107
|
+
export interface VirtualAccountDetails {
|
|
2108
|
+
id: string;
|
|
2109
|
+
created_at: string;
|
|
2110
|
+
wallet_id: string;
|
|
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;
|
|
2117
|
+
vendor_account_id: string;
|
|
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;
|
|
2140
|
+
virtual_account?: VirtualAccountDetails | null;
|
|
2141
|
+
counterparty_destination?: CounterpartyDestination | null;
|
|
2142
|
+
};
|
|
2143
|
+
|
|
2144
|
+
export type Response = OrderDetails;
|
|
2145
|
+
}
|
|
1908
2146
|
}
|
|
1909
2147
|
}
|
|
1910
2148
|
|
|
@@ -2391,6 +2629,13 @@ export namespace API {
|
|
|
2391
2629
|
}
|
|
2392
2630
|
|
|
2393
2631
|
export namespace Wallets {
|
|
2632
|
+
// Упрощенная версия кошелька (используется в некоторых эндпоинтах)
|
|
2633
|
+
export interface SimplifiedWallet {
|
|
2634
|
+
uuid: string;
|
|
2635
|
+
user_id: string;
|
|
2636
|
+
tenant_id: string;
|
|
2637
|
+
}
|
|
2638
|
+
|
|
2394
2639
|
export interface WallletBalanceCryptoDetails {
|
|
2395
2640
|
uuid: string;
|
|
2396
2641
|
amount: number;
|