@riocrypto/common-server 1.0.1280 → 1.0.1282

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.
@@ -7,6 +7,10 @@ declare class ClusterClient {
7
7
  getNewQuote(orderId: string, quote: Quote, newAmountFiat?: number, newAmountCrypto?: number): Promise<Quote>;
8
8
  createBitsoBankAccount(userId: string): Promise<BitsoBankAccount>;
9
9
  getBalance(asset: Crypto | Fiat): Promise<number>;
10
+ getTransactionLimits(userId: string): Promise<{
11
+ limit: number;
12
+ used: number;
13
+ }>;
10
14
  }
11
15
  export declare const buildClusterClient: () => Promise<ClusterClient>;
12
16
  export {};
@@ -97,6 +97,16 @@ class ClusterClient {
97
97
  return rioResponse.data.balance;
98
98
  });
99
99
  }
100
+ getTransactionLimits(userId) {
101
+ return __awaiter(this, void 0, void 0, function* () {
102
+ const response = yield this.axios.get(`${this.baseUrl}/api/users/${userId}/limits`, {
103
+ headers: {
104
+ "x-cluster-api-key": this.clusterApiKey,
105
+ },
106
+ });
107
+ return response.data;
108
+ });
109
+ }
100
110
  }
101
111
  const buildClusterClient = () => __awaiter(void 0, void 0, void 0, function* () {
102
112
  // Retrieve secrets asynchronously
@@ -14,7 +14,7 @@ interface UserAttrs {
14
14
  country: CountryOfOrigin;
15
15
  kycStatus: KYCStatus;
16
16
  riskTier: RiskTier;
17
- hasPassedEDD: Boolean;
17
+ hasPassedEDD: boolean;
18
18
  firstName?: string;
19
19
  middleName?: string;
20
20
  lastName?: string;
@@ -82,7 +82,7 @@ interface UserDoc extends Document {
82
82
  country: CountryOfOrigin;
83
83
  kycStatus: KYCStatus;
84
84
  riskTier: RiskTier;
85
- hasPassedEDD: Boolean;
85
+ hasPassedEDD: boolean;
86
86
  firstName?: string;
87
87
  middleName?: string;
88
88
  lastName?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1280",
3
+ "version": "1.0.1282",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -27,7 +27,7 @@
27
27
  "@everapi/currencyapi-js": "^1.0.6",
28
28
  "@google-cloud/storage": "^6.9.5",
29
29
  "@google-cloud/vision": "^4.0.2",
30
- "@riocrypto/common": "^1.0.1155",
30
+ "@riocrypto/common": "^1.0.1156",
31
31
  "@types/express": "^4.17.13",
32
32
  "axios": "^0.27.2",
33
33
  "ccxt": "^3.0.30",