@riocrypto/common 1.0.1707 → 1.0.1712

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/build/index.d.ts CHANGED
@@ -65,7 +65,6 @@ export * from "./events/crypto-payout-completed-event";
65
65
  export * from "./events/liquidity-fill-failed-event";
66
66
  export * from "./events/crypto-payout-failed-event";
67
67
  export * from "./events/liquidity-being-sourced-event";
68
- export * from "./events/identity-verification-passed-event";
69
68
  export * from "./events/admin-created-event";
70
69
  export * from "./events/bank-payment-completed-event";
71
70
  export * from "./events/bank-payment-created-event";
@@ -102,8 +101,6 @@ export * from "./events/liquidity-needs-sourcing-event";
102
101
  export * from "./events/liquidity-insufficient-event";
103
102
  export * from "./events/fees-failed-event";
104
103
  export * from "./events/deposit-address-failed-event";
105
- export * from "./events/identity-verification-passed-event";
106
- export * from "./events/identity-verification-failed-event";
107
104
  export * from "./events/bridge-onboarding-completed-event";
108
105
  export * from "./events/bridge-onboarding-failed-event";
109
106
  export * from "./events/bridge-onboarding-started-event";
@@ -138,9 +135,6 @@ export * from "./events/circle-address-ready-event";
138
135
  export * from "./events/circle-address-failed-event";
139
136
  export * from "./events/chained-quote-reissued-event";
140
137
  export * from "./events/bitso-consumer-contact-created-event";
141
- export * from "./events/identity-verification-in-review-event";
142
- export * from "./events/identity-verification-passed-event";
143
- export * from "./events/identity-verification-failed-event";
144
138
  export * from "./events/ubo-created-event";
145
139
  export * from "./events/ubo-onboarding-approved-event";
146
140
  export * from "./events/ubo-onboarding-failed-event";
@@ -250,8 +244,6 @@ export * from "./types/UBO";
250
244
  export * from "./types/UBO-input";
251
245
  export * from "./types/UBO-update";
252
246
  export * from "./types/immigration-status";
253
- export * from "./types/IdentityVerificationType";
254
- export * from "./types/KYC";
255
247
  export * from "./types/bid";
256
248
  export * from "./types/bid-status";
257
249
  export * from "./types/auth-role";
@@ -271,6 +263,7 @@ export * from "./types/alert-trigger-condition";
271
263
  export * from "./types/admin-action";
272
264
  export * from "./types/admin-action-type";
273
265
  export * from "./types/temporary-verification";
266
+ export * from "./types/internal-balances";
274
267
  export * from "./types/admin-action-status";
275
268
  export * from "./types/arbitrage-settings";
276
269
  export * from "./types/arbitrage-opportunity";
@@ -301,7 +294,6 @@ export * from "./classes/ProcessorClass";
301
294
  export * from "./classes/LiquidityProviderClass";
302
295
  export * from "./classes/PartnerClass";
303
296
  export * from "./classes/ImmigrationStatusClass";
304
- export * from "./helpers/get-user-from-client-helper";
305
297
  export * from "./helpers/validate-address";
306
298
  export * from "./helpers/humanize-order-status";
307
299
  export * from "./helpers/humanize-chained-order-status";
@@ -319,7 +311,5 @@ export * from "./helpers/get-address-for-testing";
319
311
  export * from "./helpers/humanize-admin-auth-role";
320
312
  export * from "./helpers/humanize-auth-role";
321
313
  export * from "./helpers/get-base-url";
322
- export * from "./clients/rio-client";
323
- export * from "./clients/rio-admin-client";
324
314
  export * from "./constants/mexico-fiscal-regimens";
325
315
  export * from "./constants/mexican-banks";
package/build/index.js CHANGED
@@ -81,7 +81,6 @@ __exportStar(require("./events/crypto-payout-completed-event"), exports);
81
81
  __exportStar(require("./events/liquidity-fill-failed-event"), exports);
82
82
  __exportStar(require("./events/crypto-payout-failed-event"), exports);
83
83
  __exportStar(require("./events/liquidity-being-sourced-event"), exports);
