squarefi-bff-api-module 1.31.6 → 1.32.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.
Files changed (79) hide show
  1. package/package.json +10 -3
  2. package/src/api/types/autogen/apiV2.types.ts +117 -2
  3. package/tsconfig.json +3 -3
  4. package/dist/api/auth.d.ts +0 -29
  5. package/dist/api/auth.js +0 -76
  6. package/dist/api/bank-data.d.ts +0 -4
  7. package/dist/api/bank-data.js +0 -9
  8. package/dist/api/counterparties.d.ts +0 -14
  9. package/dist/api/counterparties.js +0 -48
  10. package/dist/api/developer.d.ts +0 -12
  11. package/dist/api/developer.js +0 -15
  12. package/dist/api/exchange.d.ts +0 -14
  13. package/dist/api/exchange.js +0 -23
  14. package/dist/api/frontend.d.ts +0 -11
  15. package/dist/api/frontend.js +0 -14
  16. package/dist/api/index.d.ts +0 -38
  17. package/dist/api/index.js +0 -39
  18. package/dist/api/issuing.d.ts +0 -64
  19. package/dist/api/issuing.js +0 -157
  20. package/dist/api/kyc.d.ts +0 -21
  21. package/dist/api/kyc.js +0 -24
  22. package/dist/api/list.d.ts +0 -16
  23. package/dist/api/list.js +0 -19
  24. package/dist/api/orders.d.ts +0 -49
  25. package/dist/api/orders.js +0 -107
  26. package/dist/api/persona.d.ts +0 -7
  27. package/dist/api/persona.js +0 -10
  28. package/dist/api/storage.d.ts +0 -8
  29. package/dist/api/storage.js +0 -19
  30. package/dist/api/tenants.d.ts +0 -6
  31. package/dist/api/tenants.js +0 -9
  32. package/dist/api/totp.d.ts +0 -17
  33. package/dist/api/totp.js +0 -48
  34. package/dist/api/types/autogen/apiV2.types.d.ts +0 -4729
  35. package/dist/api/types/autogen/apiV2.types.js +0 -6
  36. package/dist/api/types/types.d.ts +0 -2258
  37. package/dist/api/types/types.js +0 -2
  38. package/dist/api/user.d.ts +0 -18
  39. package/dist/api/user.js +0 -21
  40. package/dist/api/virtual-accounts.d.ts +0 -9
  41. package/dist/api/virtual-accounts.js +0 -26
  42. package/dist/api/wallets.d.ts +0 -24
  43. package/dist/api/wallets.js +0 -56
  44. package/dist/constants.d.ts +0 -303
  45. package/dist/constants.js +0 -335
  46. package/dist/hooks/index.d.ts +0 -3
  47. package/dist/hooks/index.js +0 -19
  48. package/dist/hooks/useCalc.d.ts +0 -25
  49. package/dist/hooks/useCalc.js +0 -129
  50. package/dist/hooks/useFileUpload.d.ts +0 -49
  51. package/dist/hooks/useFileUpload.js +0 -113
  52. package/dist/hooks/useSupabaseSubscription/config.d.ts +0 -2
  53. package/dist/hooks/useSupabaseSubscription/config.js +0 -9
  54. package/dist/hooks/useSupabaseSubscription/index.d.ts +0 -3
  55. package/dist/hooks/useSupabaseSubscription/index.js +0 -7
  56. package/dist/hooks/useSupabaseSubscription/specialized.d.ts +0 -5
  57. package/dist/hooks/useSupabaseSubscription/specialized.js +0 -21
  58. package/dist/hooks/useSupabaseSubscription/types.d.ts +0 -16
  59. package/dist/hooks/useSupabaseSubscription/types.js +0 -2
  60. package/dist/hooks/useSupabaseSubscription/useSupabaseSubscription.d.ts +0 -5
  61. package/dist/hooks/useSupabaseSubscription/useSupabaseSubscription.js +0 -36
  62. package/dist/hooks/useUserFiles.d.ts +0 -49
  63. package/dist/hooks/useUserFiles.js +0 -118
  64. package/dist/index.d.ts +0 -7
  65. package/dist/index.js +0 -26
  66. package/dist/utils/apiClientFactory.d.ts +0 -31
  67. package/dist/utils/apiClientFactory.js +0 -155
  68. package/dist/utils/converters.d.ts +0 -1
  69. package/dist/utils/converters.js +0 -5
  70. package/dist/utils/encrypt.d.ts +0 -10
  71. package/dist/utils/encrypt.js +0 -95
  72. package/dist/utils/fileStorage.d.ts +0 -113
  73. package/dist/utils/fileStorage.js +0 -344
  74. package/dist/utils/storage.d.ts +0 -3
  75. package/dist/utils/storage.js +0 -30
  76. package/dist/utils/supabase.d.ts +0 -1
  77. package/dist/utils/supabase.js +0 -15
  78. package/dist/utils/tokensFactory.d.ts +0 -12
  79. package/dist/utils/tokensFactory.js +0 -60
