@riocrypto/common 1.0.933 → 1.0.936

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.
@@ -28,7 +28,7 @@ import { AdminTask } from "../types/admin-task";
28
28
  import { AdminTaskType } from "../types/admin-task-type";
29
29
  import { ImportOrderInput } from "../types/import-order-input";
30
30
  import { Invoice } from "../types/invoice";
31
- import { AddressQuery } from "../types/crypto-address-query";
31
+ import { CryptoAddressQuery } from "../types/crypto-address-query";
32
32
  export declare class RioAdminClient {
33
33
  private axios;
34
34
  constructor(axios: AxiosStatic | AxiosInstance);
@@ -101,7 +101,7 @@ export declare class RioAdminClient {
101
101
  getOrder(id: string): Promise<Order>;
102
102
  createBankPayout(oid: string, bankAccountId: string): Promise<BankPayout>;
103
103
  getBankPayout(orderId: string): Promise<BankPayout>;
104
- getCryptoAddresses(page: number, limit?: number, query?: AddressQuery): Promise<CryptoAddress[]>;
104
+ getCryptoAddresses(page: number, limit?: number, query?: CryptoAddressQuery): Promise<CryptoAddress[]>;
105
105
  createCryptoAddress(address: string, crypto: Crypto, userId: string, label?: string): Promise<CryptoAddress>;
106
106
  createBankAccount(userId: string, country: Country, fiat: Fiat, bankName: string, accountHolderName: string, accountNumber: string, swiftCode?: string, notes?: string): Promise<BankAccount>;
107
107
  updateBankAccount(id: string, userId?: string, country?: Country, fiat?: Fiat, bankName?: string, accountHolderName?: string, accountNumber?: string, swiftCode?: string, notes?: string, approved?: boolean): Promise<BankAccount>;
@@ -347,7 +347,7 @@ class RioAdminClient {
347
347
  }
348
348
  createCryptoAddress(address, crypto, userId, label) {
349
349
  return __awaiter(this, void 0, void 0, function* () {
350
- const response = yield this.axios.post(`/api/address`, {
350
+ const response = yield this.axios.post(`/api/addresses`, {
351
351
  address,
352
352
  crypto,
353
353
  userId,
@@ -23,7 +23,7 @@ import { UserQuery } from "../types/user-query";
23
23
  import { OrderQuery } from "../types/order-query";
24
24
  import { BankAccountQuery } from "../types/bank-account-query";
25
25
  import { Invoice } from "../types/invoice";
26
- import { AddressQuery } from "../types/crypto-address-query";
26
+ import { CryptoAddressQuery } from "../types/crypto-address-query";
27
27
  export declare class RioClient {
28
28
  private axios;
29
29
  constructor(axios: AxiosStatic | AxiosInstance);
@@ -75,7 +75,7 @@ export declare class RioClient {
75
75
  account_owner_name: string;
76
76
  last_4: string;
77
77
  }[]>;
78
- getCryptoAddresses(page: number, limit?: number, query?: AddressQuery): Promise<CryptoAddress[]>;
78
+ getCryptoAddresses(page: number, limit?: number, query?: CryptoAddressQuery): Promise<CryptoAddress[]>;
79
79
  createCryptoAddress(address: string, crypto: Crypto, userId?: string, label?: string): Promise<CryptoAddress>;
80
80
  createBridgePlaidLink(userId: string): Promise<string>;
81
81
  createBankAccount(userId: string, country: Country, fiat: Fiat, bankName: string, accountHolderName: string, accountNumber: string, swiftCode?: string, notes?: string): Promise<BankAccount>;
@@ -239,9 +239,11 @@ class RioClient {
239
239
  }
240
240
  createCryptoAddress(address, crypto, userId, label) {
241
241
  return __awaiter(this, void 0, void 0, function* () {
242
- const response = yield this.axios.post(`/api/address`, {
242
+ const response = yield this.axios.post(`/api/addresses`, {
243
243
  address,
244
244
  crypto,
245
+ userId,
246
+ label,
245
247
  });
246
248
  return response.data;
247
249
  });
@@ -1,4 +1,4 @@
1
- export interface AddressQuery {
1
+ export interface CryptoAddressQuery {
2
2
  userId?: string;
3
3
  address?: string;
4
4
  crypto?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.933",
3
+ "version": "1.0.936",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",