@riocrypto/common-server 1.0.1791 → 1.0.1793

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.
@@ -197,6 +197,7 @@ declare class BridgeClient {
197
197
  last_4: string;
198
198
  active: boolean;
199
199
  }>;
200
+ deleteExternalAccount(customerId: string, externalAccountId: string): Promise<any>;
200
201
  }
201
202
  export declare const buildBridgeClient: () => Promise<BridgeClient>;
202
203
  export {};
@@ -224,6 +224,16 @@ class BridgeClient {
224
224
  return data;
225
225
  });
226
226
  }
227
+ deleteExternalAccount(customerId, externalAccountId) {
228
+ return __awaiter(this, void 0, void 0, function* () {
229
+ const { data } = yield axios_with_logging_1.default.delete(`${this.baseUrl}/v0/customers/${customerId}/external_accounts/${externalAccountId}`, {
230
+ headers: {
231
+ "Api-Key": this.apiKey,
232
+ },
233
+ });
234
+ return data;
235
+ });
236
+ }
227
237
  }
228
238
  const buildBridgeClient = () => __awaiter(void 0, void 0, void 0, function* () {
229
239
  // Retrieve secrets asynchronously
@@ -14,6 +14,7 @@ interface BankAccountAttrs {
14
14
  CLABE?: string;
15
15
  notes?: string;
16
16
  advancedVerificationStatus?: BankAccountVerificationStatus;
17
+ bridgeExternalAccountId?: string;
17
18
  }
18
19
  interface BankAccountDoc extends Document {
19
20
  createdAt: Date;
@@ -29,6 +30,7 @@ interface BankAccountDoc extends Document {
29
30
  CLABE?: string;
30
31
  notes?: string;
31
32
  advancedVerificationStatus?: BankAccountVerificationStatus;
33
+ bridgeExternalAccountId?: string;
32
34
  }
33
35
  interface BankAccountModel extends Model<BankAccountDoc> {
34
36
  build(attrs: BankAccountAttrs): BankAccountDoc;
@@ -54,6 +54,9 @@ const buildBankAccount = (mongoose) => {
54
54
  advancedVerificationStatus: {
55
55
  type: String,
56
56
  },
57
+ bridgeExternalAccountId: {
58
+ type: String,
59
+ },
57
60
  }, {
58
61
  toJSON: {
59
62
  transform(doc, ret) {
@@ -65,6 +68,7 @@ const buildBankAccount = (mongoose) => {
65
68
  ? (0, unescape_1.unescape)(ret.accountHolderName)
66
69
  : undefined;
67
70
  ret.notes = ret.notes ? (0, unescape_1.unescape)(ret.notes) : undefined;
71
+ delete ret.bridgeExternalAccountId;
68
72
  },
69
73
  },
70
74
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1791",
3
+ "version": "1.0.1793",
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.1595",
29
+ "@riocrypto/common": "^1.0.1596",
30
30
  "@types/express": "^4.17.13",
31
31
  "axios": "^1.6.0",
32
32
  "crypto-js": "^4.2.0",