squarefi-bff-api-module 1.24.17 → 1.24.19
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/frontend.d.ts +11 -0
- package/dist/api/frontend.js +14 -0
- package/dist/api/types/types.d.ts +70 -24
- package/package.json +1 -1
- package/src/api/frontend.ts +20 -0
- package/src/api/types/types.ts +74 -24
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { API } from './types/types';
|
|
2
|
+
export declare const frontend: {
|
|
3
|
+
access: {
|
|
4
|
+
keys: {
|
|
5
|
+
create: (data: API.Frontend.Access.Keys.Create.Request) => Promise<API.Frontend.Access.Keys.Create.Response>;
|
|
6
|
+
list: () => Promise<API.Frontend.Access.Keys.List.Response>;
|
|
7
|
+
regenerate: (key_id: string) => Promise<API.Frontend.Access.Keys.Regenerate.Response>;
|
|
8
|
+
revoke: (key_id: string) => Promise<API.Frontend.Access.Keys.Revoke.Response>;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.frontend = void 0;
|
|
4
|
+
const apiClientFactory_1 = require("../utils/apiClientFactory");
|
|
5
|
+
exports.frontend = {
|
|
6
|
+
access: {
|
|
7
|
+
keys: {
|
|
8
|
+
create: (data) => apiClientFactory_1.apiClientV1.postRequest('/frontend/access/keys', { data }),
|
|
9
|
+
list: () => apiClientFactory_1.apiClientV1.getRequest('/frontend/access/keys'),
|
|
10
|
+
regenerate: (key_id) => apiClientFactory_1.apiClientV1.postRequest(`/frontend/access/keys/${key_id}/regenerate`),
|
|
11
|
+
revoke: (key_id) => apiClientFactory_1.apiClientV1.deleteRequest(`/frontend/access/keys/${key_id}`),
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
};
|
|
@@ -643,6 +643,52 @@ export declare namespace API {
|
|
|
643
643
|
onramp_enabled: boolean;
|
|
644
644
|
}
|
|
645
645
|
}
|
|
646
|
+
namespace Frontend {
|
|
647
|
+
namespace Access {
|
|
648
|
+
namespace Keys {
|
|
649
|
+
interface Key {
|
|
650
|
+
id: string;
|
|
651
|
+
key: string;
|
|
652
|
+
name: string;
|
|
653
|
+
role: APIKeyRole;
|
|
654
|
+
wallet_id: string;
|
|
655
|
+
created_at: string;
|
|
656
|
+
}
|
|
657
|
+
namespace Create {
|
|
658
|
+
type Request = {
|
|
659
|
+
name: string;
|
|
660
|
+
role: APIKeyRole;
|
|
661
|
+
wallet_id: string;
|
|
662
|
+
};
|
|
663
|
+
type Response = {
|
|
664
|
+
success: boolean;
|
|
665
|
+
data: API.Frontend.Access.Keys.Key;
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
namespace List {
|
|
669
|
+
type Response = {
|
|
670
|
+
success: boolean;
|
|
671
|
+
data: API.Frontend.Access.Keys.Key[];
|
|
672
|
+
};
|
|
673
|
+
}
|
|
674
|
+
namespace Regenerate {
|
|
675
|
+
type Response = {
|
|
676
|
+
success: boolean;
|
|
677
|
+
data: API.Frontend.Access.Keys.Key;
|
|
678
|
+
};
|
|
679
|
+
}
|
|
680
|
+
namespace Revoke {
|
|
681
|
+
type Response = {
|
|
682
|
+
success: boolean;
|
|
683
|
+
data: {
|
|
684
|
+
id: string;
|
|
685
|
+
revoked_at: string;
|
|
686
|
+
};
|
|
687
|
+
};
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
}
|
|
646
692
|
namespace SubAccountsV2 {
|
|
647
693
|
type SubAccountDetails = {
|
|
648
694
|
iban: string;
|
|
@@ -1466,8 +1512,8 @@ export declare namespace API {
|
|
|
1466
1512
|
to_wallet_uuid: string;
|
|
1467
1513
|
amount: number;
|
|
1468
1514
|
request_id: string;
|
|
1469
|
-
is_subtract
|
|
1470
|
-
is_reverse
|
|
1515
|
+
is_subtract: boolean;
|
|
1516
|
+
is_reverse: boolean;
|
|
1471
1517
|
}
|
|
1472
1518
|
type Response = null;
|
|
1473
1519
|
}
|
|
@@ -1479,8 +1525,8 @@ export declare namespace API {
|
|
|
1479
1525
|
wallet_id: string;
|
|
1480
1526
|
from_currency_id: string;
|
|
1481
1527
|
to_currency_id: string;
|
|
1482
|
-
is_subtract
|
|
1483
|
-
is_reverse
|
|
1528
|
+
is_subtract: boolean;
|
|
1529
|
+
is_reverse: boolean;
|
|
1484
1530
|
}
|
|
1485
1531
|
interface Response {
|
|
1486
1532
|
order_uuid: string;
|
|
@@ -1515,8 +1561,8 @@ export declare namespace API {
|
|
|
1515
1561
|
wallet_id: string;
|
|
1516
1562
|
from_currency_id: string;
|
|
1517
1563
|
to_currency_id: string;
|
|
1518
|
-
is_subtract
|
|
1519
|
-
is_reverse
|
|
1564
|
+
is_subtract: boolean;
|
|
1565
|
+
is_reverse: boolean;
|
|
1520
1566
|
}
|
|
1521
1567
|
interface Response {
|
|
1522
1568
|
order_uuid: string;
|
|
@@ -1551,8 +1597,8 @@ export declare namespace API {
|
|
|
1551
1597
|
wallet_id: string;
|
|
1552
1598
|
from_currency_id: string;
|
|
1553
1599
|
to_currency_id: string;
|
|
1554
|
-
is_subtract
|
|
1555
|
-
is_reverse
|
|
1600
|
+
is_subtract: boolean;
|
|
1601
|
+
is_reverse: boolean;
|
|
1556
1602
|
}
|
|
1557
1603
|
interface Response {
|
|
1558
1604
|
order_uuid: string;
|
|
@@ -1589,8 +1635,8 @@ export declare namespace API {
|
|
|
1589
1635
|
to_currency_id: string;
|
|
1590
1636
|
refference?: string;
|
|
1591
1637
|
note?: string;
|
|
1592
|
-
is_subtract
|
|
1593
|
-
is_reverse
|
|
1638
|
+
is_subtract: boolean;
|
|
1639
|
+
is_reverse: boolean;
|
|
1594
1640
|
}
|
|
1595
1641
|
interface Response {
|
|
1596
1642
|
order_uuid: string;
|
|
@@ -1627,8 +1673,8 @@ export declare namespace API {
|
|
|
1627
1673
|
to_currency_id: string;
|
|
1628
1674
|
refference?: string;
|
|
1629
1675
|
note?: string;
|
|
1630
|
-
is_subtract
|
|
1631
|
-
is_reverse
|
|
1676
|
+
is_subtract: boolean;
|
|
1677
|
+
is_reverse: boolean;
|
|
1632
1678
|
}
|
|
1633
1679
|
interface Response {
|
|
1634
1680
|
order_uuid: string;
|
|
@@ -1665,8 +1711,8 @@ export declare namespace API {
|
|
|
1665
1711
|
to_currency_id: string;
|
|
1666
1712
|
refference?: string;
|
|
1667
1713
|
note?: string;
|
|
1668
|
-
is_subtract
|
|
1669
|
-
is_reverse
|
|
1714
|
+
is_subtract: boolean;
|
|
1715
|
+
is_reverse: boolean;
|
|
1670
1716
|
}
|
|
1671
1717
|
interface Response {
|
|
1672
1718
|
order_uuid: string;
|
|
@@ -1701,8 +1747,8 @@ export declare namespace API {
|
|
|
1701
1747
|
wallet_id: string;
|
|
1702
1748
|
from_currency_id: string;
|
|
1703
1749
|
to_currency_id: string;
|
|
1704
|
-
is_subtract
|
|
1705
|
-
is_reverse
|
|
1750
|
+
is_subtract: boolean;
|
|
1751
|
+
is_reverse: boolean;
|
|
1706
1752
|
}
|
|
1707
1753
|
interface Response {
|
|
1708
1754
|
order_uuid: string;
|
|
@@ -1738,8 +1784,8 @@ export declare namespace API {
|
|
|
1738
1784
|
wallet_account_id: string;
|
|
1739
1785
|
from_currency_id: string;
|
|
1740
1786
|
note?: string;
|
|
1741
|
-
is_subtract
|
|
1742
|
-
is_reverse
|
|
1787
|
+
is_subtract: boolean;
|
|
1788
|
+
is_reverse: boolean;
|
|
1743
1789
|
}
|
|
1744
1790
|
interface Response {
|
|
1745
1791
|
created_at: string;
|
|
@@ -1777,8 +1823,8 @@ export declare namespace API {
|
|
|
1777
1823
|
wallet_account_id: string;
|
|
1778
1824
|
from_currency_id: string;
|
|
1779
1825
|
note?: string;
|
|
1780
|
-
is_subtract
|
|
1781
|
-
is_reverse
|
|
1826
|
+
is_subtract: boolean;
|
|
1827
|
+
is_reverse: boolean;
|
|
1782
1828
|
}
|
|
1783
1829
|
interface Response {
|
|
1784
1830
|
created_at: string;
|
|
@@ -1816,8 +1862,8 @@ export declare namespace API {
|
|
|
1816
1862
|
wallet_account_id: string;
|
|
1817
1863
|
from_currency_id: string;
|
|
1818
1864
|
note?: string;
|
|
1819
|
-
is_subtract
|
|
1820
|
-
is_reverse
|
|
1865
|
+
is_subtract: boolean;
|
|
1866
|
+
is_reverse: boolean;
|
|
1821
1867
|
}
|
|
1822
1868
|
interface Response {
|
|
1823
1869
|
created_at: string;
|
|
@@ -1854,8 +1900,8 @@ export declare namespace API {
|
|
|
1854
1900
|
wallet_id: string;
|
|
1855
1901
|
from_currency_id: string;
|
|
1856
1902
|
to_currency_id: string;
|
|
1857
|
-
is_subtract
|
|
1858
|
-
is_reverse
|
|
1903
|
+
is_subtract: boolean;
|
|
1904
|
+
is_reverse: boolean;
|
|
1859
1905
|
}
|
|
1860
1906
|
interface Response {
|
|
1861
1907
|
order_uuid: string;
|
package/package.json
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { create } from 'domain';
|
|
2
|
+
import { apiClientV1 } from '../utils/apiClientFactory';
|
|
3
|
+
import { API } from './types/types';
|
|
4
|
+
|
|
5
|
+
export const frontend = {
|
|
6
|
+
access: {
|
|
7
|
+
keys: {
|
|
8
|
+
create: (data: API.Frontend.Access.Keys.Create.Request): Promise<API.Frontend.Access.Keys.Create.Response> =>
|
|
9
|
+
apiClientV1.postRequest<API.Frontend.Access.Keys.Create.Response>('/frontend/access/keys', { data }),
|
|
10
|
+
list: (): Promise<API.Frontend.Access.Keys.List.Response> =>
|
|
11
|
+
apiClientV1.getRequest<API.Frontend.Access.Keys.List.Response>('/frontend/access/keys'),
|
|
12
|
+
regenerate: (key_id: string): Promise<API.Frontend.Access.Keys.Regenerate.Response> =>
|
|
13
|
+
apiClientV1.postRequest<API.Frontend.Access.Keys.Regenerate.Response>(
|
|
14
|
+
`/frontend/access/keys/${key_id}/regenerate`
|
|
15
|
+
),
|
|
16
|
+
revoke: (key_id: string): Promise<API.Frontend.Access.Keys.Revoke.Response> =>
|
|
17
|
+
apiClientV1.deleteRequest(`/frontend/access/keys/${key_id}`),
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
package/src/api/types/types.ts
CHANGED
|
@@ -790,6 +790,56 @@ export namespace API {
|
|
|
790
790
|
}
|
|
791
791
|
}
|
|
792
792
|
|
|
793
|
+
export namespace Frontend {
|
|
794
|
+
export namespace Access {
|
|
795
|
+
export namespace Keys {
|
|
796
|
+
export interface Key {
|
|
797
|
+
id: string;
|
|
798
|
+
key: string;
|
|
799
|
+
name: string;
|
|
800
|
+
role: APIKeyRole;
|
|
801
|
+
wallet_id: string;
|
|
802
|
+
created_at: string;
|
|
803
|
+
}
|
|
804
|
+
export namespace Create {
|
|
805
|
+
export type Request = {
|
|
806
|
+
name: string;
|
|
807
|
+
role: APIKeyRole;
|
|
808
|
+
wallet_id: string;
|
|
809
|
+
};
|
|
810
|
+
export type Response = {
|
|
811
|
+
success: boolean;
|
|
812
|
+
data: API.Frontend.Access.Keys.Key;
|
|
813
|
+
};
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
export namespace List {
|
|
817
|
+
export type Response = {
|
|
818
|
+
success: boolean;
|
|
819
|
+
data: API.Frontend.Access.Keys.Key[];
|
|
820
|
+
};
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
export namespace Regenerate {
|
|
824
|
+
export type Response = {
|
|
825
|
+
success: boolean;
|
|
826
|
+
data: API.Frontend.Access.Keys.Key;
|
|
827
|
+
};
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
export namespace Revoke {
|
|
831
|
+
export type Response = {
|
|
832
|
+
success: boolean;
|
|
833
|
+
data: {
|
|
834
|
+
id: string;
|
|
835
|
+
revoked_at: string;
|
|
836
|
+
};
|
|
837
|
+
};
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
|
|
793
843
|
export namespace SubAccountsV2 {
|
|
794
844
|
export type SubAccountDetails = {
|
|
795
845
|
iban: string;
|
|
@@ -1778,8 +1828,8 @@ export namespace API {
|
|
|
1778
1828
|
to_wallet_uuid: string;
|
|
1779
1829
|
amount: number;
|
|
1780
1830
|
request_id: string;
|
|
1781
|
-
is_subtract
|
|
1782
|
-
is_reverse
|
|
1831
|
+
is_subtract: boolean;
|
|
1832
|
+
is_reverse: boolean;
|
|
1783
1833
|
}
|
|
1784
1834
|
|
|
1785
1835
|
export type Response = null;
|
|
@@ -1793,8 +1843,8 @@ export namespace API {
|
|
|
1793
1843
|
wallet_id: string;
|
|
1794
1844
|
from_currency_id: string;
|
|
1795
1845
|
to_currency_id: string;
|
|
1796
|
-
is_subtract
|
|
1797
|
-
is_reverse
|
|
1846
|
+
is_subtract: boolean;
|
|
1847
|
+
is_reverse: boolean;
|
|
1798
1848
|
}
|
|
1799
1849
|
|
|
1800
1850
|
export interface Response {
|
|
@@ -1832,8 +1882,8 @@ export namespace API {
|
|
|
1832
1882
|
wallet_id: string;
|
|
1833
1883
|
from_currency_id: string;
|
|
1834
1884
|
to_currency_id: string;
|
|
1835
|
-
is_subtract
|
|
1836
|
-
is_reverse
|
|
1885
|
+
is_subtract: boolean;
|
|
1886
|
+
is_reverse: boolean;
|
|
1837
1887
|
}
|
|
1838
1888
|
|
|
1839
1889
|
export interface Response {
|
|
@@ -1871,8 +1921,8 @@ export namespace API {
|
|
|
1871
1921
|
wallet_id: string;
|
|
1872
1922
|
from_currency_id: string;
|
|
1873
1923
|
to_currency_id: string;
|
|
1874
|
-
is_subtract
|
|
1875
|
-
is_reverse
|
|
1924
|
+
is_subtract: boolean;
|
|
1925
|
+
is_reverse: boolean;
|
|
1876
1926
|
}
|
|
1877
1927
|
|
|
1878
1928
|
export interface Response {
|
|
@@ -1911,8 +1961,8 @@ export namespace API {
|
|
|
1911
1961
|
to_currency_id: string;
|
|
1912
1962
|
refference?: string;
|
|
1913
1963
|
note?: string;
|
|
1914
|
-
is_subtract
|
|
1915
|
-
is_reverse
|
|
1964
|
+
is_subtract: boolean;
|
|
1965
|
+
is_reverse: boolean;
|
|
1916
1966
|
}
|
|
1917
1967
|
|
|
1918
1968
|
export interface Response {
|
|
@@ -1951,8 +2001,8 @@ export namespace API {
|
|
|
1951
2001
|
to_currency_id: string;
|
|
1952
2002
|
refference?: string;
|
|
1953
2003
|
note?: string;
|
|
1954
|
-
is_subtract
|
|
1955
|
-
is_reverse
|
|
2004
|
+
is_subtract: boolean;
|
|
2005
|
+
is_reverse: boolean;
|
|
1956
2006
|
}
|
|
1957
2007
|
|
|
1958
2008
|
export interface Response {
|
|
@@ -1991,8 +2041,8 @@ export namespace API {
|
|
|
1991
2041
|
to_currency_id: string;
|
|
1992
2042
|
refference?: string;
|
|
1993
2043
|
note?: string;
|
|
1994
|
-
is_subtract
|
|
1995
|
-
is_reverse
|
|
2044
|
+
is_subtract: boolean;
|
|
2045
|
+
is_reverse: boolean;
|
|
1996
2046
|
}
|
|
1997
2047
|
|
|
1998
2048
|
export interface Response {
|
|
@@ -2028,8 +2078,8 @@ export namespace API {
|
|
|
2028
2078
|
wallet_id: string;
|
|
2029
2079
|
from_currency_id: string;
|
|
2030
2080
|
to_currency_id: string;
|
|
2031
|
-
is_subtract
|
|
2032
|
-
is_reverse
|
|
2081
|
+
is_subtract: boolean;
|
|
2082
|
+
is_reverse: boolean;
|
|
2033
2083
|
}
|
|
2034
2084
|
|
|
2035
2085
|
export interface Response {
|
|
@@ -2067,8 +2117,8 @@ export namespace API {
|
|
|
2067
2117
|
wallet_account_id: string;
|
|
2068
2118
|
from_currency_id: string;
|
|
2069
2119
|
note?: string;
|
|
2070
|
-
is_subtract
|
|
2071
|
-
is_reverse
|
|
2120
|
+
is_subtract: boolean;
|
|
2121
|
+
is_reverse: boolean;
|
|
2072
2122
|
}
|
|
2073
2123
|
|
|
2074
2124
|
export interface Response {
|
|
@@ -2107,8 +2157,8 @@ export namespace API {
|
|
|
2107
2157
|
wallet_account_id: string;
|
|
2108
2158
|
from_currency_id: string;
|
|
2109
2159
|
note?: string;
|
|
2110
|
-
is_subtract
|
|
2111
|
-
is_reverse
|
|
2160
|
+
is_subtract: boolean;
|
|
2161
|
+
is_reverse: boolean;
|
|
2112
2162
|
}
|
|
2113
2163
|
|
|
2114
2164
|
export interface Response {
|
|
@@ -2147,8 +2197,8 @@ export namespace API {
|
|
|
2147
2197
|
wallet_account_id: string;
|
|
2148
2198
|
from_currency_id: string;
|
|
2149
2199
|
note?: string;
|
|
2150
|
-
is_subtract
|
|
2151
|
-
is_reverse
|
|
2200
|
+
is_subtract: boolean;
|
|
2201
|
+
is_reverse: boolean;
|
|
2152
2202
|
}
|
|
2153
2203
|
|
|
2154
2204
|
export interface Response {
|
|
@@ -2186,8 +2236,8 @@ export namespace API {
|
|
|
2186
2236
|
wallet_id: string;
|
|
2187
2237
|
from_currency_id: string;
|
|
2188
2238
|
to_currency_id: string;
|
|
2189
|
-
is_subtract
|
|
2190
|
-
is_reverse
|
|
2239
|
+
is_subtract: boolean;
|
|
2240
|
+
is_reverse: boolean;
|
|
2191
2241
|
}
|
|
2192
2242
|
|
|
2193
2243
|
export interface Response {
|