@riocrypto/common-server 1.0.1736 → 1.0.1738

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.
@@ -33,6 +33,7 @@ declare class ClusterClient {
33
33
  }>;
34
34
  verifyCode(phoneNumber: string, code?: string, authenticatorCode?: string): Promise<void>;
35
35
  sendVerificationEmail(userId: string, country?: Country): Promise<void>;
36
+ registerFXTrade(orderId: string, amount: number, price: number): Promise<void>;
36
37
  }
37
38
  export declare const buildClusterClient: () => Promise<ClusterClient>;
38
39
  export {};
@@ -269,6 +269,20 @@ class ClusterClient {
269
269
  });
270
270
  });
271
271
  }
272
+ registerFXTrade(orderId, amount, price) {
273
+ return __awaiter(this, void 0, void 0, function* () {
274
+ yield this.axios.post(`${this.baseUrl}/api/fx/orders`, {
275
+ provider: "BBVA",
276
+ orderId,
277
+ price,
278
+ amount,
279
+ }, {
280
+ headers: {
281
+ "x-cluster-api-key": this.clusterApiKey,
282
+ },
283
+ });
284
+ });
285
+ }
272
286
  }
273
287
  const buildClusterClient = () => __awaiter(void 0, void 0, void 0, function* () {
274
288
  // Retrieve secrets asynchronously
@@ -5,12 +5,18 @@ interface AdminActionAttrs {
5
5
  createdAt: Date;
6
6
  status: AdminActionStatus;
7
7
  adminAuthId: string;
8
+ totalTasks: number;
9
+ tasksCompleted: number;
10
+ executionErrors: string[];
8
11
  }
9
12
  interface AdminActionDoc extends Document {
10
13
  type: AdminActionType;
11
14
  createdAt: Date;
12
15
  status: AdminActionStatus;
13
16
  adminAuthId: string;
17
+ totalTasks: number;
18
+ tasksCompleted: number;
19
+ executionErrors: string[];
14
20
  }
15
21
  interface AdminActionModel extends Model<AdminActionDoc> {
16
22
  build(attrs: AdminActionAttrs): AdminActionDoc;
@@ -23,6 +23,18 @@ const buildAdminAction = (mongoose) => {
23
23
  type: String,
24
24
  required: true,
25
25
  },
26
+ totalTasks: {
27
+ type: Number,
28
+ required: true,
29
+ },
30
+ tasksCompleted: {
31
+ type: Number,
32
+ required: true,
33
+ },
34
+ executionErrors: {
35
+ type: [String],
36
+ required: true,
37
+ },
26
38
  }, {
27
39
  toJSON: {
28
40
  transform(doc, ret) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1736",
3
+ "version": "1.0.1738",
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.1523",
29
+ "@riocrypto/common": "^1.0.1527",
30
30
  "@types/express": "^4.17.13",
31
31
  "axios": "^1.6.0",
32
32
  "crypto-js": "^4.2.0",