@riocrypto/common-server 1.0.1739 → 1.0.1741

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.
@@ -21,7 +21,7 @@ const uuid_1 = require("uuid");
21
21
  class BridgeClient {
22
22
  constructor(apiKey) {
23
23
  this.apiKey = apiKey;
24
- if ([common_1.RioEnv.Production, common_1.RioEnv.Staging].includes(process.env.RIO_ENV)) {
24
+ if ([common_1.RioEnv.Production, common_1.RioEnv.Staging, common_1.RioEnv.Development].includes(process.env.RIO_ENV)) {
25
25
  this.baseUrl = "https://api.bridge.xyz";
26
26
  }
27
27
  else {
@@ -35,6 +35,8 @@ declare class ClusterClient {
35
35
  sendVerificationEmail(userId: string, country?: Country): Promise<void>;
36
36
  registerFXTrade(orderId: string, amount: number, price: number): Promise<void>;
37
37
  resetOrderFXData(orderId: string): Promise<void>;
38
+ deleteInvoice(id: string): Promise<void>;
39
+ deleteRecord(id: string): Promise<void>;
38
40
  }
39
41
  export declare const buildClusterClient: () => Promise<ClusterClient>;
40
42
  export {};
@@ -292,6 +292,24 @@ class ClusterClient {
292
292
  });
293
293
  });
294
294
  }
295
+ deleteInvoice(id) {
296
+ return __awaiter(this, void 0, void 0, function* () {
297
+ yield this.axios.delete(`${this.baseUrl}/api/invoices/${id}`, {
298
+ headers: {
299
+ "x-cluster-api-key": this.clusterApiKey,
300
+ },
301
+ });
302
+ });
303
+ }
304
+ deleteRecord(id) {
305
+ return __awaiter(this, void 0, void 0, function* () {
306
+ yield this.axios.delete(`${this.baseUrl}/api/records/${id}`, {
307
+ headers: {
308
+ "x-cluster-api-key": this.clusterApiKey,
309
+ },
310
+ });
311
+ });
312
+ }
295
313
  }
296
314
  const buildClusterClient = () => __awaiter(void 0, void 0, void 0, function* () {
297
315
  // Retrieve secrets asynchronously
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1739",
3
+ "version": "1.0.1741",
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.1527",
29
+ "@riocrypto/common": "^1.0.1532",
30
30
  "@types/express": "^4.17.13",
31
31
  "axios": "^1.6.0",
32
32
  "crypto-js": "^4.2.0",