@riocrypto/common-server 1.0.1802 → 1.0.1804

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.
@@ -1,4 +1,4 @@
1
- import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount, ChainedQuote } from "@riocrypto/common";
1
+ import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount, ChainedQuote, AuthRole, Auth } from "@riocrypto/common";
2
2
  declare class ClusterClient {
3
3
  private baseUrl;
4
4
  private clusterApiKey;
@@ -12,6 +12,7 @@ declare class ClusterClient {
12
12
  createOrder(quoteId: string, cryptoAddress?: string, notes?: string, externalAccountId?: string): Promise<Order>;
13
13
  confirmPayment(orderId: string): Promise<void>;
14
14
  createBitsoBankAccount(userId: string): Promise<BitsoBankAccount>;
15
+ createAuthWithoutRegistration(phoneNumber: string, firstName: string, lastName: string, role?: AuthRole): Promise<Auth>;
15
16
  getLiquidityAvailable(): Promise<{
16
17
  buy: number;
17
18
  sell: number;
@@ -196,6 +196,21 @@ class ClusterClient {
196
196
  return response.data;
197
197
  });
198
198
  }
199
+ createAuthWithoutRegistration(phoneNumber, firstName, lastName, role) {
200
+ return __awaiter(this, void 0, void 0, function* () {
201
+ const response = yield this.axios.post(`${this.baseUrl}/api/auth/unregistered`, {
202
+ phoneNumber,
203
+ firstName,
204
+ lastName,
205
+ role,
206
+ }, {
207
+ headers: {
208
+ "x-cluster-api-key": this.clusterApiKey,
209
+ },
210
+ });
211
+ return response.data;
212
+ });
213
+ }
199
214
  getLiquidityAvailable() {
200
215
  return __awaiter(this, void 0, void 0, function* () {
201
216
  const { data } = yield this.axios.get(`${this.baseUrl}/api/wallet/rio-balances/usd`, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1802",
3
+ "version": "1.0.1804",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",