@riocrypto/common-server 1.0.2503 → 1.0.2505

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.
@@ -173,10 +173,12 @@ declare class ClusterClient {
173
173
  getSTPMXNBalance(): Promise<number>;
174
174
  createSTPMXNWithdrawal(amount: number, CLABE: string, concepto: string, beneficiaryName: string): Promise<void>;
175
175
  getSTPMXNWithdrawal(id: string): Promise<STPMXNWithdrawal>;
176
- createBulkBankPayout(userId: string, payoutBankAccountId: string): Promise<BulkBankPayout>;
177
- createBulkCryptoPayout(userId: string, payoutAddressId: string, country: Country): Promise<BulkCryptoPayout>;
178
- createBulkBankPayment(userId: string, fiat: Fiat, country: Country): Promise<BulkBankPayment>;
179
- createBulkCryptoPayment(userId: string, crypto: Crypto, country: Country): Promise<BulkCryptoPayment>;
176
+ createBulkBankPayout(userId: string, payoutBankAccountId: string, deferredPaymentType: DeferredPaymentType): Promise<BulkBankPayout>;
177
+ createBulkCryptoPayout(userId: string, payoutAddressId: string, country: Country, deferredPaymentType: DeferredPaymentType): Promise<BulkCryptoPayout>;
178
+ sendBulkCryptoPayout(id: string): Promise<void>;
179
+ createBulkBankPayment(userId: string, fiat: Fiat, country: Country, deferredPaymentType: DeferredPaymentType): Promise<BulkBankPayment>;
180
+ createBulkCryptoPayment(userId: string, crypto: Crypto, country: Country, deferredPaymentType: DeferredPaymentType): Promise<BulkCryptoPayment>;
181
+ sendBulkBankPayment(id: string): Promise<void>;
180
182
  }
181
183
  export declare const buildClusterClient: () => Promise<ClusterClient>;
182
184
  export {};
@@ -601,30 +601,40 @@ class ClusterClient {
601
601
  return response.data;
602
602
  });
603
603
  }
