@riocrypto/common 1.0.1113 → 1.0.1114

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.
@@ -56,16 +56,13 @@ export declare class RioClient {
56
56
  getBankPayment(orderId: string): Promise<BankPayment>;
57
57
  verifyBankPayment(orderId: string): Promise<any>;
58
58
  sendPhoneAuthCode(phoneNumber: string, isNewPhoneNumber: boolean): Promise<void>;
59
- getAuth(phoneNumber?: string): Promise<{
60
- auth: Auth;
61
- missing: string[];
62
- }>;
59
+ getAuth(phoneNumber?: string): Promise<Auth>;
63
60
  authHasSecurityQuestion(): Promise<Boolean>;
64
61
  signout(): Promise<void>;
65
62
  verifyPhoneCode(phoneNumber: string, code: string): Promise<void>;
66
- signin(password: string): Promise<{
63
+ signin(password: string): Promise<Auth>;
64
+ signup(password: string): Promise<{
67
65
  auth: Auth;
68
- missing: string[];
69
66
  isAuthorizedPhoneNumberAuth: boolean;
70
67
  }>;
71
68
  refreshToken(): Promise<void>;
@@ -115,10 +112,7 @@ export declare class RioClient {
115
112
  addAuthorizedPhoneNumber(phoneNumber: string): Promise<User>;
116
113
  deleteAuthorizedPhoneNumber(phoneNumber: string): Promise<User>;
117
114
  createKushkiBankPayment(orderId: string): Promise<any>;
118
- updateAuth(update: AuthUpdate, id?: string): Promise<{
119
- auth: Auth;
120
- missing: string[];
121
- }>;
115
+ updateAuth(update: AuthUpdate, id?: string): Promise<Auth>;
122
116
  getInvoice(orderId: string): Promise<Invoice>;
123
117
  getCryptoBalance(asset: Crypto, userId?: string): Promise<number>;
124
118
  }
@@ -155,7 +155,7 @@ class RioClient {
155
155
  }
156
156
  sendPhoneAuthCode(phoneNumber, isNewPhoneNumber) {
157
157
  return __awaiter(this, void 0, void 0, function* () {
158
- yield this.axios.post("/api/auth/phone/send", {
158
+ yield this.axios.post("/api/auth/send-code", {
159
159
  phoneNumber,
160
160
  isNewPhoneNumber,
161
161
  });
@@ -180,7 +180,7 @@ class RioClient {
180
180
  }
181
181
  verifyPhoneCode(phoneNumber, code) {
182
182
  return __awaiter(this, void 0, void 0, function* () {
183
- yield this.axios.post("/api/auth/phone/verify", {
183
+ yield this.axios.post("/api/auth/verify-code", {
184
184
  phoneNumber,
185
185
  code,
186
186
  });
@@ -188,7 +188,15 @@ class RioClient {
188
188
  }
189
189
  signin(password) {
190
190
  return __awaiter(this, void 0, void 0, function* () {
191
- const response = yield this.axios.post("/api/auth", {
191
+ const response = yield this.axios.post("/api/auth/signin", {
192
+ password,
193
+ });
194
+ return response.data;
195
+ });
196
+ }
197
+ signup(password) {
198
+ return __awaiter(this, void 0, void 0, function* () {
199
+ const response = yield this.axios.post("/api/auth/signup", {
192
200
  password,
193
201
  });
194
202
  return response.data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.1113",
3
+ "version": "1.0.1114",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",