84
- __exportStar(require("./events/identity-verification-passed-event"), exports);
85
84
  __exportStar(require("./events/admin-created-event"), exports);
86
85
  __exportStar(require("./events/bank-payment-completed-event"), exports);
87
86
  __exportStar(require("./events/bank-payment-created-event"), exports);
@@ -118,8 +117,6 @@ __exportStar(require("./events/liquidity-needs-sourcing-event"), exports);
118
117
  __exportStar(require("./events/liquidity-insufficient-event"), exports);
119
118
  __exportStar(require("./events/fees-failed-event"), exports);
120
119
  __exportStar(require("./events/deposit-address-failed-event"), exports);
121
- __exportStar(require("./events/identity-verification-passed-event"), exports);
122
- __exportStar(require("./events/identity-verification-failed-event"), exports);
123
120
  __exportStar(require("./events/bridge-onboarding-completed-event"), exports);
124
121
  __exportStar(require("./events/bridge-onboarding-failed-event"), exports);
125
122
  __exportStar(require("./events/bridge-onboarding-started-event"), exports);
@@ -154,9 +151,6 @@ __exportStar(require("./events/circle-address-ready-event"), exports);
154
151
  __exportStar(require("./events/circle-address-failed-event"), exports);
155
152
  __exportStar(require("./events/chained-quote-reissued-event"), exports);
156
153
  __exportStar(require("./events/bitso-consumer-contact-created-event"), exports);
157
- __exportStar(require("./events/identity-verification-in-review-event"), exports);
158
- __exportStar(require("./events/identity-verification-passed-event"), exports);
159
- __exportStar(require("./events/identity-verification-failed-event"), exports);
160
154
  __exportStar(require("./events/ubo-created-event"), exports);
161
155
  __exportStar(require("./events/ubo-onboarding-approved-event"), exports);
162
156
  __exportStar(require("./events/ubo-onboarding-failed-event"), exports);
@@ -266,8 +260,6 @@ __exportStar(require("./types/UBO"), exports);
266
260
  __exportStar(require("./types/UBO-input"), exports);
267
261
  __exportStar(require("./types/UBO-update"), exports);
268
262
  __exportStar(require("./types/immigration-status"), exports);
269
- __exportStar(require("./types/IdentityVerificationType"), exports);
270
- __exportStar(require("./types/KYC"), exports);
271
263
  __exportStar(require("./types/bid"), exports);
272
264
  __exportStar(require("./types/bid-status"), exports);
273
265
  __exportStar(require("./types/auth-role"), exports);
@@ -287,6 +279,7 @@ __exportStar(require("./types/alert-trigger-condition"), exports);
287
279
  __exportStar(require("./types/admin-action"), exports);
288
280
  __exportStar(require("./types/admin-action-type"), exports);
289
281
  __exportStar(require("./types/temporary-verification"), exports);
282
+ __exportStar(require("./types/internal-balances"), exports);
290
283
  __exportStar(require("./types/admin-action-status"), exports);
291
284
  __exportStar(require("./types/arbitrage-settings"), exports);
292
285
  __exportStar(require("./types/arbitrage-opportunity"), exports);
@@ -317,7 +310,6 @@ __exportStar(require("./classes/ProcessorClass"), exports);
317
310
  __exportStar(require("./classes/LiquidityProviderClass"), exports);
318
311
  __exportStar(require("./classes/PartnerClass"), exports);
319
312
  __exportStar(require("./classes/ImmigrationStatusClass"), exports);
320
- __exportStar(require("./helpers/get-user-from-client-helper"), exports);
321
313
  __exportStar(require("./helpers/validate-address"), exports);
322
314
  __exportStar(require("./helpers/humanize-order-status"), exports);
323
315
  __exportStar(require("./helpers/humanize-chained-order-status"), exports);
@@ -335,7 +327,5 @@ __exportStar(require("./helpers/get-address-for-testing"), exports);
335
327
  __exportStar(require("./helpers/humanize-admin-auth-role"), exports);
336
328
  __exportStar(require("./helpers/humanize-auth-role"), exports);
337
329
  __exportStar(require("./helpers/get-base-url"), exports);
