@riocrypto/common-server 1.0.2492 → 1.0.2493

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.
@@ -1,4 +1,4 @@
1
- import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount, AuthRole, Auth, ImportOrderData, TreasuryProvider, FXProvider, EmarketsFXTrade, ExternalTradingAlgorithm, ExternalTrade, ExternalTradeType, ExternalTradingProvider, ExternalTradingAlgorithmType, STPMXNWithdrawal, AuthPermission, DeferredPaymentType, TwoWaySettlementType, OrderType, EmarketsSettlementType, EmarketsOrderType, BulkBankPayout, BulkCryptoPayout } from "@riocrypto/common";
1
+ import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount, AuthRole, Auth, ImportOrderData, TreasuryProvider, FXProvider, EmarketsFXTrade, ExternalTradingAlgorithm, ExternalTrade, ExternalTradeType, ExternalTradingProvider, ExternalTradingAlgorithmType, STPMXNWithdrawal, AuthPermission, DeferredPaymentType, TwoWaySettlementType, OrderType, EmarketsSettlementType, EmarketsOrderType, BulkBankPayout, BulkCryptoPayout, BulkBankPayment, BulkCryptoPayment } from "@riocrypto/common";
2
2
  declare class ClusterClient {
3
3
  private baseUrl;
4
4
  private clusterApiKey;
@@ -174,6 +174,8 @@ declare class ClusterClient {
174
174
  getSTPMXNWithdrawal(id: string): Promise<STPMXNWithdrawal>;
175
175
  createBulkBankPayout(userId: string, payoutBankAccountId: string): Promise<BulkBankPayout>;
176
176
  createBulkCryptoPayout(userId: string, payoutAddressId: string): Promise<BulkCryptoPayout>;
177
+ createBulkBankPayment(userId: string, fiat: Fiat, country: Country): Promise<BulkBankPayment>;
178
+ createBulkCryptoPayment(userId: string, crypto: Crypto, country: Country): Promise<BulkCryptoPayment>;
177
179
  }
178
180
  export declare const buildClusterClient: () => Promise<ClusterClient>;
179
181
  export {};
@@ -126,6 +126,10 @@ class ClusterClient {
126
126
  parentOrderId: parentOrderId ? parentOrderId : undefined,
127
127
  bulkCryptoPayoutId: bulkCryptoPayoutId ? bulkCryptoPayoutId : undefined,
128
128
  bulkBankPayoutId: bulkBankPayoutId ? bulkBankPayoutId : undefined,
129
+ bulkCryptoPaymentId: bulkCryptoPaymentId
130
+ ? bulkCryptoPaymentId
131
+ : undefined,
132
+ bulkBankPaymentId: bulkBankPaymentId ? bulkBankPaymentId : undefined,
129
133
  }, {
130
134
  headers: {
131
135
  "x-cluster-api-key": this.clusterApiKey,
@@ -608,6 +612,18 @@ class ClusterClient {
608
612
  return response.data;
609
613
  });
610
614
  }
615
+ createBulkBankPayment(userId, fiat, country) {
616
+ return __awaiter(this, void 0, void 0, function* () {
617
+ const response = yield this.axios.post(`${this.baseUrl}/api/payments/bank/bulk`, { userId, fiat, country }, { headers: { "x-cluster-api-key": this.clusterApiKey } });
618
+ return response.data;
619
+ });
620
+ }
621
+ createBulkCryptoPayment(userId, crypto, country) {
622
+ return __awaiter(this, void 0, void 0, function* () {
623
+ const response = yield this.axios.post(`${this.baseUrl}/api/payments/crypto/bulk`, { userId, crypto, country }, { headers: { "x-cluster-api-key": this.clusterApiKey } });
624
+ return response.data;
625
+ });
626
+ }
611
627
  }
612
628
  const buildClusterClient = () => __awaiter(void 0, void 0, void 0, function* () {
613
629
  // Retrieve secrets asynchronously
@@ -1,4 +1,4 @@
1
- import { Crypto, BulkCryptoPayoutStatus } from "@riocrypto/common";
1
+ import { Country, Crypto, BulkCryptoPayoutStatus } from "@riocrypto/common";
2
2
  import { Mongoose, Model, Document } from "mongoose";
3
3
  interface BulkCryptoPayoutAttrs {
4
4
  createdAt: Date;
@@ -8,6 +8,7 @@ interface BulkCryptoPayoutAttrs {
8
8
  crypto: Crypto;
9
9
  payoutAddressId?: string;
10
10
  blockchainAddress?: string;
11
+ country: Country;
11
12
  status: BulkCryptoPayoutStatus;
12
13
  }
13
14
  interface BulkCryptoPayoutDoc extends Document {
@@ -19,6 +20,7 @@ interface BulkCryptoPayoutDoc extends Document {
19
20
  crypto: Crypto;
20
21
  payoutAddressId?: string;
21
22
  blockchainAddress?: string;
23
+ country: Country;
22
24
  status: BulkCryptoPayoutStatus;
23
25
  }
24
26
  interface BulkCryptoPayoutModel extends Model<BulkCryptoPayoutDoc> {
@@ -33,6 +33,10 @@ const buildBulkCryptoPayout = (mongoose) => {
33
33
  blockchainAddress: {
34
34
  type: String,
35
35
  },
36
+ country: {
37
+ type: String,
38
+ required: true,
39
+ },
36
40
  status: {
37
41
  type: String,
38
42
  required: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2492",
3
+ "version": "1.0.2493",
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.2259",
31
+ "@riocrypto/common": "^1.0.2260",
32
32
  "@types/express": "^4.17.13",
33
33
  "axios": "^1.7.4",
34
34
  "crypto-js": "^4.2.0",