604
- createBulkBankPayout(userId, payoutBankAccountId) {
604
+ createBulkBankPayout(userId, payoutBankAccountId, deferredPaymentType) {
605
605
  return __awaiter(this, void 0, void 0, function* () {
606
- const response = yield this.axios.post(`${this.baseUrl}/api/payouts/bank/bulk`, { userId, payoutBankAccountId }, { headers: { "x-cluster-api-key": this.clusterApiKey } });
606
+ const response = yield this.axios.post(`${this.baseUrl}/api/payouts/bank/bulk`, { userId, payoutBankAccountId, deferredPaymentType }, { headers: { "x-cluster-api-key": this.clusterApiKey } });
607
607
  return response.data;
608
608
  });
609
609
  }
610
- createBulkCryptoPayout(userId, payoutAddressId, country) {
610
+ createBulkCryptoPayout(userId, payoutAddressId, country, deferredPaymentType) {
611
611
  return __awaiter(this, void 0, void 0, function* () {
612
- const response = yield this.axios.post(`${this.baseUrl}/api/payouts/crypto/bulk`, { userId, payoutAddressId, country }, { headers: { "x-cluster-api-key": this.clusterApiKey } });
612
+ const response = yield this.axios.post(`${this.baseUrl}/api/payouts/crypto/bulk`, { userId, payoutAddressId, country, deferredPaymentType }, { headers: { "x-cluster-api-key": this.clusterApiKey } });
613
613
  return response.data;
614
614
  });
615
615
  }
616
- createBulkBankPayment(userId, fiat, country) {
616
+ sendBulkCryptoPayout(id) {
617
617
  return __awaiter(this, void 0, void 0, function* () {
618
- const response = yield this.axios.post(`${this.baseUrl}/api/payments/bank/bulk`, { userId, fiat, country }, { headers: { "x-cluster-api-key": this.clusterApiKey } });
618
+ yield this.axios.post(`${this.baseUrl}/api/payouts/crypto/bulk/${id}/send`, {}, { headers: { "x-cluster-api-key": this.clusterApiKey } });
619
+ });
620
+ }
621
+ createBulkBankPayment(userId, fiat, country, deferredPaymentType) {
622
+ return __awaiter(this, void 0, void 0, function* () {
623
+ const response = yield this.axios.post(`${this.baseUrl}/api/payments/bank/bulk`, { userId, fiat, country, deferredPaymentType }, { headers: { "x-cluster-api-key": this.clusterApiKey } });
619
624
  return response.data;
620
625
  });
621
626
  }
622
- createBulkCryptoPayment(userId, crypto, country) {
627
+ createBulkCryptoPayment(userId, crypto, country, deferredPaymentType) {
623
628
  return __awaiter(this, void 0, void 0, function* () {
624
- const response = yield this.axios.post(`${this.baseUrl}/api/payments/crypto/bulk`, { userId, crypto, country }, { headers: { "x-cluster-api-key": this.clusterApiKey } });
629
+ const response = yield this.axios.post(`${this.baseUrl}/api/payments/crypto/bulk`, { userId, crypto, country, deferredPaymentType }, { headers: { "x-cluster-api-key": this.clusterApiKey } });
625
630
  return response.data;
626
631
  });
627
632
  }
633
+ sendBulkBankPayment(id) {
634
+ return __awaiter(this, void 0, void 0, function* () {
635
+ yield this.axios.post(`${this.baseUrl}/api/payments/bank/bulk/${id}/send`, {}, { headers: { "x-cluster-api-key": this.clusterApiKey } });
636
+ });
637
+ }
628
638
  }
629
639
  const buildClusterClient = () => __awaiter(void 0, void 0, void 0, function* () {
630
640
  // Retrieve secrets asynchronously
@@ -1,4 +1,4 @@
1
- import { BulkBankPaymentStatus, Country, Fiat } from "@riocrypto/common";
1
+ import { BulkBankPaymentStatus, Country, Fiat, DeferredPaymentType } from "@riocrypto/common";
2
2
  import { Mongoose, Model, Document } from "mongoose";
3
3
  interface BulkBankPaymentAttrs {
4
4
  createdAt: Date;
@@ -7,6 +7,7 @@ interface BulkBankPaymentAttrs {
7
7
  amount: number;
8
8
  fiat: Fiat;
9
9
  country: Country;
10
+ deferredPaymentType: DeferredPaymentType;
10
11
  amountPaid?: number;
11
12
  orderIdsPaid?: string[];
12
13
  bankName?: string;
@@ -27,6 +28,7 @@ interface BulkBankPaymentDoc extends Document {
27
28
  orderIds: string[];
28
29
  amount: number;
29
30
  fiat: Fiat;
31
+ deferredPaymentType: DeferredPaymentType;
30
32
  amountPaid?: number;
31
33
  orderIdsPaid?: string[];
32
34
  bankName?: string;
@@ -27,6 +27,9 @@ const buildBulkBankPayment = (mongoose) => {
27
27
  type: String,
28
28
  required: true,
29
29
  },
30
+ deferredPaymentType: {
31
+ type: String,
32
+ },
30
33
  amountPaid: {
31
34
  type: Number,
32
35
  },
@@ -1,4 +1,4 @@
1
- import { Country, Fiat, BulkBankPayoutStatus } from "@riocrypto/common";
1
+ import { Country, Fiat, BulkBankPayoutStatus, DeferredPaymentType } from "@riocrypto/common";
2
2
  import { Mongoose, Model, Document } from "mongoose";
3
3
  interface BulkBankPayoutAttrs {
4
4
  createdAt: Date;
@@ -7,6 +7,7 @@ interface BulkBankPayoutAttrs {
7
7
  amount: number;
8
8
  fiat: Fiat;
9
9
  country: Country;
10
+ deferredPaymentType: DeferredPaymentType;
10
11
  payoutBankAccountId?: string;
11
12
  bankName?: string;
12
13
  reference?: string;
@@ -23,6 +24,7 @@ interface BulkBankPayoutDoc extends Document {
23
24
  amount: number;
24
25
  fiat: Fiat;
25
26
  country: Country;
27
+ deferredPaymentType: DeferredPaymentType;
26
28
  payoutBankAccountId?: string;
27
29
  bankName?: string;
28
30
  reference?: string;
@@ -31,6 +31,9 @@ const buildBulkBankPayout = (mongoose) => {
31
31
  type: String,
32
32
  required: true,
33
33
  },
34
+ deferredPaymentType: {
35
+ type: String,
36
+ },
34
37
  payoutBankAccountId: {
35
38
  type: String,
36
39
  },
@@ -1,4 +1,4 @@
1
- import { Country, BulkCryptoPaymentStatus, Crypto } from "@riocrypto/common";
1
+ import { Country, BulkCryptoPaymentStatus, Crypto, DeferredPaymentType } from "@riocrypto/common";
2
2
  import { Mongoose, Model, Document } from "mongoose";
3
3
  interface BulkCryptoPaymentAttrs {
4
4
  createdAt: Date;
@@ -7,6 +7,7 @@ interface BulkCryptoPaymentAttrs {
7
7
  amount: number;
8
8
  crypto: Crypto;
9
9
  country: Country;
10
+ deferredPaymentType: DeferredPaymentType;
10
11
  amountPaid?: number;
11
12
  orderIdsPaid?: string[];
12
13
  depositAddress?: string;
@@ -19,6 +20,7 @@ interface BulkCryptoPaymentDoc extends Document {
19
20
  amount: number;
20
21
  crypto: Crypto;
21
22
  country: Country;
23
+ deferredPaymentType: DeferredPaymentType;
22
24
  amountPaid?: number;
23
25
  orderIdsPaid?: string[];
24
26
  depositAddress?: string;
@@ -23,6 +23,9 @@ const buildBulkCryptoPayment = (mongoose) => {
23
23
  type: Number,
24
24
  required: true,
25
25
  },
26
+ deferredPaymentType: {
27
+ type: String,
28
+ },
26
29
  amountPaid: {
27
30
  type: Number,
28
31
  },
@@ -1,4 +1,4 @@
1
- import { Country, Crypto, BulkCryptoPayoutStatus } from "@riocrypto/common";
1
+ import { Country, Crypto, BulkCryptoPayoutStatus, DeferredPaymentType } from "@riocrypto/common";
2
2
  import { Mongoose, Model, Document } from "mongoose";
3
3
  interface BulkCryptoPayoutAttrs {
4
4
  createdAt: Date;
@@ -6,6 +6,7 @@ interface BulkCryptoPayoutAttrs {
6
6
  orderIds: string[];
7
7
  amount: number;
8
8
  crypto: Crypto;
9
+ deferredPaymentType: DeferredPaymentType;
9
10
  payoutAddressId?: string;
10
11
  blockchainAddress?: string;
11
12
  country: Country;
@@ -18,6 +19,7 @@ interface BulkCryptoPayoutDoc extends Document {
18
19
  orderIds: string[];
19
20
  amount: number;
20
21
  crypto: Crypto;
22
+ deferredPaymentType: DeferredPaymentType;
21
23
  payoutAddressId?: string;
22
24
  blockchainAddress?: string;
23
25
  country: Country;
@@ -27,6 +27,9 @@ const buildBulkCryptoPayout = (mongoose) => {
27
27
  type: String,
28
28
  required: true,
29
29
  },
30
+ deferredPaymentType: {
31
+ type: String,
32
+ },
30
33
  payoutAddressId: {
31
34
  type: String,
32
35
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2503",
3
+ "version": "1.0.2505",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "@google-cloud/secret-manager": "^5.3.0",
29
29
  "@google-cloud/storage": "^6.9.5",
30
30
  "@hyperdx/node-opentelemetry": "^0.7.0",
31
- "@riocrypto/common": "^1.0.2272",
31
+ "@riocrypto/common": "^1.0.2277",
32
32
  "@types/express": "^4.17.13",
33
33
  "axios": "^1.7.4",
34
34
  "crypto-js": "^4.2.0",