338
- __exportStar(require("./clients/rio-client"), exports);
339
- __exportStar(require("./clients/rio-admin-client"), exports);
340
330
  __exportStar(require("./constants/mexico-fiscal-regimens"), exports);
341
331
  __exportStar(require("./constants/mexican-banks"), exports);
@@ -0,0 +1,8 @@
1
+ import { Crypto } from "./crypto";
2
+ import { Fiat } from "./fiat";
3
+ import { TreasuryProvider } from "./treasury-provider";
4
+ export declare type InternalBalances = {
5
+ [K in keyof typeof TreasuryProvider]: {
6
+ [key in Fiat & Crypto]: number;
7
+ };
8
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.1707",
3
+ "version": "1.0.1712",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -1,351 +0,0 @@
1
- import { AxiosInstance, AxiosStatic } from "axios";
2
- import { Auth } from "../types/auth";
3
- import { AuthUpdate } from "../types/auth-update";
4
- import { BankPayout } from "../types/bank-payout";
5
- import { CryptoAddress } from "../types/crypto-address";
6
- import { Country } from "../types/country";
7
- import { Fiat } from "../types/fiat";
8
- import { Order } from "../types/order";
9
- import { OrderInput } from "../types/order-input";
10
- import { PaymentMethod } from "../types/payment-method";
11
- import { PayoutMethod } from "../types/payout-method";
12
- import { RioSettings } from "../types/rio-settings";
13
- import { RioSettingsUpdate } from "../types/rio-settings-update";
14
- import { User } from "../types/user";
15
- import { UserInput } from "../types/user-input";
16
- import { UserUpdate } from "../types/user-update";
17
- import { BankPayment } from "../types/bank-payment";
18
- import { BankAccount } from "../types/bank-account";
19
- import { Quote } from "../types/quote";
20
- import { Crypto } from "../types/crypto";
21
- import { QuoteInput } from "../types/quote-input";
22
- import { OrderQuery } from "../types/order-query";
23
- import { UserQuery } from "../types/user-query";
24
- import { BankAccountQuery } from "../types/bank-account-query";
25
- import { AdminTask } from "../types/admin-task";
26
- import { AdminTaskType } from "../types/admin-task-type";
27
- import { ImportOrderInput } from "../types/import-order-input";
28
- import { Invoice } from "../types/invoice";
29
- import { CryptoAddressQuery } from "../types/crypto-address-query";
30
- import { ChainedOrderQuery } from "../types/chained-order-query";
31
- import { ChainedOrder } from "../types/chained-order";
32
- import { ChainedQuoteInput } from "../types/chained-quote-input";
33
- import { ChainedQuote } from "../types/chained-quote";
34
- import { ChainedOrderInput } from "../types/chained-order-input";
35
- import { InternalSwap } from "../types/internal-swap";
36
- import { CountryOfOrigin } from "../types/country-of-origin";
37
- import { KYCFileType } from "../types/kyc-file-type";
38
- import { UserType } from "../types/user-type";
39
- import { UBOInput } from "../types/UBO-input";
40
- import { UBO } from "../types/UBO";
41
- import { UBOUpdate } from "../types/UBO-update";
42
- import { IdentityVerificationType } from "../types/IdentityVerificationType";
43
- import { AdminAuth } from "../types/admin-auth";
44
- import { AdminAuthInput } from "../types/admin-auth-input";
45
- import { BidInput } from "../types/bid-input";
46
- import { RioBankAccount } from "../types/rio-bank-account";
47
- import { SwapProvider } from "../types/swap-provider";
48
- import { SwapOrigin } from "../types/swap-origin";
49
- import { AddressVerification } from "../types/address-verification";
50
- import { BankAccountVerification } from "../types/bank-account-verification";
51
- import { MultipartLiquidityOrder } from "../types/multipart-liquidity-order";
52
- import { LiquidityOrderRecipe } from "../types/liquidity-order-recipe";
53
- import { Onboarding } from "../types/onboarding";
54
- import { AlertTriggerCondition } from "../types/alert-trigger-condition";
55
- import { Side } from "../types/side";
56
- import { Alert } from "../types/alert";
57
- import { AlertType } from "../types/alert-type";
58
- import { WebhookType } from "../types/webhook-type";
59
- import { WebhookRegistration } from "../types/webhook-registration";
60
- import { AdminActionType } from "../types/admin-action-type";
61
- import { AdminAction } from "../types/admin-action";
62
- import { ArbitrageSettings } from "../types/arbitrage-settings";
63
- import { ArbitrageOpportunity } from "../types/arbitrage-opportunity";
64
- export declare class RioAdminClient {
65
- private axios;
66
- constructor(axios: AxiosStatic | AxiosInstance);
67
- getLiquidityAvailable(): Promise<{
68
- buy: number;
69
- sell: number;
70
- }>;
71
- exportOrders(page: number, startDate: Date, endDate: Date, query?: OrderQuery): Promise<Order[]>;
72
- getOrders(page: number, limit?: number, query?: OrderQuery, startDate?: Date, endDate?: Date): Promise<Order[]>;
73
- updateOrder(id: string, update: {
74
- notes: string;
75
- }): Promise<Order>;
76
- createQuote(input: QuoteInput): Promise<{
77
- quote: Quote;
78
- sufficientLiquidity: boolean;
79
- SPIDClosed: boolean;
80
- }>;
81
- updateQuote(id: string, update: any): Promise<Quote>;
82
- getQuote(id: string): Promise<Quote>;
83
- createBid(input: BidInput): Promise<void>;
84
- getBid(id: string): Promise<void>;
85
- getUsers(page: number, limit?: number, query?: UserQuery): Promise<User[]>;
86
- signinAdmin(email: string, password: string, authenticatorCode: string): Promise<any>;
87
- updateUser(update: UserUpdate, userId?: string): Promise<User>;
88
- uploadCOI(id: string, formData: FormData): Promise<User>;
89
- createTemporaryVerification(phoneNumber: string): Promise<{
90
- code: string;
91
- }>;
92
- createAlert({ userId, type, priceTrigger, liquidityTrigger, destinationType, telegramDestination, }: {
93
- userId: string;
94
- type: AlertType;
95
- priceTrigger?: {
96
- condition: AlertTriggerCondition;
97
- country: Country;
98
- value: number;
99
- side: Side;
100
- fiat: Fiat;
101
- crypto: Crypto;
102
- cooldown?: number;
103
- isRecurring?: boolean;
104
- };
105
- liquidityTrigger?: {
106
- condition: AlertTriggerCondition;
107
- value: number;
108
- side: Side;
109
- assetType?: "crypto" | "fiat";
110
- asset?: Crypto | Fiat;
111
- cooldown?: number;
112
- isRecurring?: boolean;
113
- };
114
- destinationType: "telegram";
115
- telegramDestination: {
116
- chatId?: string;
117
- username?: string;
118
- };
119
- }): Promise<{
120
- code: string;
121
- }>;
122
- getAlerts(): Promise<Alert[]>;
123
- getAlert(id: string): Promise<Alert>;
124
- deleteAlert(id: string): Promise<void>;
125
- deleteTemporaryVerification(id: string): Promise<{
126
- code: string;
127
- }>;
128
- getTemporaryVerifications(): Promise<{
129
- id: string;
130
- phoneNumber: string;
131
- }[]>;
132
- requestOnboardingReview(country: Country, userId?: string): Promise<User>;
133
- getOnboardingRequirements(userType: UserType, country: Country, countryOfOrigin: CountryOfOrigin): Promise<{
134
- textRequirements: ("personalId" | "taxId")[];
135
- fileRequirements: KYCFileType[];
136
- }>;
137
- uploadFile(id: string, country: CountryOfOrigin, fileType: KYCFileType, formData: FormData): Promise<User>;
138
- getUBO(id: string): Promise<UBO>;
139
- sendUBOOnboardingEmail(email: string, associatedUserId: string, country: Country): Promise<void>;
140
- getUBOS(page: number, limit?: number): Promise<UBO[]>;
141
- updateUBO(update: UBOUpdate, uboId?: string): Promise<UBO>;
142
- getUBOOnboardingRequirements(country: Country, countryOfOrigin: CountryOfOrigin): Promise<{
143
- textRequirements: ("personalId" | "taxId")[];
144
- fileRequirements: KYCFileType[];
145
- }>;
146
- uploadUBOFile(id: string, country: CountryOfOrigin, fileType: KYCFileType, formData: FormData): Promise<UBO>;
147
- uploadKYCReport(id: string, formData: FormData): Promise<User>;
148
- uploadCSF(id: string, formData: FormData): Promise<User>;
149
- uploadProofOfAddress(id: string, formData: FormData): Promise<User>;
150
- createVerificationLink(userId: string, firstName: string, lastName: string): Promise<string>;
151
- createOnboardingByLink(userType: UserType, countryOfOperation: Country, brokerId?: string, referrerId?: string): Promise<{
152
- id: string;
153
- kycLink: string;
154
- }>;
155
- createUSOnboardingByLink({ userType, businessName, firstName, middleName, lastName, secondLastName, email, brokerId, referrerId, }: {
156
- userType: UserType;
157
- businessName?: string;
158
- firstName?: string;
159
- middleName?: string;
160
- lastName?: string;
161
- secondLastName?: string;
162
- email: string;
163
- brokerId?: string;
164
- referrerId?: string;
165
- }): Promise<{
166
- id: string;
167
- kycLink: string;
168
- tosLink: string;
169
- }>;
170
- createIncrementalOnboardingByLink(userId: string, countryOfOperation: Country): Promise<{
171
- id: string;
172
- kycLink: string;
173
- }>;
174
- createIncrementalUSOnboardingByLink(userId: string): Promise<{
175
- id: string;
176
- kycLink: string;
177
- tosLink: string;
178
- }>;
179
- getOnboarding(id: string): Promise<Onboarding>;
180
- sendVerificationEmail(type: IdentityVerificationType, id: string, country: Country): Promise<void>;
181
- sendBridgeOnboardingEmail(userId: string): Promise<void>;
182
- createUBO(user: UBOInput): Promise<UBO>;
183
- updateAdminAuth(id: string, update: {
184
- email?: string;
185
- password?: string;
186
- newPassword?: string;
187
- }): Promise<AdminAuth>;
188
- getBridgeOnboardingLinks(userId: string): Promise<{
189
- tosLink: string;
190
- kycLink: string;
191
- }>;
192
- getAdminAuth(id: string): Promise<AdminAuth>;
193
- deleteAdminAuth(id: string): Promise<void>;
194
- getAdminAuthWithoutId(): Promise<AdminAuth>;
195
- getAdminAuths(): Promise<AdminAuth[]>;
196
- signoutAdmin(): Promise<void>;
197
- getRioSettings(): Promise<RioSettings>;
198
- createRioSettings(rioSettings: {
199
- platformFee: number;
200
- }): Promise<void>;
201
- updateRioSettings(update: RioSettingsUpdate): Promise<void>;
202
- confirmBankPayment(orderId: string, amountFiat?: number): Promise<any>;
203
- confirmBankPayout(orderId: string): Promise<any>;
204
- confirmLiquiditySourced(orderId: string): Promise<any>;
205
- getUser(userId: string): Promise<User>;
206
- acceptAdminTasks(adminId?: string): Promise<AdminAuth>;
207
- grantAdminAccessToUser(userId?: string): Promise<void>;
208
- stopAdminTasks(adminId?: string): Promise<AdminAuth>;
209
- getAdminTasks(taskTypes?: AdminTaskType[]): Promise<AdminTask[]>;
210
- markAdminTaskComplete(id: string): Promise<AdminTask>;
211
- createAdminAuth(adminAuth: AdminAuthInput): Promise<AdminAuth>;
212
- createUser(user: UserInput): Promise<User>;
213
- getBankPayment(orderId: string): Promise<BankPayment>;
214
- verifyBankPayment(orderId: string): Promise<any>;
215
- sendPhoneAuthCode(phoneNumber: string): Promise<{
216
- hasAuthenticatorEnabled: boolean;
217
- }>;
218
- createAdminAuthenticatorSecret(id: string): Promise<{
219
- secret: string;
220
- }>;
221
- getAuth(id: string): Promise<Auth>;
222
- getAuths(userId?: string): Promise<Auth[]>;
223
- authHasSecurityQuestion(): Promise<Boolean>;
224
- createBridgePlaidLink(userId: string): Promise<string>;
225
- refreshAdminToken(): Promise<void>;
226
- createOrder(order: OrderInput): Promise<Order>;
227
- getChainedOrders(page: number, limit?: number, query?: ChainedOrderQuery): Promise<ChainedOrder[]>;
228
- getChainedQuote(id: string): Promise<ChainedQuote>;
229
- getChainedOrder(id: string): Promise<ChainedOrder>;
230
- importOrder(order: ImportOrderInput): Promise<Order>;
231
- registerExchangeRate(orderId: string, amount: number, price: number, provider: string): Promise<void>;
232
- cancelOrder(id?: string): Promise<Order>;
233
- cancelChainedOrder(id?: string): Promise<void>;
234
- getOrder(id: string): Promise<Order>;
235
- createBankPayout(oid: string, bankAccountId: string): Promise<BankPayout>;
236
- updateBankPayout(id: string, { speiTrackingNumber, spidTrackingNumber, reference, }: {
237
- speiTrackingNumber?: string;
238
- spidTrackingNumber?: string;
239
- reference?: string;
240
- }): Promise<BankPayout>;
241
- createInternalSwap(originCrypto: Crypto, destinationCrypto: Crypto, amount: number, origin: SwapOrigin, destination: SwapOrigin, provider: SwapProvider): Promise<void>;
242
- expediteInternalSwap(id: string): Promise<void>;
243
- getInternalSwaps(page: number, limit?: number): Promise<InternalSwap[]>;
244
- createMultipartOrder(amount: number, recipe: LiquidityOrderRecipe, amountUSDToLeaveAtCoinbase?: number): Promise<MultipartLiquidityOrder>;
245
- updateMultipartOrder(id: string, amount?: number, recipe?: LiquidityOrderRecipe, amountUSDToLeaveAtCoinbase?: number): Promise<MultipartLiquidityOrder>;
246
- getMultipartOrders(page: number, limit?: number): Promise<MultipartLiquidityOrder[]>;
247
- getAddressVerification(cryptoAddressId: string): Promise<AddressVerification>;
248
- getBankAccountVerification(bankAccountId: string): Promise<BankAccountVerification>;
249
- getBankPayout(orderId: string): Promise<BankPayout>;
250
- startAddressVerification(addressId: string): Promise<void>;
251
- completeAddressVerification(addressId: string, amount: Number): Promise<void>;
252
- startBankAccountVerification(bankAccountId: string): Promise<void>;
253
- completeBankAccountVerification(bankAccountId: string, amount: Number): Promise<void>;
254
- getCryptoAddresses(page: number, limit?: number, query?: CryptoAddressQuery): Promise<CryptoAddress[]>;
255
- getCryptoAddress(id: string): Promise<CryptoAddress>;
256
- createChainedOrder(order: ChainedOrderInput): Promise<ChainedOrder>;
257
- createCryptoAddress(address: string, crypto: Crypto, userId: string, label?: string): Promise<CryptoAddress>;
258
- createChainedQuote(input: ChainedQuoteInput): Promise<{
259
- chainedQuote: ChainedQuote;
260
- sufficientLiquidity: boolean;
261
- }>;
262
- createBankAccount(userId: string, country: Country, fiat: Fiat, bankName: string, accountHolderName: string, accountNumber?: string, routingNumber?: string, CLABE?: string, CCI?: string, notes?: string, address?: {
263
- street1: string;
264
- street2?: string;
265
- city: string;
266
- state: string;
267
- postalCode: string;
268
- country: CountryOfOrigin;
269
- }): Promise<BankAccount>;
270
- updateBankAccount(id: string, data: {
271
- notes?: string;
272
- approved?: boolean;
273
- }): Promise<BankAccount>;
274
- deleteBankAccount(id: string): Promise<void>;
275
- createRioBankAccount(country: Country, fiat: Fiat, bankName?: string, bankAddress?: string, companyName?: string, companyAddress?: string, accountNumber?: string, CLABE?: string, CCI?: string, RUC?: string, RFC?: string): Promise<RioBankAccount>;
276
- updateRioBankAccount(id: string, country?: Country, fiat?: Fiat, bankName?: string, bankAddress?: string, companyName?: string, companyAddress?: string, accountNumber?: string, CLABE?: string, CCI?: string, RUC?: string, RFC?: string): Promise<RioBankAccount>;
277
- getRioBankAccounts(page: number, limit: number, query?: BankAccountQuery): Promise<RioBankAccount[]>;
278
- deleteRioBankAccount(id: string): Promise<void>;
279
- deleteAddress(id: string): Promise<void>;
280
- getFeesByVolume(): Promise<{
281
- days: number;
282
- fee: number;
283
- volume: number;
284
- }>;
285
- getTransactionLimits(userId: string): Promise<{
286
- limit: number;
287
- used: number;
288
- }>;
289
- getWeeklyVolume(): Promise<{
290
- volume: number;
291
- revenue: number;
292
- }>;
293
- getVolumeAndRevenueByDays(days?: Number, userId?: string): Promise<{
294
- volume: number;
295
- revenue: number;
296
- }>;
297
- getPastMonthsVolumeAndRevenue(months?: Number, userId?: string): Promise<{
298
- volume: number;
299
- revenue: number;
300
- }[]>;
301
- returnOrderToNotPaid(id: string): Promise<void>;
302
- getTotalUsers(months: number): Promise<{
303
- businessUsers: number;
304
- individualUsers: number;
305
- }[]>;
306
- getAverageMonthlyVolumes(userId?: string): Promise<{
307
- volume: number;
308
- revenue: number;
309
- }>;
310
- getBitsoX(bidPrice: number, bidAmount: number): Promise<{
311
- x: number;
312
- }>;
313
- getPaymentMethods(fiat: Fiat, country: Country): Promise<PaymentMethod[]>;
314
- getBankAccounts(page: number, limit: number, query?: BankAccountQuery): Promise<BankAccount[]>;
315
- getBankAccount(id: string): Promise<BankAccount>;
316
- getSupportedPayoutMethods(fiat: Fiat, country: Country): Promise<PayoutMethod[]>;
317
- createKushkiPayment(orderId: string, token: string): Promise<{
318
- paymentId: string;
319
- }>;
320
- addAuthorizedPhoneNumber(id: string, phoneNumber: string): Promise<User>;
321
- deleteAuthorizedPhoneNumber(phoneNumber: string, userId: string): Promise<User>;
322
- createKushkiBankPayment(orderId: string): Promise<any>;
323
- updateAuth(update: AuthUpdate, id: string): Promise<Auth>;
324
- deleteAuth(id: string): Promise<void>;
325
- getInvoice(orderId: string): Promise<Invoice>;
326
- createWebhookRegistration({ userId, brokerId, type, url, }: {
327
- userId?: string;
328
- brokerId?: string;
329
- type: WebhookType;
330
- url: string;
331
- }): Promise<{
332
- id: string;
333
- secret: string;
334
- }>;
335
- getWebhookRegistrations(page: number, query?: {
336
- userId?: string;
337
- brokerId?: string;
338
- }): Promise<WebhookRegistration[]>;
339
- getWebhookRegistration(id: string): Promise<WebhookRegistration>;
340
- deleteWebhookRegistration(id: string): Promise<void>;
341
- createAdminAction({ type, }: {
342
- type: AdminActionType;
343
- }, formData: FormData): Promise<AdminAction>;
344
- getAdminActions(page: number): Promise<AdminAction[]>;
345
- getAdminAction(id: string): Promise<AdminAction>;
346
- cancelAdminAction(id: string): Promise<void>;
347
- createArbitrageSettings(arbitrageSettings: ArbitrageSettings): Promise<ArbitrageSettings>;
348
- getArbitrageSettings(): Promise<ArbitrageSettings>;
349
- updateArbitrageSettings(arbitrageSettings: ArbitrageSettings): Promise<ArbitrageSettings>;
350
- getArbitrageOpportunities(page: number, limit: number): Promise<ArbitrageOpportunity[]>;
351
- }