@riocrypto/common-server 1.0.1760 → 1.0.1762

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.
@@ -37,6 +37,7 @@ declare class ClusterClient {
37
37
  resetOrderFXData(orderId: string): Promise<void>;
38
38
  deleteInvoice(id: string): Promise<void>;
39
39
  deleteRecord(id: string): Promise<void>;
40
+ registerUserWithCoincover(userId: string): Promise<void>;
40
41
  }
41
42
  export declare const buildClusterClient: () => Promise<ClusterClient>;
42
43
  export {};
@@ -310,6 +310,15 @@ class ClusterClient {
310
310
  });
311
311
  });
312
312
  }
313
+ registerUserWithCoincover(userId) {
314
+ return __awaiter(this, void 0, void 0, function* () {
315
+ yield this.axios.post(`${this.baseUrl}/api/users/${userId}/coincover`, {}, {
316
+ headers: {
317
+ "x-cluster-api-key": this.clusterApiKey,
318
+ },
319
+ });
320
+ });
321
+ }
313
322
  }
314
323
  const buildClusterClient = () => __awaiter(void 0, void 0, void 0, function* () {
315
324
  // Retrieve secrets asynchronously
@@ -11,6 +11,7 @@ const sanitizeUserDoc = (doc) => {
11
11
  delete obj.risk;
12
12
  delete obj.quotationTime;
13
13
  delete obj.rioBankAccount;
14
+ delete obj.registeredWithCoincover;
14
15
  return obj;
15
16
  };
16
17
  exports.sanitizeUserDoc = sanitizeUserDoc;
@@ -3,6 +3,7 @@ import { Mongoose, Model, Document } from "mongoose";
3
3
  interface UserAttrs {
4
4
  createdAt: Date;
5
5
  authIds?: string[];
6
+ registeredWithCoincover?: boolean;
6
7
  individualData?: {
7
8
  firstName: string;
8
9
  middleName?: string;
@@ -114,6 +115,7 @@ interface UserDoc extends Document {
114
115
  _id: string;
115
116
  createdAt: Date;
116
117
  authIds?: string[];
118
+ registeredWithCoincover?: boolean;
117
119
  individualData?: {
118
120
  firstName: string;
119
121
  middleName?: string;
@@ -20,6 +20,9 @@ const buildUser = (mongoose) => {
20
20
  type: String,
21
21
  required: true,
22
22
  },
23
+ registeredWithCoincover: {
24
+ type: Boolean,
25
+ },
23
26
  phoneNumber: {
24
27
  type: String,
25
28
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1760",
3
+ "version": "1.0.1762",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -26,7 +26,7 @@
26
26
  "@google-cloud/secret-manager": "^5.3.0",
27
27
  "@google-cloud/storage": "^6.9.5",
28
28
  "@hyperdx/node-opentelemetry": "^0.4.2",
29
- "@riocrypto/common": "^1.0.1549",
29
+ "@riocrypto/common": "^1.0.1551",
30
30
  "@types/express": "^4.17.13",
31
31
  "axios": "^1.6.0",
32
32
  "crypto-js": "^4.2.0",