@riocrypto/common-server 1.0.860 → 1.0.862

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.
@@ -13,6 +13,17 @@ declare class BridgeClient {
13
13
  tos_status: string;
14
14
  created_at: string;
15
15
  }>;
16
+ getKYCLink(id: string): Promise<{
17
+ id: string;
18
+ email: string;
19
+ type: "individual" | "business";
20
+ kyc_link: string;
21
+ tos_link: string;
22
+ kyc_status: string;
23
+ tos_status: string;
24
+ created_at: string;
25
+ customer_id?: string;
26
+ }>;
16
27
  }
17
28
  export declare const buildBridgeClient: () => Promise<BridgeClient>;
18
29
  export {};
@@ -42,6 +42,17 @@ class BridgeClient {
42
42
  return data;
43
43
  });
44
44
  }
45
+ getKYCLink(id) {
46
+ return __awaiter(this, void 0, void 0, function* () {
47
+ const { data } = yield axios_1.default.get(`${this.baseUrl}/v0/customers/kyc_links/${id}`, {
48
+ headers: {
49
+ "Api-Key": this.apiKey,
50
+ "Idempotency-Key": (0, uuid_1.v4)(),
51
+ },
52
+ });
53
+ return data;
54
+ });
55
+ }
45
56
  }
46
57
  const buildBridgeClient = () => __awaiter(void 0, void 0, void 0, function* () {
47
58
  // Retrieve secrets asynchronously
@@ -35,6 +35,7 @@ interface UserAttrs {
35
35
  rfc?: string;
36
36
  mexicoFiscalRegimenCode?: number;
37
37
  mexicoFiscalName?: string;
38
+ usEnabled: boolean;
38
39
  }
39
40
  interface UserModel extends Model<UserDoc> {
40
41
  build(attrs: UserAttrs): UserDoc;
@@ -75,6 +76,7 @@ interface UserDoc extends Document {
75
76
  rfc?: string;
76
77
  mexicoFiscalRegimenCode?: number;
77
78
  mexicoFiscalName?: string;
79
+ usEnabled: boolean;
78
80
  }
79
81
  declare const buildUser: (mongoose: Mongoose) => UserModel;
80
82
  export { buildUser, UserDoc };
@@ -138,6 +138,9 @@ const buildUser = (mongoose) => {
138
138
  mexicoFiscalName: {
139
139
  type: String,
140
140
  },
141
+ usEnabled: {
142
+ type: Boolean,
143
+ },
141
144
  }, {
142
145
  toJSON: {
143
146
  transform(doc, ret) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.860",
3
+ "version": "1.0.862",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",