@@ -1,64 +0,0 @@
1
- import { API } from './types/types';
2
- export declare const issuing: {
3
- cards: {
4
- create: {
5
- standAloneCard: {
6
- prepaid: (data: API.Cards.Create.StandAloneRequest) => Promise<API.Cards.Create.StandAloneResponse>;
7
- balance: (data: API.Cards.Create.StandAloneRequest) => Promise<API.Cards.Create.ExtendedSubAccountResponse>;
8
- };
9
- subAccountCard: (data: API.Cards.Create.SubAccountRequest) => Promise<API.Cards.Create.ExtendedSubAccountResponse>;
10
- };
11
- byWalletUuid: {
12
- getAll: (params: API.Cards.CardsList.Request.ByWalletUuid) => Promise<API.Cards.CardsList.Response>;
13
- getBySubaccountType: (params: API.Cards.CardsList.Request.BySubaccountAndWalletUuid) => Promise<API.Cards.CardsList.Response>;
14
- getBySubAccount: (params: API.Cards.CardsList.Request.BySubAccountAndWalletId) => Promise<API.Cards.CardsList.Response>;
15
- };
16
- getById: (card_id: string) => Promise<API.Cards.IssuingCardDetailItem>;
17
- sensitiveData: {
18
- encrypted: {
19
- secretKey: {
20
- get: (card_id: string) => Promise<API.Cards.SensitiveData>;
21
- };
22
- };
23
- otp: {
24
- get: (card_id: string) => Promise<API.Cards.OTP>;
25
- };
26
- };
27
- freeze: (card_id: string) => Promise<API.Cards.IssuingCardDetailItem>;
28
- unfreeze: (card_id: string) => Promise<API.Cards.IssuingCardDetailItem>;
29
- close: (card_id: string) => Promise<void>;
30
- limits: {
31
- update: (card_id: string, data: API.Cards.Limits.UpdateRequest) => Promise<API.Cards.IssuingCardDetailItem>;
32
- };
33
- rename: (card_id: string, nick_name: string) => Promise<API.Cards.IssuingCardDetailItem>;
34
- };
35
- transactions: {
36
- getByCardId: (card_id: string, limit?: number, offset?: number) => Promise<API.Cards.TransactionsList>;
37
- getBySubAccountId: (fiat_account_id: string, limit?: number, offset?: number) => Promise<API.Cards.TransactionsList>;
38
- csv: {
39
- getByCardId: (card_id: string) => Promise<string>;
40
- getBySubAccountId: (sub_account_id: string) => Promise<string>;
41
- };
42
- };
43
- sub_accounts: {
44
- list: {
45
- withCards: {
46
- getSinglecards: (wallet_uuid: string, limit: number, offset: number) => Promise<API.Issuing.SubAccounts.WithCards.Response>;
47
- getAll: (wallet_uuid: string, limit: number, offset: number) => Promise<API.Issuing.SubAccounts.WithCards.Response>;
48
- };
49
- withoutCards: {
50
- getAll: ({ wallet_uuid, ...params }: API.Issuing.SubAccounts.WithoutCards.Request) => Promise<API.Issuing.SubAccounts.WithoutCards.Response>;
51
- };
52
- };
53
- getByUuid: (uuid: string) => Promise<API.Issuing.SubAccounts.SubAccount>;
54
- create: (wallet_id: string, program_id: string) => Promise<API.Issuing.SubAccounts.SubAccount>;
55
- transactions: {
56
- get: ({ sub_account_id, ...params }: API.Issuing.SubAccounts.TransactionList.Request) => Promise<API.Issuing.SubAccounts.TransactionList.Response>;
57
- };
58
- };
59
- config: {
60
- programs: {
61
- getAll: (params: API.Issuing.Programs.Request) => Promise<API.Issuing.Programs.Response>;
62
- };
63
- };
64
- };
@@ -1,157 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __rest = (this && this.__rest) || function (s, e) {
12
- var t = {};
13
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
- t[p] = s[p];
15
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
- t[p[i]] = s[p[i]];
19
- }
20
- return t;
21
- };
22
- Object.defineProperty(exports, "__esModule", { value: true });
23
- exports.issuing = void 0;
24
- const apiClientFactory_1 = require("../utils/apiClientFactory");
25
- const constants_1 = require("../constants");
26
- const encrypt_1 = require("../utils/encrypt");
27
- exports.issuing = {
28
- cards: {
29
- create: {
30
- standAloneCard: {
31
- prepaid: (data) => apiClientFactory_1.apiClientV1.postRequest('/issuing/cards/create', { data }),
32
- balance: (data) => __awaiter(void 0, void 0, void 0, function* () {
33
- const { id: sub_account_id } = yield exports.issuing.sub_accounts.create(data.wallet_id, data.program_id);
34
- const response = yield apiClientFactory_1.apiClientV1.postRequest('/issuing/cards/balance', {
35
- data: Object.assign(Object.assign({}, data), { sub_account_id }),
36
- });
37
- return Object.assign(Object.assign({}, response), { sub_account_id });
38
- }),
39
- },
40
- subAccountCard: (data) => __awaiter(void 0, void 0, void 0, function* () {
41
- const response = yield apiClientFactory_1.apiClientV1.postRequest('/issuing/cards/balance', {
42
- data,
43
- });
44
- return Object.assign(Object.assign({}, response), { sub_account_id: data.sub_account_id });
45
- }),
46
- },
47
- byWalletUuid: {
48
- getAll: (params) => apiClientFactory_1.apiClientV1.getRequest('/issuing/cards', {
49
- params,
50
- }),
51
- getBySubaccountType: (params) => apiClientFactory_1.apiClientV1.getRequest('/issuing/cards', {
52
- params,
53
- }),
54
- getBySubAccount: (params) => apiClientFactory_1.apiClientV1.getRequest('/issuing/cards', {
55
- params,
56
- }),
57
- },
58
- // getById: (card_id: string) => apiClientV1.getRequest<API.Cards.IssuingCardDetailItem>(`/issuing/cards/${card_id}`),
59
- getById: (card_id) => __awaiter(void 0, void 0, void 0, function* () {
60
- const card = yield apiClientFactory_1.apiClientV1.getRequest(`/issuing/cards/${card_id}`);
61
- const subAccountData = yield exports.issuing.sub_accounts.getByUuid(card.fiat_account.id);
62
- return Object.assign(Object.assign({}, card), { fiat_account: Object.assign(Object.assign({}, subAccountData), { type: card.fiat_account.type }) });
63
- }),
64
- sensitiveData: {
65
- // get: (card_id: string) => apiClientV1.getRequest<API.Cards.SensitiveData>(`/issuing/cards/${card_id}/sensitive`), deprecated from v1.13.1
66
- encrypted: {
67
- secretKey: {
68
- get: (card_id) => __awaiter(void 0, void 0, void 0, function* () {
69
- const serverPublicKeyEnv = process.env.SERVER_PUBLIC_KEY_BASE64;
70
- const callback = (props) => apiClientFactory_1.apiClientV1.postRequest(`/issuing/cards/${card_id}/sensitive/secretkey`, {
71
- data: props,
72
- });
73
- if (!serverPublicKeyEnv) {
74
- throw new Error('SERVER_PUBLIC_KEY_BASE64 is not set');
75
- }
76
- const encryptedData = yield (0, encrypt_1.makeSecureRequest)({
77
- callback,
78
- publicKey: serverPublicKeyEnv,
79
- });
80
- return encryptedData;
81
- }),
82
- },
83
- },
84
- otp: {
85
- // have to update
86
- get: (card_id) => apiClientFactory_1.apiClientV1.getRequest(`/vcards/cards/${card_id}/sensitive/otp`),
87
- },
88
- },
89
- freeze: (card_id) => apiClientFactory_1.apiClientV1.patchRequest(`/issuing/cards/${card_id}/freeze`),
90
- unfreeze: (card_id) => apiClientFactory_1.apiClientV1.patchRequest(`/issuing/cards/${card_id}/unfreeze`),
91
- close: (card_id) => apiClientFactory_1.apiClientV1.deleteRequest(`/issuing/cards/${card_id}`),
92
- limits: {
93
- update: (card_id, data) => apiClientFactory_1.apiClientV1.patchRequest(`/issuing/cards/${card_id}/limits`, { data }),
94
- },
95
- rename: (card_id, nick_name) => apiClientFactory_1.apiClientV1.patchRequest(`/issuing/cards/${card_id}/update`, {
96
- data: { nick_name, request_id: crypto.randomUUID() },
97
- }),
98
- },
99
- transactions: {
100
- getByCardId: (card_id, limit = constants_1.defaultPaginationParams.limit, offset = constants_1.defaultPaginationParams.offset) => apiClientFactory_1.apiClientV1.getRequest(`/issuing/transactions/`, {
101
- params: { limit, offset, card_id, new_scheme: true },
102
- }),
103
- getBySubAccountId: (fiat_account_id, limit = constants_1.defaultPaginationParams.limit, offset = constants_1.defaultPaginationParams.offset) => apiClientFactory_1.apiClientV1.getRequest(`/issuing/transactions/`, {
104
- params: { limit, offset, fiat_account_id, new_scheme: true },
105
- }),
106
- csv: {
107
- getByCardId: (card_id) => apiClientFactory_1.apiClientV1.getRequest(`/issuing/transactions/csv`, {
108
- params: { card_id },
109
- }),
110
- getBySubAccountId: (sub_account_id) => apiClientFactory_1.apiClientV1.getRequest(`/issuing/sub_account/${sub_account_id}/transactions/csv`),
111
- },
112
- },
113
- sub_accounts: {
114
- list: {
115
- withCards: {
116
- getSinglecards: (wallet_uuid, limit, offset) => apiClientFactory_1.apiClientV1.getRequest(`/issuing/sub_account/list/${wallet_uuid}`, {
117
- params: {
118
- limit,
119
- offset,
120
- lt_cards_limit: 2,
121
- gt_cards_limit: 0,
122
- show_cards: true,
123
- pagination: true,
124
- },
125
- }),
126
- getAll: (wallet_uuid, limit, offset) => apiClientFactory_1.apiClientV1.getRequest(`/issuing/sub_account/list/${wallet_uuid}`, {
127
- params: { limit, offset, show_cards: true, pagination: true },
128
- }),
129
- },
130
- withoutCards: {
131
- getAll: (_a) => {
132
- var { wallet_uuid } = _a, params = __rest(_a, ["wallet_uuid"]);
133
- return apiClientFactory_1.apiClientV1.getRequest(`/issuing/sub_account/list/${wallet_uuid}`, {
134
- params: Object.assign(Object.assign({}, params), { pagination: true }),
135
- });
136
- },
137
- },
138
- },
139
- getByUuid: (uuid) => apiClientFactory_1.apiClientV1.getRequest(`/issuing/sub_account/${uuid}`),
140
- create: (wallet_id, program_id) => apiClientFactory_1.apiClientV1.postRequest(`/issuing/sub_account`, {
141
- data: { wallet_id, program_id },
142
- }),
143
- transactions: {
144
- get: (_a) => {
145
- var { sub_account_id } = _a, params = __rest(_a, ["sub_account_id"]);
146
- return apiClientFactory_1.apiClientV1.getRequest(`/issuing/sub_account/${sub_account_id}/transactions`, {
147
- params,
148
- });
149
- },
150
- },
151
- },
152
- config: {
153
- programs: {
154
- getAll: (params) => apiClientFactory_1.apiClientV1.getRequest('/issuing/config/programs', { params }),
155
- },
156
- },
157
- };
package/dist/api/kyc.d.ts DELETED
@@ -1,21 +0,0 @@
1
- import { API } from './types/types';
2
- export declare const kyc: {
3
- sumsub: {
4
- generate_token: (data: API.KYC.Sumsub.GenerateToken.Request) => Promise<API.KYC.Sumsub.GenerateToken.Response>;
5
- };
6
- entity: {
7
- get: ({ wallet_id }: API.KYC.Entity.Get.Request) => Promise<API.KYC.Entity.Get.Response>;
8
- };
9
- rails: {
10
- info: {
11
- getAll: ({ wallet_id }: API.KYC.Rails.RailInfo.List.Request) => Promise<API.KYC.Rails.RailInfo.List.Response>;
12
- getSingle: ({ wallet_id, rail_id, }: API.KYC.Rails.RailInfo.SingleRail.Request) => Promise<API.KYC.Rails.RailInfo.SingleRail.Response>;
13
- };
14
- submit: {
15
- single: ({ wallet_id, rail_id, }: API.KYC.Rails.Submit.Single.Request) => Promise<API.KYC.Rails.Submit.Single.Response>;
16
- };
17
- terms: {
18
- confirm: ({ wallet_id, rail_id, }: API.KYC.Rails.Terms.Confirm.Request) => Promise<API.KYC.Rails.Terms.Confirm.Response>;
19
- };
20
- };
21
- };
package/dist/api/kyc.js DELETED
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.kyc = void 0;
4
- const apiClientFactory_1 = require("../utils/apiClientFactory");
5
- exports.kyc = {
6
- sumsub: {
7
- generate_token: (data) => apiClientFactory_1.apiClientV1.postRequest('/kyc/sumsub/generate_token', { data }),
8
- },
9
- entity: {
10
- get: ({ wallet_id }) => apiClientFactory_1.apiClientV2.getRequest(`/kyc/${wallet_id}/entity`),
11
- },
12
- rails: {
13
- info: {
14
- getAll: ({ wallet_id }) => apiClientFactory_1.apiClientV2.getRequest(`/kyc/${wallet_id}/rails`),
15
- getSingle: ({ wallet_id, rail_id, }) => apiClientFactory_1.apiClientV2.getRequest(`/kyc/${wallet_id}/rails/${rail_id}`),
16
- },
17
- submit: {
18
- single: ({ wallet_id, rail_id, }) => apiClientFactory_1.apiClientV2.postRequest(`/kyc/${wallet_id}/rails/${rail_id}`),
19
- },
20
- terms: {
21
- confirm: ({ wallet_id, rail_id, }) => apiClientFactory_1.apiClientV2.postRequest(`/kyc/${wallet_id}/rails/${rail_id}/terms-and-conditions`),
22
- },
23
- },
24
- };
@@ -1,16 +0,0 @@
1
- import { AxiosRequestConfig } from 'axios';
2
- import { API } from './types/types';
3
- export declare const list: {
4
- currencies: {
5
- getAll: (params?: AxiosRequestConfig) => Promise<API.Currencies.CurrencyList>;
6
- };
7
- chains: {
8
- getAll: (params?: AxiosRequestConfig) => Promise<API.Chains.ChainList>;
9
- };
10
- countries: {
11
- getAll: (params?: AxiosRequestConfig) => Promise<API.Location.Countries.List.Response>;
12
- };
13
- states: {
14
- getAll: ({ country_id }: API.Location.States.List.Request) => Promise<API.Location.States.List.Response>;
15
- };
16
- };
package/dist/api/list.js DELETED
@@ -1,19 +0,0 @@
1
- "use strict";
2
- /* eslint-disable import/prefer-default-export */
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.list = void 0;
5
- const apiClientFactory_1 = require("../utils/apiClientFactory");
6
- exports.list = {
7
- currencies: {
8
- getAll: (params) => apiClientFactory_1.apiClientV2.getRequest('/system/currencies', params),
9
- },
10
- chains: {
11
- getAll: (params) => apiClientFactory_1.apiClientV2.getRequest('/system/chains', params),
12
- },
13
- countries: {
14
- getAll: (params) => apiClientFactory_1.apiClientV2.getRequest('/system/countries', params),
15
- },
16
- states: {
17
- getAll: ({ country_id }) => apiClientFactory_1.apiClientV2.getRequest(`/system/states/${country_id}`),
18
- },
19
- };
@@ -1,49 +0,0 @@
1
- import { API } from './types/types';
2
- export declare const orders: {
3
- calc: ({ signal, ...params }: API.Orders.Calc.Request) => Promise<API.Orders.Calc.Response>;
4
- orderTypes: {
5
- list: () => Promise<API.Orders.OrderTypes.List.Response>;
6
- };
7
- create: {
8
- byOrderType: {
9
- TRANSFER_INTERNAL: (data: API.Orders.Create.ByOrderType.INTERNAL_TRANSFER.Request) => Promise<API.Orders.Create.ByOrderType.INTERNAL_TRANSFER.Response>;
10
- WITHDRAWAL_CRYPTO: (data: API.Orders.Create.ByOrderType.WITHDRAWAL_CRYPTO.Request) => Promise<API.Orders.Create.ByOrderType.WITHDRAWAL_CRYPTO.Response>;
11
- TRANSFER_CARD_SUBACCOUNT: (data: API.Orders.Create.ByOrderType.TRANSFER_CARD_SUBACCOUNT.Request) => Promise<API.Orders.Create.ByOrderType.TRANSFER_CARD_SUBACCOUNT.Response>;
12
- TRANSFER_CARD_PREPAID: (data: API.Orders.Create.ByOrderType.TRANSFER_CARD_PREPAID.Request) => Promise<API.Orders.Create.ByOrderType.TRANSFER_CARD_PREPAID.Response>;
13
- TRANSFER_CARD_WHOLESALE: (data: API.Orders.Create.ByOrderType.TRANSFER_CARD_WHOLESALE.Request) => Promise<API.Orders.Create.ByOrderType.TRANSFER_CARD_WHOLESALE.Response>;
14
- EXCHANGE_CRYPTO_INTERNAL: (data: API.Orders.Create.ByOrderType.EXCHANGE_CRYPTO_INTERNAL.Request) => Promise<API.Orders.Create.ByOrderType.EXCHANGE_CRYPTO_INTERNAL.Response>;
15
- EXCHANGE_OMNI: (data: API.Orders.Create.ByOrderType.EXCHANGE_OMNI.Request) => Promise<API.Orders.Create.ByOrderType.EXCHANGE_OMNI.Response>;
16
- WITHDRAW_CARD_PREPAID: (data: API.Orders.Create.ByOrderType.WITHDRAW_CARD_PREPAID.Request) => Promise<API.Orders.Create.ByOrderType.WITHDRAW_CARD_PREPAID.Response>;
17
- WITHDRAW_CARD_SUBACCOUNT: (data: API.Orders.Create.ByOrderType.WITHDRAW_CARD_SUBACCOUNT.Request) => Promise<API.Orders.Create.ByOrderType.WITHDRAW_CARD_SUBACCOUNT.Response>;
18
- };
19
- };
20
- v2: {
21
- calc: ({ signal, ...params }: API.Orders.V2.Calc.Request) => Promise<API.Orders.V2.Calc.Response>;
22
- orderTypes: {
23
- list: () => Promise<API.Orders.V2.OrderTypes.List.Response>;
24
- };
25
- create: {
26
- byOrderType: {
27
- TRANSFER_INTERNAL: (data: API.Orders.V2.Create.ByOrderType.INTERNAL_TRANSFER.Request) => Promise<API.Orders.V2.Create.ByOrderType.INTERNAL_TRANSFER.Response>;
28
- HIFI_WIRE_ONRAMP: (data: API.Orders.V2.Create.ByOrderType.HIFI_WIRE_ONRAMP.Request) => Promise<API.Orders.V2.Create.ByOrderType.HIFI_WIRE_ONRAMP.Response>;
29
- HIFI_ACH_ONRAMP: (data: API.Orders.V2.Create.ByOrderType.HIFI_ACH_ONRAMP.Request) => Promise<API.Orders.V2.Create.ByOrderType.HIFI_ACH_ONRAMP.Response>;
30
- HIFI_SEPA_ONRAMP: (data: API.Orders.V2.Create.ByOrderType.HIFI_SEPA_ONRAMP.Request) => Promise<API.Orders.V2.Create.ByOrderType.HIFI_SEPA_ONRAMP.Response>;
31
- HIFI_WIRE_OFFRAMP: (data: API.Orders.V2.Create.ByOrderType.HIFI_WIRE_OFFRAMP.Request) => Promise<API.Orders.V2.Create.ByOrderType.HIFI_WIRE_OFFRAMP.Response>;
32
- HIFI_ACH_OFFRAMP: (data: API.Orders.V2.Create.ByOrderType.HIFI_ACH_OFFRAMP.Request) => Promise<API.Orders.V2.Create.ByOrderType.HIFI_ACH_OFFRAMP.Response>;
33
- HIFI_SEPA_OFFRAMP: (data: API.Orders.V2.Create.ByOrderType.HIFI_SEPA_OFFRAMP.Request) => Promise<API.Orders.V2.Create.ByOrderType.HIFI_SEPA_OFFRAMP.Response>;
34
- OMNIBUS_CRYPTO_TRANSFER: (data: API.Orders.V2.Create.ByOrderType.OMNIBUS_CRYPTO_TRANSFER.Request) => Promise<API.Orders.V2.Create.ByOrderType.OMNIBUS_CRYPTO_TRANSFER.Response>;
35
- SEGREGATED_CRYPTO_TRANSFER: (data: API.Orders.V2.Create.ByOrderType.SEGREGATED_CRYPTO_TRANSFER.Request) => Promise<API.Orders.V2.Create.ByOrderType.SEGREGATED_CRYPTO_TRANSFER.Response>;
36
- RN_CARDS_OFFRAMP: (data: API.Orders.V2.Create.ByOrderType.RN_CARDS_OFFRAMP.Request) => Promise<API.Orders.V2.Create.ByOrderType.RN_CARDS_OFFRAMP.Response>;
37
- TBD_SWIFT_WITHDRAWAL: (data: API.Orders.V2.Create.ByOrderType.TBD_SWIFT_WITHDRAWAL.Request) => Promise<API.Orders.V2.Create.ByOrderType.TBD_SWIFT_WITHDRAWAL.Response>;
38
- L2F_SEPA_OFFRAMP: (data: API.Orders.V2.Create.ByOrderType.L2F_SEPA_OFFRAMP.Request) => Promise<API.Orders.V2.Create.ByOrderType.L2F_SEPA_OFFRAMP.Response>;
39
- L2F_SWIFT_OFFRAMP: (data: API.Orders.V2.Create.ByOrderType.L2F_SWIFT_OFFRAMP.Request) => Promise<API.Orders.V2.Create.ByOrderType.L2F_SWIFT_OFFRAMP.Response>;
40
- L2F_ACH_OFFRAMP: (data: API.Orders.V2.Create.ByOrderType.L2F_ACH_OFFRAMP.Request) => Promise<API.Orders.V2.Create.ByOrderType.L2F_ACH_OFFRAMP.Response>;
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
- };
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>;
48
- };
49
- };
@@ -1,107 +0,0 @@
1
- "use strict";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.orders = void 0;
15
- const apiClientFactory_1 = require("../utils/apiClientFactory");
16
- const constants_1 = require("../constants");
17
- exports.orders = {
18
- calc: (_a) => {
19
- var { signal } = _a, params = __rest(_a, ["signal"]);
20
- return apiClientFactory_1.apiClientV1.getRequest('/orders/calc', {
21
- params,
22
- signal,
23
- });
24
- },
25
- orderTypes: {
26
- list: () => apiClientFactory_1.apiClientV1.getRequest('/orders/order_types'),
27
- },
28
- create: {
29
- byOrderType: {
30
- [constants_1.OrderType.TRANSFER_INTERNAL]: (data) => apiClientFactory_1.apiClientV1.postRequest('/orders/INTERNAL_TRANSFER', {
31
- data,
32
- }),
33
- [constants_1.OrderType.WITHDRAWAL_CRYPTO]: (data) => apiClientFactory_1.apiClientV1.postRequest('/orders/WITHDRAWAL_CRYPTO', {
34
- data,
35
- }),
36
- [constants_1.OrderType.TRANSFER_CARD_SUBACCOUNT]: (data) => apiClientFactory_1.apiClientV1.postRequest('/orders/TRANSFER_CARD_SUBACCOUNT', {
37
- data,
38
- }),
39
- [constants_1.OrderType.TRANSFER_CARD_PREPAID]: (data) => apiClientFactory_1.apiClientV1.postRequest('/orders/TRANSFER_CARD_PREPAID', {
40
- data,
41
- }),
42
- [constants_1.OrderType.TRANSFER_CARD_WHOLESALE]: (data) => apiClientFactory_1.apiClientV1.postRequest('/orders/TRANSFER_CARD_WHOLESALE', {
43
- data,
44
- }),
45
- [constants_1.OrderType.EXCHANGE_CRYPTO_INTERNAL]: (data) => apiClientFactory_1.apiClientV1.postRequest('/orders/EXCHANGE_CRYPTO_INTERNAL', { data }),
46
- [constants_1.OrderType.EXCHANGE_OMNI]: (data) => apiClientFactory_1.apiClientV1.postRequest('/orders/EXCHANGE_OMNI', {
47
- data,
48
- }),
49
- [constants_1.OrderType.WITHDRAW_CARD_PREPAID]: (data) => apiClientFactory_1.apiClientV1.postRequest('/orders/WITHDRAW_CARD_PREPAID', { data }),
50
- [constants_1.OrderType.WITHDRAW_CARD_SUBACCOUNT]: (data) => apiClientFactory_1.apiClientV1.postRequest('/orders/WITHDRAW_CARD_SUBACCOUNT', { data }),
51
- },
52
- },
53
- v2: {
54
- calc: (_a) => {
55
- var { signal } = _a, params = __rest(_a, ["signal"]);
56
- return apiClientFactory_1.apiClientV1.getRequest('/v2/orders/calc', {
57
- params,
58
- signal,
59
- });
60
- },
61
- orderTypes: {
62
- list: () => apiClientFactory_1.apiClientV1.getRequest('/v2/orders/order_types'),
63
- },
64
- create: {
65
- byOrderType: {
66
- [constants_1.OrderType.TRANSFER_INTERNAL]: (data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/TRA', {
67
- data,
68
- }),
69
- [constants_1.OrderType.HIFI_WIRE_ONRAMP]: (data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/HIFI_WIRE_ONRAMP', {
70
- data,
71
- }),
72
- [constants_1.OrderType.HIFI_ACH_ONRAMP]: (data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/HIFI_ACH_ONRAMP', {
73
- data,
74
- }),
75
- [constants_1.OrderType.HIFI_SEPA_ONRAMP]: (data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/HIFI_SEPA_ONRAMP', {
76
- data,
77
- }),
78
- [constants_1.OrderType.HIFI_WIRE_OFFRAMP]: (data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/HIFI_WIRE_OFFRAMP', {
79
- data,
80
- }),
81
- [constants_1.OrderType.HIFI_ACH_OFFRAMP]: (data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/HIFI_ACH_OFFRAMP', {
82
- data,
83
- }),
84
- [constants_1.OrderType.HIFI_SEPA_OFFRAMP]: (data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/HIFI_SEPA_OFFRAMP', { data }),
85
- [constants_1.OrderType.OMNIBUS_CRYPTO_TRANSFER]: (data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/OMNIBUS_CRYPTO_TRANSFER', { data }),
86
- [constants_1.OrderType.SEGREGATED_CRYPTO_TRANSFER]: (data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/SEGREGATED_CRYPTO_TRANSFER', { data }),
87
- [constants_1.OrderType.RN_CARDS_OFFRAMP]: (data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/RN_CARDS_OFFRAMP', { data }),
88
- [constants_1.OrderType.TBD_SWIFT_WITHDRAWAL]: (
89
- // TODO: ITS MOCK ORDER TYPE
90
- data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/TBD_SWIFT_WITHDRAWAL', { data }),
91
- [constants_1.OrderType.L2F_SEPA_OFFRAMP]: (data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/L2F_SEPA_OFFRAMP', { data }),
92
- [constants_1.OrderType.L2F_SWIFT_OFFRAMP]: (data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/L2F_SWIFT_OFFRAMP', { data }),
93
- [constants_1.OrderType.L2F_ACH_OFFRAMP]: (data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/L2F_ACH_OFFRAMP', { data }),
94
- [constants_1.OrderType.L2F_WIRE_OFFRAMP]: (data) => apiClientFactory_1.apiClientV1.postRequest('/v2/orders/L2F_WIRE_OFFRAMP', { data }),
95
- },
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}`),
106
- },
107
- };
@@ -1,7 +0,0 @@
1
- import { API } from './types/types';
2
- export declare const persona: {
3
- inquiries: {
4
- init: ({ wallet_id, type }: API.Persona.Inquiries.Init.Request) => Promise<API.Persona.Inquiries.Init.Response>;
5
- resume: ({ wallet_id, inquiry_id, }: API.Persona.Inquiries.Resume.Request) => Promise<API.Persona.Inquiries.Resume.Response>;
6
- };
7
- };
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.persona = void 0;
4
- const apiClientFactory_1 = require("../utils/apiClientFactory");
5
- exports.persona = {
6
- inquiries: {
7
- init: ({ wallet_id, type }) => apiClientFactory_1.apiClientV2.postRequest(`/persona/inquiries/init/${wallet_id}/${type}`),
8
- resume: ({ wallet_id, inquiry_id, }) => apiClientFactory_1.apiClientV2.postRequest(`/persona/inquiries/${wallet_id}/${inquiry_id}/resume`),
9
- },
10
- };
@@ -1,8 +0,0 @@
1
- import { API } from './types/types';
2
- export declare const storage: {
3
- kyc: {
4
- upload: (file: File) => Promise<API.Storage.KYC.Upload.Response>;
5
- getFileUrl: ({ path }: API.Storage.KYC.GetFileUrl.Request) => Promise<API.Storage.KYC.GetFileUrl.Response>;
6
- getFileById: ({ folderId, fileId, }: API.Storage.KYC.GetFileById.Request) => Promise<API.Storage.KYC.GetFileById.Response>;
7
- };
8
- };
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.storage = void 0;
4
- const apiClientFactory_1 = require("../utils/apiClientFactory");
5
- exports.storage = {
6
- kyc: {
7
- upload: (file) => {
8
- const formData = new FormData();
9
- formData.append('file', file);
10
- return apiClientFactory_1.apiClientV2.postRequest('/storage/kyc', {
11
- data: formData,
12
- });
13
- },
14
- getFileUrl: ({ path }) => apiClientFactory_1.apiClientV2.getRequest('/storage/kyc', {
15
- params: { path },
16
- }),
17
- getFileById: ({ folderId, fileId, }) => apiClientFactory_1.apiClientV2.getRequest(`/storage/kyc/${folderId}/${fileId}`),
18
- },
19
- };
@@ -1,6 +0,0 @@
1
- import { API } from './types/types';
2
- export declare const tenants: {
3
- config: {
4
- get: () => Promise<API.Tenant.Config>;
5
- };
6
- };
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.tenants = void 0;
4
- const apiClientFactory_1 = require("../utils/apiClientFactory");
5
- exports.tenants = {
6
- config: {
7
- get: () => apiClientFactory_1.apiClientV2.getRequest('/system/config'),
8
- },
9
- };
@@ -1,17 +0,0 @@
1
- import { API } from './types/types';
2
- export declare const totp: {
3
- otp_verification: {
4
- create: (data: API.TOTP.OTPVerification.Create.Request) => Promise<API.TOTP.OTPVerification.Create.Response>;
5
- request: (data: API.TOTP.OTPVerification.RequestOtp.Request) => Promise<API.TOTP.OTPVerification.RequestOtp.Response>;
6
- verify: (data: API.TOTP.OTPVerification.Verify.Request) => Promise<API.TOTP.OTPVerification.Verify.Response>;
7
- get: (id: string) => Promise<API.TOTP.OTPVerification.OTPVerificationInfo>;
8
- };
9
- totp: {
10
- generate: (data: API.TOTP.TOTP.Generate.Request) => Promise<API.TOTP.TOTP.Generate.Response>;
11
- verify: (data: API.TOTP.TOTP.Verify.Request) => Promise<API.TOTP.TOTP.Verify.Response>;
12
- revoke: (data: API.TOTP.TOTP.Revoke.Request) => Promise<API.TOTP.TOTP.Revoke.Response>;
13
- activate: (data: API.TOTP.TOTP.Activate.Request) => Promise<API.TOTP.TOTP.Activate.Response>;
14
- generateEncrypted: (data: API.TOTP.TOTP.GenerateEncrypted.Request) => Promise<API.TOTP.TOTP.GenerateEncrypted.Response>;
15
- status: () => Promise<API.TOTP.TOTP.Status.Response>;
16
- };
17
- };
package/dist/api/totp.js DELETED
@@ -1,48 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.totp = void 0;
4
- const apiClientFactory_1 = require("../utils/apiClientFactory");
5
- exports.totp = {
6
- otp_verification: {
7
- create: (data) => {
8
- return apiClientFactory_1.apiClientTOTP.postRequest('/api/otp-verification/create', {
9
- data,
10
- });
11
- },
12
- request: (data) => {
13
- return apiClientFactory_1.apiClientTOTP.postRequest('/api/otp-verification/request', {
14
- data,
15
- });
16
- },
17
- verify: (data) => {
18
- return apiClientFactory_1.apiClientTOTP.postRequest('/api/otp-verification/verify', {
19
- data,
20
- });
21
- },
22
- get: (id) => {
23
- return apiClientFactory_1.apiClientTOTP.getRequest(`/api/otp-verification/${id}`);
24
- },
25
- },
26
- totp: {
27
- generate: (data) => {
28
- return apiClientFactory_1.apiClientTOTP.postRequest('/api/totp/generate', { data });
29
- },
30
- verify: (data) => {
31
- return apiClientFactory_1.apiClientTOTP.postRequest('/api/totp/verify', { data });
32
- },
33
- revoke: (data) => {
34
- return apiClientFactory_1.apiClientTOTP.postRequest('/api/totp/revoke', { data });
35
- },
36
- activate: (data) => {
37
- return apiClientFactory_1.apiClientTOTP.postRequest('/api/totp/activate', { data });
38
- },
39
- generateEncrypted: (data) => {
40
- return apiClientFactory_1.apiClientTOTP.postRequest('/api/totp/generate-encrypted', {
41
- data,
42
- });
43
- },
44
- status: () => {
45
- return apiClientFactory_1.apiClientTOTP.getRequest('/api/totp/status');
46
- },
47
- },
48
- };