@riocrypto/common-server 1.0.1337 → 1.0.1338

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.
@@ -11,6 +11,8 @@ declare class ClusterClient {
11
11
  limit: number;
12
12
  used: number;
13
13
  }>;
14
+ sendSMSCode(phoneNumber: string): Promise<void>;
15
+ verifySMSCode(phoneNumber: string, code: string): Promise<void>;
14
16
  }
15
17
  export declare const buildClusterClient: () => Promise<ClusterClient>;
16
18
  export {};
@@ -107,6 +107,24 @@ class ClusterClient {
107
107
  return response.data;
108
108
  });
109
109
  }
110
+ sendSMSCode(phoneNumber) {
111
+ return __awaiter(this, void 0, void 0, function* () {
112
+ yield this.axios.post(`${this.baseUrl}/api/auth/send-code`, { phoneNumber }, {
113
+ headers: {
114
+ "x-cluster-api-key": this.clusterApiKey,
115
+ },
116
+ });
117
+ });
118
+ }
119
+ verifySMSCode(phoneNumber, code) {
120
+ return __awaiter(this, void 0, void 0, function* () {
121
+ yield this.axios.post(`${this.baseUrl}/api/auth/verify-code`, { phoneNumber, code }, {
122
+ headers: {
123
+ "x-cluster-api-key": this.clusterApiKey,
124
+ },
125
+ });
126
+ });
127
+ }
110
128
  }
111
129
  const buildClusterClient = () => __awaiter(void 0, void 0, void 0, function* () {
112
130
  // Retrieve secrets asynchronously
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1337",
3
+ "version": "1.0.1338",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",