squarefi-bff-api-module 1.34.24 → 1.35.0
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/index.d.ts +2 -0
- package/dist/api/index.js +2 -0
- package/dist/api/statements.d.ts +4 -0
- package/dist/api/statements.js +4 -0
- package/dist/api/types/autogen/apiV1External.types.d.ts +7777 -0
- package/dist/api/types/autogen/apiV1External.types.js +5 -0
- package/dist/api/types/autogen/apiV1Frontend.types.d.ts +9457 -0
- package/dist/api/types/autogen/apiV1Frontend.types.js +5 -0
- package/dist/api/types/autogen/apiV1Legacy.types.d.ts +9005 -0
- package/dist/api/types/autogen/apiV1Legacy.types.js +5 -0
- package/dist/api/types/autogen/apiV1Tenant.types.d.ts +7735 -0
- package/dist/api/types/autogen/apiV1Tenant.types.js +5 -0
- package/dist/api/types/types.d.ts +129 -155
- package/dist/api/wallets.d.ts +27 -17
- package/dist/api/wallets.js +39 -25
- package/dist/utils/apiClientFactory.d.ts +6 -0
- package/dist/utils/apiClientFactory.js +5 -0
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { APIKeyRole, CardFormFactor, CardTransactionType, CardType, CurrencyType, IssuingProgramStatus, OrderType, SortingDirection, SubAccountType
|
|
1
|
+
import { APIKeyRole, CardFormFactor, CardTransactionType, CardType, CurrencyType, IssuingProgramStatus, OrderType, SortingDirection, SubAccountType } from '../../constants';
|
|
2
2
|
import { components, operations, paths } from './autogen/apiV2.types';
|
|
3
|
+
import { components as componentsV1Frontend, paths as pathsV1Frontend } from './autogen/apiV1Frontend.types';
|
|
3
4
|
export declare namespace API {
|
|
4
5
|
namespace Auth {
|
|
5
6
|
namespace RefreshToken {
|
|
@@ -2103,181 +2104,154 @@ export declare namespace API {
|
|
|
2103
2104
|
}
|
|
2104
2105
|
}
|
|
2105
2106
|
namespace Wallets {
|
|
2106
|
-
interface SimplifiedWallet {
|
|
2107
|
+
export interface SimplifiedWallet {
|
|
2107
2108
|
uuid: string;
|
|
2108
2109
|
user_id: string;
|
|
2109
2110
|
tenant_id: string;
|
|
2110
2111
|
}
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2112
|
+
type WalletsRoot = pathsV1Frontend['/frontend/wallets'];
|
|
2113
|
+
type WalletByIdRoot = pathsV1Frontend['/frontend/wallets/{wallet_id}'];
|
|
2114
|
+
type WalletBalanceRoot = pathsV1Frontend['/frontend/wallets/{wallet_id}/balance'];
|
|
2115
|
+
type WalletDashboardRoot = pathsV1Frontend['/frontend/wallets/{wallet_id}/dashboard'];
|
|
2116
|
+
type WalletAddressesRoot = pathsV1Frontend['/frontend/wallets/{wallet_id}/addresses'];
|
|
2117
|
+
type WalletAddressByChainRoot = pathsV1Frontend['/frontend/wallets/{wallet_id}/addresses/{chain}'];
|
|
2118
|
+
type WalletTransactionsRoot = pathsV1Frontend['/frontend/wallets/{wallet_id}/transactions'];
|
|
2119
|
+
type WalletTransactionByIdRoot = pathsV1Frontend['/frontend/wallets/{wallet_id}/transactions/{transaction_id}'];
|
|
2120
|
+
type WalletTransactionsCsvRoot = pathsV1Frontend['/frontend/wallets/{wallet_id}/transactions/csv'];
|
|
2121
|
+
type WalletInvitesRoot = pathsV1Frontend['/frontend/wallets/{wallet_id}/invites'];
|
|
2122
|
+
type WalletInviteByIdRoot = pathsV1Frontend['/frontend/wallets/{wallet_id}/invites/{invite_id}'];
|
|
2123
|
+
type AcceptInviteRoot = pathsV1Frontend['/frontend/wallets/accept-invite'];
|
|
2124
|
+
type DeclineInviteRoot = pathsV1Frontend['/frontend/wallets/decline-invite'];
|
|
2125
|
+
type InviteInfoRoot = pathsV1Frontend['/frontend/wallets/invite-info'];
|
|
2126
|
+
type UsersLookupRoot = pathsV1Frontend['/frontend/wallets/users/lookup'];
|
|
2127
|
+
type WalletUsersRoot = pathsV1Frontend['/frontend/wallets/{wallet_id}/users'];
|
|
2128
|
+
type WalletUserByIdRoot = pathsV1Frontend['/frontend/wallets/{wallet_id}/users/{user_data_uuid}'];
|
|
2129
|
+
type WalletUserActivateRoot = pathsV1Frontend['/frontend/wallets/{wallet_id}/users/{user_data_uuid}/activate'];
|
|
2130
|
+
type WalletUserDeactivateRoot = pathsV1Frontend['/frontend/wallets/{wallet_id}/users/{user_data_uuid}/deactivate'];
|
|
2131
|
+
export namespace WalletsList {
|
|
2132
|
+
type Request = NonNullable<WalletsRoot['get']['parameters']['query']>;
|
|
2133
|
+
type Response = WalletsRoot['get']['responses']['200']['content']['application/json'];
|
|
2134
|
+
type WalletsListItem = NonNullable<Response['data']>[number];
|
|
2135
|
+
}
|
|
2136
|
+
export namespace Wallet {
|
|
2137
|
+
namespace Create {
|
|
2138
|
+
type Request = NonNullable<WalletsRoot['post']['requestBody']>['content']['application/json'];
|
|
2139
|
+
type Response = WalletsRoot['post']['responses']['201']['content']['application/json'];
|
|
2140
|
+
}
|
|
2141
|
+
namespace GetByUuid {
|
|
2142
|
+
type Request = WalletByIdRoot['get']['parameters']['path'] & NonNullable<WalletByIdRoot['get']['parameters']['query']>;
|
|
2143
|
+
type Response = WalletByIdRoot['get']['responses']['200']['content']['application/json'];
|
|
2144
|
+
}
|
|
2145
|
+
namespace Update {
|
|
2146
|
+
type Request = WalletByIdRoot['patch']['parameters']['path'] & WalletByIdRoot['patch']['requestBody']['content']['application/json'];
|
|
2147
|
+
type Response = WalletByIdRoot['patch']['responses']['200']['content']['application/json'];
|
|
2148
|
+
}
|
|
2116
2149
|
}
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
name: string;
|
|
2121
|
-
is_crypto: boolean;
|
|
2122
|
-
decimal?: number | null;
|
|
2123
|
-
amount: number;
|
|
2124
|
-
fiat_amount: number;
|
|
2125
|
-
details: WallletBalanceDetails[];
|
|
2150
|
+
export namespace Balance {
|
|
2151
|
+
type Request = WalletBalanceRoot['get']['parameters']['path'] & NonNullable<WalletBalanceRoot['get']['parameters']['query']>;
|
|
2152
|
+
type Response = WalletBalanceRoot['get']['responses']['200']['content']['application/json'];
|
|
2126
2153
|
}
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2154
|
+
export namespace Dashboard {
|
|
2155
|
+
type Request = WalletDashboardRoot['get']['parameters']['path'] & NonNullable<WalletDashboardRoot['get']['parameters']['query']>;
|
|
2156
|
+
type Response = WalletDashboardRoot['get']['responses']['200']['content']['application/json'];
|
|
2157
|
+
}
|
|
2158
|
+
export namespace WalletChain {
|
|
2159
|
+
namespace GetAll {
|
|
2160
|
+
type Request = WalletAddressesRoot['get']['parameters']['path'] & NonNullable<WalletAddressesRoot['get']['parameters']['query']>;
|
|
2161
|
+
type Response = WalletAddressesRoot['get']['responses']['200']['content']['application/json'];
|
|
2135
2162
|
}
|
|
2136
2163
|
namespace Create {
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2164
|
+
type Request = WalletAddressByChainRoot['post']['parameters']['path'] & NonNullable<NonNullable<WalletAddressByChainRoot['post']['requestBody']>['content']['application/json']>;
|
|
2165
|
+
type Response = WalletAddressByChainRoot['post']['responses']['201']['content']['application/json'];
|
|
2166
|
+
}
|
|
2167
|
+
}
|
|
2168
|
+
export namespace WalletTransactions {
|
|
2169
|
+
namespace TransactionList {
|
|
2170
|
+
type Request = WalletTransactionsRoot['get']['parameters']['path'] & NonNullable<WalletTransactionsRoot['get']['parameters']['query']>;
|
|
2171
|
+
type Response = WalletTransactionsRoot['get']['responses']['200']['content']['application/json'];
|
|
2172
|
+
namespace ExportCsv {
|
|
2173
|
+
type Request = WalletTransactionsCsvRoot['get']['parameters']['path'] & NonNullable<WalletTransactionsCsvRoot['get']['parameters']['query']>;
|
|
2174
|
+
type Response = WalletTransactionsCsvRoot['get']['responses']['200']['content']['text/csv'];
|
|
2141
2175
|
}
|
|
2142
|
-
|
|
2176
|
+
}
|
|
2177
|
+
namespace GetById {
|
|
2178
|
+
type Request = WalletTransactionByIdRoot['get']['parameters']['path'];
|
|
2179
|
+
type Response = WalletTransactionByIdRoot['get']['responses']['200']['content']['application/json'];
|
|
2143
2180
|
}
|
|
2144
2181
|
}
|
|
2145
|
-
namespace
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
uuid: string;
|
|
2150
|
-
logo_url: string | null;
|
|
2151
|
-
name: string | null;
|
|
2152
|
-
created_at: string;
|
|
2153
|
-
fiat_total: number;
|
|
2154
|
-
crypto_total: number;
|
|
2155
|
-
total_amount: number;
|
|
2156
|
-
pending_balance: number;
|
|
2157
|
-
balance: WalletBalance;
|
|
2158
|
-
kyc_info: WalletKYCInfo;
|
|
2159
|
-
role: WalletRole;
|
|
2182
|
+
export namespace Users {
|
|
2183
|
+
namespace Lookup {
|
|
2184
|
+
type Request = UsersLookupRoot['get']['parameters']['query'];
|
|
2185
|
+
type Response = UsersLookupRoot['get']['responses']['200']['content']['application/json'];
|
|
2160
2186
|
}
|
|
2161
|
-
namespace
|
|
2162
|
-
type Request =
|
|
2163
|
-
type Response =
|
|
2187
|
+
namespace GetAll {
|
|
2188
|
+
type Request = WalletUsersRoot['get']['parameters']['path'] & NonNullable<WalletUsersRoot['get']['parameters']['query']>;
|
|
2189
|
+
type Response = WalletUsersRoot['get']['responses']['200']['content']['application/json'];
|
|
2164
2190
|
}
|
|
2165
|
-
namespace
|
|
2166
|
-
type Request =
|
|
2167
|
-
type Response =
|
|
2191
|
+
namespace Add {
|
|
2192
|
+
type Request = WalletUsersRoot['post']['parameters']['path'] & WalletUsersRoot['post']['requestBody']['content']['application/json'];
|
|
2193
|
+
type Response = WalletUsersRoot['post']['responses']['201']['content']['application/json'];
|
|
2168
2194
|
}
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2195
|
+
namespace UpdateRole {
|
|
2196
|
+
type Request = WalletUserByIdRoot['patch']['parameters']['path'] & WalletUserByIdRoot['patch']['requestBody']['content']['application/json'];
|
|
2197
|
+
type Response = WalletUserByIdRoot['patch']['responses']['200']['content']['application/json'];
|
|
2198
|
+
}
|
|
2199
|
+
namespace Remove {
|
|
2200
|
+
type Request = WalletUserByIdRoot['delete']['parameters']['path'];
|
|
2201
|
+
type Response = WalletUserByIdRoot['delete']['responses']['200']['content']['application/json'];
|
|
2202
|
+
}
|
|
2203
|
+
namespace Activate {
|
|
2204
|
+
type Request = WalletUserActivateRoot['post']['parameters']['path'];
|
|
2205
|
+
type Response = WalletUserActivateRoot['post']['responses']['200']['content']['application/json'];
|
|
2206
|
+
}
|
|
2207
|
+
namespace Deactivate {
|
|
2208
|
+
type Request = WalletUserDeactivateRoot['post']['parameters']['path'];
|
|
2209
|
+
type Response = WalletUserDeactivateRoot['post']['responses']['200']['content']['application/json'];
|
|
2178
2210
|
}
|
|
2179
|
-
type Request = operations['WalletsController_all']['parameters']['query'];
|
|
2180
|
-
type Response = {
|
|
2181
|
-
total: number;
|
|
2182
|
-
data: WalletsListItem[];
|
|
2183
|
-
has_more: boolean;
|
|
2184
|
-
};
|
|
2185
2211
|
}
|
|
2186
|
-
namespace
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
from_address?: string;
|
|
2192
|
-
to_address?: string;
|
|
2193
|
-
network_fee?: number;
|
|
2194
|
-
network_fee_currency?: string;
|
|
2195
|
-
fee_currency?: string;
|
|
2196
|
-
billing_amount?: number;
|
|
2197
|
-
utila_transaction?: string;
|
|
2198
|
-
transcation_amount?: number;
|
|
2199
|
-
transaction_amount?: number;
|
|
2200
|
-
billing_amount_currency?: string;
|
|
2201
|
-
transcation_amount_currency?: string;
|
|
2202
|
-
transaction_amount_currency?: string;
|
|
2203
|
-
exchange_rate?: number;
|
|
2204
|
-
fiat_account_id?: string;
|
|
2205
|
-
txid?: string;
|
|
2206
|
-
chain_id?: number;
|
|
2207
|
-
from_user_data?: number;
|
|
2208
|
-
to_user_data?: number;
|
|
2209
|
-
to_card_id?: string;
|
|
2210
|
-
to_card_last4?: string;
|
|
2211
|
-
to_fiat_account_id?: string;
|
|
2212
|
-
to_vendor_id?: string;
|
|
2213
|
-
}
|
|
2214
|
-
interface Transaction {
|
|
2215
|
-
id: number;
|
|
2216
|
-
created_at: string;
|
|
2217
|
-
type: WalletTransactionType | string;
|
|
2218
|
-
method: WalletTransactionMethod | string;
|
|
2219
|
-
status: WalletTransactionStatus | string;
|
|
2220
|
-
amount: number;
|
|
2221
|
-
from: string | null;
|
|
2222
|
-
to: string | null;
|
|
2223
|
-
wallet_id: string;
|
|
2224
|
-
txid: string;
|
|
2225
|
-
info: string;
|
|
2226
|
-
currency: API.Currencies.Currency;
|
|
2227
|
-
record_type: WalletTransactionRecordType | string;
|
|
2228
|
-
meta?: WalletTransactionMeta;
|
|
2212
|
+
export namespace Invites {
|
|
2213
|
+
type WalletInvite = componentsV1Frontend['schemas']['WalletInvite'];
|
|
2214
|
+
namespace Info {
|
|
2215
|
+
type Request = InviteInfoRoot['get']['parameters']['query'];
|
|
2216
|
+
type Response = InviteInfoRoot['get']['responses']['200']['content']['application/json'];
|
|
2229
2217
|
}
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
created_at: string;
|
|
2234
|
-
from: string;
|
|
2235
|
-
info: string;
|
|
2236
|
-
status: WalletTransactionStatus | string;
|
|
2237
|
-
to: string;
|
|
2238
|
-
txid: string;
|
|
2239
|
-
type: WalletTransactionType | string;
|
|
2240
|
-
wallet_id: string;
|
|
2241
|
-
method: WalletTransactionMethod | string;
|
|
2242
|
-
meta: WalletTransactionMeta;
|
|
2243
|
-
record_type: WalletTransactionRecordType | string;
|
|
2244
|
-
currency: API.Currencies.Currency;
|
|
2218
|
+
namespace Accept {
|
|
2219
|
+
type Request = AcceptInviteRoot['post']['requestBody']['content']['application/json'];
|
|
2220
|
+
type Response = AcceptInviteRoot['post']['responses']['200']['content']['application/json'];
|
|
2245
2221
|
}
|
|
2246
|
-
namespace
|
|
2247
|
-
type Request =
|
|
2248
|
-
|
|
2249
|
-
uuid: string;
|
|
2250
|
-
};
|
|
2222
|
+
namespace Decline {
|
|
2223
|
+
type Request = DeclineInviteRoot['post']['requestBody']['content']['application/json'];
|
|
2224
|
+
type Response = DeclineInviteRoot['post']['responses']['200']['content']['application/json'];
|
|
2251
2225
|
}
|
|
2252
|
-
namespace
|
|
2253
|
-
type Request =
|
|
2254
|
-
|
|
2255
|
-
limit: number;
|
|
2256
|
-
offset: number;
|
|
2257
|
-
filter?: Partial<components['schemas']['TransactionsFilter']>;
|
|
2258
|
-
};
|
|
2259
|
-
type Response = {
|
|
2260
|
-
total: number;
|
|
2261
|
-
data: Transaction[];
|
|
2262
|
-
};
|
|
2263
|
-
namespace ExportCsv {
|
|
2264
|
-
type Request = {
|
|
2265
|
-
wallet_uuid: string;
|
|
2266
|
-
filter?: Partial<components['schemas']['TransactionsFilter']>;
|
|
2267
|
-
};
|
|
2268
|
-
type Response = string;
|
|
2269
|
-
}
|
|
2226
|
+
namespace GetAll {
|
|
2227
|
+
type Request = WalletInvitesRoot['get']['parameters']['path'] & NonNullable<WalletInvitesRoot['get']['parameters']['query']>;
|
|
2228
|
+
type Response = WalletInvitesRoot['get']['responses']['200']['content']['application/json'];
|
|
2270
2229
|
}
|
|
2271
|
-
namespace
|
|
2272
|
-
type Request =
|
|
2273
|
-
|
|
2274
|
-
from_date?: string;
|
|
2275
|
-
to_date?: string;
|
|
2276
|
-
crypto_id?: string;
|
|
2277
|
-
logo?: string;
|
|
2278
|
-
};
|
|
2279
|
-
type Response = string;
|
|
2230
|
+
namespace Create {
|
|
2231
|
+
type Request = WalletInvitesRoot['post']['parameters']['path'] & WalletInvitesRoot['post']['requestBody']['content']['application/json'];
|
|
2232
|
+
type Response = WalletInvitesRoot['post']['responses']['201']['content']['application/json'];
|
|
2280
2233
|
}
|
|
2234
|
+
namespace GetById {
|
|
2235
|
+
type Request = WalletInviteByIdRoot['get']['parameters']['path'];
|
|
2236
|
+
type Response = WalletInviteByIdRoot['get']['responses']['200']['content']['application/json'];
|
|
2237
|
+
}
|
|
2238
|
+
namespace Delete {
|
|
2239
|
+
type Request = WalletInviteByIdRoot['delete']['parameters']['path'];
|
|
2240
|
+
type Response = WalletInviteByIdRoot['delete']['responses']['200']['content']['application/json'];
|
|
2241
|
+
}
|
|
2242
|
+
}
|
|
2243
|
+
export {};
|
|
2244
|
+
}
|
|
2245
|
+
namespace Statements {
|
|
2246
|
+
namespace Pdf {
|
|
2247
|
+
type Request = {
|
|
2248
|
+
wallet_uuid: string;
|
|
2249
|
+
from_date?: string;
|
|
2250
|
+
to_date?: string;
|
|
2251
|
+
crypto_id?: string;
|
|
2252
|
+
logo?: string;
|
|
2253
|
+
};
|
|
2254
|
+
type Response = Blob;
|
|
2281
2255
|
}
|
|
2282
2256
|
}
|
|
2283
2257
|
namespace Storage {
|
package/dist/api/wallets.d.ts
CHANGED
|
@@ -1,26 +1,36 @@
|
|
|
1
1
|
import { API } from './types/types';
|
|
2
2
|
export declare const wallets: {
|
|
3
|
-
create: (data
|
|
3
|
+
create: (data?: API.Wallets.Wallet.Create.Request) => Promise<API.Wallets.Wallet.Create.Response>;
|
|
4
4
|
getAll: (params?: API.Wallets.WalletsList.Request) => Promise<API.Wallets.WalletsList.Response>;
|
|
5
|
-
getByUuid: ({ wallet_id }: API.Wallets.Wallet.GetByUuid.Request) => Promise<API.Wallets.Wallet.GetByUuid.Response>;
|
|
5
|
+
getByUuid: ({ wallet_id, ...params }: API.Wallets.Wallet.GetByUuid.Request) => Promise<API.Wallets.Wallet.GetByUuid.Response>;
|
|
6
|
+
update: ({ wallet_id, ...data }: API.Wallets.Wallet.Update.Request) => Promise<API.Wallets.Wallet.Update.Response>;
|
|
7
|
+
getBalance: ({ wallet_id, ...params }: API.Wallets.Balance.Request) => Promise<API.Wallets.Balance.Response>;
|
|
8
|
+
getDashboard: ({ wallet_id, ...params }: API.Wallets.Dashboard.Request) => Promise<API.Wallets.Dashboard.Response>;
|
|
6
9
|
addresses: {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
byWalletUuid: {
|
|
10
|
-
byChainId: (wallet_uuid: string, chain_id: number) => Promise<API.Wallets.WalletChain.WalletChain>;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
10
|
+
getAll: ({ wallet_id, ...params }: API.Wallets.WalletChain.GetAll.Request) => Promise<API.Wallets.WalletChain.GetAll.Response>;
|
|
11
|
+
create: ({ wallet_id, chain, ...data }: API.Wallets.WalletChain.Create.Request) => Promise<API.Wallets.WalletChain.Create.Response>;
|
|
13
12
|
};
|
|
14
13
|
transactions: {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
csv: {
|
|
20
|
-
getByWalletUuid: ({ wallet_uuid, ...params }: API.Wallets.WalletTransactions.TransactionList.ExportCsv.Request) => Promise<API.Wallets.WalletTransactions.TransactionList.ExportCsv.Response>;
|
|
21
|
-
};
|
|
14
|
+
getAll: ({ wallet_id, limit, offset, ...params }: API.Wallets.WalletTransactions.TransactionList.Request) => Promise<API.Wallets.WalletTransactions.TransactionList.Response>;
|
|
15
|
+
getById: ({ wallet_id, transaction_id, }: API.Wallets.WalletTransactions.GetById.Request) => Promise<API.Wallets.WalletTransactions.GetById.Response>;
|
|
16
|
+
csv: ({ wallet_id, ...params }: API.Wallets.WalletTransactions.TransactionList.ExportCsv.Request) => Promise<API.Wallets.WalletTransactions.TransactionList.ExportCsv.Response>;
|
|
22
17
|
};
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
users: {
|
|
19
|
+
lookup: (params: API.Wallets.Users.Lookup.Request) => Promise<API.Wallets.Users.Lookup.Response>;
|
|
20
|
+
getAll: ({ wallet_id, ...params }: API.Wallets.Users.GetAll.Request) => Promise<API.Wallets.Users.GetAll.Response>;
|
|
21
|
+
add: ({ wallet_id, ...data }: API.Wallets.Users.Add.Request) => Promise<API.Wallets.Users.Add.Response>;
|
|
22
|
+
updateRole: ({ wallet_id, user_data_uuid, ...data }: API.Wallets.Users.UpdateRole.Request) => Promise<API.Wallets.Users.UpdateRole.Response>;
|
|
23
|
+
remove: ({ wallet_id, user_data_uuid, }: API.Wallets.Users.Remove.Request) => Promise<API.Wallets.Users.Remove.Response>;
|
|
24
|
+
activate: ({ wallet_id, user_data_uuid, }: API.Wallets.Users.Activate.Request) => Promise<API.Wallets.Users.Activate.Response>;
|
|
25
|
+
deactivate: ({ wallet_id, user_data_uuid, }: API.Wallets.Users.Deactivate.Request) => Promise<API.Wallets.Users.Deactivate.Response>;
|
|
26
|
+
};
|
|
27
|
+
invites: {
|
|
28
|
+
info: (params: API.Wallets.Invites.Info.Request) => Promise<API.Wallets.Invites.Info.Response>;
|
|
29
|
+
accept: (data: API.Wallets.Invites.Accept.Request) => Promise<API.Wallets.Invites.Accept.Response>;
|
|
30
|
+
decline: (data: API.Wallets.Invites.Decline.Request) => Promise<API.Wallets.Invites.Decline.Response>;
|
|
31
|
+
getAll: ({ wallet_id, ...params }: API.Wallets.Invites.GetAll.Request) => Promise<API.Wallets.Invites.GetAll.Response>;
|
|
32
|
+
create: ({ wallet_id, ...data }: API.Wallets.Invites.Create.Request) => Promise<API.Wallets.Invites.Create.Response>;
|
|
33
|
+
getById: ({ wallet_id, invite_id, }: API.Wallets.Invites.GetById.Request) => Promise<API.Wallets.Invites.GetById.Response>;
|
|
34
|
+
delete: ({ wallet_id, invite_id, }: API.Wallets.Invites.Delete.Request) => Promise<API.Wallets.Invites.Delete.Response>;
|
|
25
35
|
};
|
|
26
36
|
};
|
package/dist/api/wallets.js
CHANGED
|
@@ -1,33 +1,47 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { apiClientV1Frontend } from '../utils/apiClientFactory';
|
|
2
2
|
import { defaultPaginationParams } from '../constants';
|
|
3
3
|
export const wallets = {
|
|
4
|
-
create: (data) =>
|
|
5
|
-
getAll: (params) =>
|
|
6
|
-
getByUuid: ({ wallet_id }) =>
|
|
4
|
+
create: (data) => apiClientV1Frontend.postRequest('/frontend/wallets', { data }),
|
|
5
|
+
getAll: (params) => apiClientV1Frontend.getRequest('/frontend/wallets', { params }),
|
|
6
|
+
getByUuid: ({ wallet_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/wallets/${wallet_id}`, {
|
|
7
|
+
params,
|
|
8
|
+
}),
|
|
9
|
+
update: ({ wallet_id, ...data }) => apiClientV1Frontend.patchRequest(`/frontend/wallets/${wallet_id}`, {
|
|
10
|
+
data,
|
|
11
|
+
}),
|
|
12
|
+
getBalance: ({ wallet_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/wallets/${wallet_id}/balance`, { params }),
|
|
13
|
+
getDashboard: ({ wallet_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/wallets/${wallet_id}/dashboard`, { params }),
|
|
7
14
|
addresses: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return apiClientV2.postRequest(`/wallets/${wallet_uuid}/addresses/${chain}`, { data: { label } });
|
|
11
|
-
},
|
|
12
|
-
get: {
|
|
13
|
-
byWalletUuid: {
|
|
14
|
-
byChainId: (wallet_uuid, chain_id) => apiClientV2.getRequest(`/wallets/${wallet_uuid}/addresses/${chain_id}`),
|
|
15
|
-
},
|
|
16
|
-
},
|
|
15
|
+
getAll: ({ wallet_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/wallets/${wallet_id}/addresses`, { params }),
|
|
16
|
+
create: ({ wallet_id, chain, ...data }) => apiClientV1Frontend.postRequest(`/frontend/wallets/${wallet_id}/addresses/${chain}`, { data }),
|
|
17
17
|
},
|
|
18
18
|
transactions: {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return apiClientV2.getRequest(`/wallets/${wallet_uuid}/transactions`, { params: { limit, offset, ...params } });
|
|
23
|
-
},
|
|
24
|
-
getByUuid: ({ wallet_uuid, uuid, }) => apiClientV2.getRequest(`/wallets/${wallet_uuid}/transactions/${uuid}`),
|
|
25
|
-
},
|
|
26
|
-
csv: {
|
|
27
|
-
getByWalletUuid: ({ wallet_uuid, ...params }) => apiClientV2.getRequest(`/wallets/${wallet_uuid}/transactions/export/csv`, { params }),
|
|
28
|
-
},
|
|
19
|
+
getAll: ({ wallet_id, limit = defaultPaginationParams.limit, offset = defaultPaginationParams.offset, ...params }) => apiClientV1Frontend.getRequest(`/frontend/wallets/${wallet_id}/transactions`, { params: { limit, offset, ...params } }),
|
|
20
|
+
getById: ({ wallet_id, transaction_id, }) => apiClientV1Frontend.getRequest(`/frontend/wallets/${wallet_id}/transactions/${transaction_id}`),
|
|
21
|
+
csv: ({ wallet_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/wallets/${wallet_id}/transactions/csv`, { params }),
|
|
29
22
|
},
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
users: {
|
|
24
|
+
lookup: (params) => apiClientV1Frontend.getRequest('/frontend/wallets/users/lookup', {
|
|
25
|
+
params,
|
|
26
|
+
}),
|
|
27
|
+
getAll: ({ wallet_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/wallets/${wallet_id}/users`, { params }),
|
|
28
|
+
add: ({ wallet_id, ...data }) => apiClientV1Frontend.postRequest(`/frontend/wallets/${wallet_id}/users`, { data }),
|
|
29
|
+
updateRole: ({ wallet_id, user_data_uuid, ...data }) => apiClientV1Frontend.patchRequest(`/frontend/wallets/${wallet_id}/users/${user_data_uuid}`, { data }),
|
|
30
|
+
remove: ({ wallet_id, user_data_uuid, }) => apiClientV1Frontend.deleteRequest(`/frontend/wallets/${wallet_id}/users/${user_data_uuid}`),
|
|
31
|
+
activate: ({ wallet_id, user_data_uuid, }) => apiClientV1Frontend.postRequest(`/frontend/wallets/${wallet_id}/users/${user_data_uuid}/activate`),
|
|
32
|
+
deactivate: ({ wallet_id, user_data_uuid, }) => apiClientV1Frontend.postRequest(`/frontend/wallets/${wallet_id}/users/${user_data_uuid}/deactivate`),
|
|
33
|
+
},
|
|
34
|
+
invites: {
|
|
35
|
+
info: (params) => apiClientV1Frontend.getRequest('/frontend/wallets/invite-info', {
|
|
36
|
+
params,
|
|
37
|
+
}),
|
|
38
|
+
accept: (data) => apiClientV1Frontend.postRequest('/frontend/wallets/accept-invite', {
|
|
39
|
+
data,
|
|
40
|
+
}),
|
|
41
|
+
decline: (data) => apiClientV1Frontend.postRequest('/frontend/wallets/decline-invite', { data }),
|
|
42
|
+
getAll: ({ wallet_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/wallets/${wallet_id}/invites`, { params }),
|
|
43
|
+
create: ({ wallet_id, ...data }) => apiClientV1Frontend.postRequest(`/frontend/wallets/${wallet_id}/invites`, { data }),
|
|
44
|
+
getById: ({ wallet_id, invite_id, }) => apiClientV1Frontend.getRequest(`/frontend/wallets/${wallet_id}/invites/${invite_id}`),
|
|
45
|
+
delete: ({ wallet_id, invite_id, }) => apiClientV1Frontend.deleteRequest(`/frontend/wallets/${wallet_id}/invites/${invite_id}`),
|
|
32
46
|
},
|
|
33
47
|
};
|
|
@@ -45,6 +45,12 @@ export declare const apiClientV2: {
|
|
|
45
45
|
deleteRequest: (url: string, config?: AxiosRequestConfig) => Promise<any>;
|
|
46
46
|
getRequest: <T>(url: string, config?: AxiosRequestConfig) => Promise<T>;
|
|
47
47
|
};
|
|
48
|
+
export declare const apiClientV1Frontend: {
|
|
49
|
+
patchRequest: <T>(url: string, config?: AxiosRequestConfig) => Promise<T>;
|
|
50
|
+
postRequest: <T>(url: string, config?: AxiosRequestConfig) => Promise<T>;
|
|
51
|
+
deleteRequest: (url: string, config?: AxiosRequestConfig) => Promise<any>;
|
|
52
|
+
getRequest: <T>(url: string, config?: AxiosRequestConfig) => Promise<T>;
|
|
53
|
+
};
|
|
48
54
|
export declare const apiClientTOTP: {
|
|
49
55
|
patchRequest: <T>(url: string, config?: AxiosRequestConfig) => Promise<T>;
|
|
50
56
|
postRequest: <T>(url: string, config?: AxiosRequestConfig) => Promise<T>;
|
|
@@ -227,6 +227,11 @@ export const apiClientV2 = createApiClient({
|
|
|
227
227
|
isBearerToken: true,
|
|
228
228
|
tenantId: envTenantId,
|
|
229
229
|
});
|
|
230
|
+
export const apiClientV1Frontend = createApiClient({
|
|
231
|
+
baseURL: apiV1BaseURL,
|
|
232
|
+
isBearerToken: true,
|
|
233
|
+
tenantId: envTenantId,
|
|
234
|
+
});
|
|
230
235
|
export const apiClientTOTP = createApiClient({
|
|
231
236
|
baseURL: apiTOTPBaseURL,
|
|
232
237
|
isBearerToken: true,
|