@riocrypto/common-server 1.0.1362 → 1.0.1364

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.
@@ -7,7 +7,7 @@ declare class ClusterClient {
7
7
  getNewQuote(orderId: string, quote: Quote, newAmountFiat?: number, newAmountCrypto?: number): Promise<Quote>;
8
8
  getQuote(userId: string, side: Side, country: Country, fiat: Fiat, crypto: Crypto, amountFiat?: number, amountCrypto?: number): Promise<Quote>;
9
9
  getCryptoAddresses(userId: string, crypto: Crypto): Promise<CryptoAddress[]>;
10
- createOrder(quoteId: string, cryptoAddress?: string, notes?: string): Promise<Order>;
10
+ createOrder(quoteId: string, cryptoAddress?: string, notes?: string, externalAccountId?: string): Promise<Order>;
11
11
  confirmPayment(orderId: string): Promise<void>;
12
12
  createBitsoBankAccount(userId: string): Promise<BitsoBankAccount>;
13
13
  getBalance(asset: Crypto | Fiat): Promise<number>;
@@ -103,12 +103,13 @@ class ClusterClient {
103
103
  return response.data;
104
104
  });
105
105
  }
106
- createOrder(quoteId, cryptoAddress, notes) {
106
+ createOrder(quoteId, cryptoAddress, notes, externalAccountId) {
107
107
  return __awaiter(this, void 0, void 0, function* () {
108
108
  const response = yield this.axios.post(`${this.baseUrl}/api/orders`, {
109
109
  quoteId,
110
110
  cryptoAddress: cryptoAddress ? cryptoAddress : undefined,
111
111
  notes: notes ? notes : undefined,
112
+ externalAccountId: externalAccountId ? externalAccountId : undefined,
112
113
  }, {
113
114
  headers: {
114
115
  "x-cluster-api-key": this.clusterApiKey,
@@ -15,11 +15,12 @@ interface TelegramSessionAttrs {
15
15
  amountCrypto?: number;
16
16
  country?: Country;
17
17
  quoteMode?: "fiat" | "crypto";
18
+ USBankTransferMethod?: "ach_push" | "wire";
18
19
  };
19
20
  quoteId?: string;
20
21
  orderId?: string;
21
22
  cryptoAddress?: string;
22
- externalAccount?: string;
23
+ externalAccountId?: string;
23
24
  }
24
25
  interface TelegramSessionDoc extends mongoose.Document {
25
26
  createdAt: Date;
@@ -36,11 +37,12 @@ interface TelegramSessionDoc extends mongoose.Document {
36
37
  amountCrypto?: number;
37
38
  country?: Country;
38
39
  quoteMode?: "fiat" | "crypto";
40
+ USBankTransferMethod?: "ach_push" | "wire";
39
41
  };
40
42
  quoteId?: string;
41
43
  orderId?: string;
42
44
  cryptoAddress?: string;
43
- externalAccount?: string;
45
+ externalAccountId?: string;
44
46
  }
45
47
  interface TelegramSessionModel extends mongoose.Model<TelegramSessionDoc> {
46
48
  build(attrs: TelegramSessionAttrs): TelegramSessionDoc;
@@ -52,6 +52,9 @@ const buildTelegramSession = (mongoose) => {
52
52
  country: {
53
53
  type: String,
54
54
  },
55
+ USBankTransferMethod: {
56
+ type: String,
57
+ },
55
58
  quoteMode: {
56
59
  type: String,
57
60
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1362",
3
+ "version": "1.0.1364",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",