@riocrypto/common-server 1.0.2850 → 1.0.2852
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.
- package/build/clients/cluster-client.d.ts +1 -0
- package/build/clients/cluster-client.js +6 -0
- package/build/helpers/get-processor.js +4 -4
- package/build/models/alfin-settings.d.ts +4 -4
- package/build/models/alfin-settings.js +2 -2
- package/build/models/internal-balances.d.ts +3 -0
- package/build/models/internal-balances.js +3 -0
- package/package.json +1 -1
|
@@ -208,6 +208,7 @@ declare class ClusterClient {
|
|
|
208
208
|
mpe001IDL: number;
|
|
209
209
|
beneficiaryName: string;
|
|
210
210
|
}>;
|
|
211
|
+
getAlfinBalance(fiat: Fiat): Promise<number>;
|
|
211
212
|
getSTPMXNBalance(): Promise<number>;
|
|
212
213
|
createSTPMXNWithdrawal(amount: number, CLABE: string, concepto: string, beneficiaryName: string, internalTransferId?: string): Promise<STPMXNWithdrawalDoc>;
|
|
213
214
|
getSTPMXNWithdrawal(id: string): Promise<STPMXNWithdrawal>;
|
|
@@ -696,6 +696,12 @@ class ClusterClient {
|
|
|
696
696
|
return response.data;
|
|
697
697
|
});
|
|
698
698
|
}
|
|
699
|
+
getAlfinBalance(fiat) {
|
|
700
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
701
|
+
const response = yield this.axios.get(`${this.baseUrl}/api/bank/accounts/alfin/${fiat}/balance`, { headers: { "x-cluster-api-key": this.clusterApiKey } });
|
|
702
|
+
return response.data.disponible;
|
|
703
|
+
});
|
|
704
|
+
}
|
|
699
705
|
getSTPMXNBalance() {
|
|
700
706
|
return __awaiter(this, void 0, void 0, function* () {
|
|
701
707
|
const response = yield this.axios.get(`${this.baseUrl}/api/bank/accounts/STP/MXN/balance`, { headers: { "x-cluster-api-key": this.clusterApiKey } });
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getProcessor = void 0;
|
|
4
4
|
const common_1 = require("@riocrypto/common");
|
|
5
|
-
// Alfin takes effect only in
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
const isAlfinEnabled = () => [common_1.RioEnv.
|
|
5
|
+
// Alfin takes effect only in Production (Alfin prod). In every other
|
|
6
|
+
// environment we never route to Alfin, regardless of user attributes or active
|
|
7
|
+
// processors; non-prod Peru flows fall back to the mocked Interbank path.
|
|
8
|
+
const isAlfinEnabled = () => [common_1.RioEnv.Production].includes(process.env.RIO_ENV);
|
|
9
9
|
const getProcessor = ({ country, fiat, user, activeProcessors, side, isBinanceRFQ, }) => {
|
|
10
10
|
var _a, _b, _c, _d, _e, _f;
|
|
11
11
|
if (isBinanceRFQ === true) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import mongoose, { HydratedDocument } from "mongoose";
|
|
2
2
|
interface AlfinSettingsAttrs {
|
|
3
3
|
payinCodeOffset: number;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
treasuryCCIVPEN?: string;
|
|
5
|
+
treasuryCodigoPagoCCIVPEN?: string;
|
|
6
6
|
treasuryCCIVUSD?: string;
|
|
7
7
|
treasuryCodigoPagoCCIVUSD?: string;
|
|
8
8
|
}
|
|
9
9
|
interface AlfinSettingsDoc extends mongoose.Document {
|
|
10
10
|
payinCodeOffset: number;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
treasuryCCIVPEN?: string;
|
|
12
|
+
treasuryCodigoPagoCCIVPEN?: string;
|
|
13
13
|
treasuryCCIVUSD?: string;
|
|
14
14
|
treasuryCodigoPagoCCIVUSD?: string;
|
|
15
15
|
}
|
|
@@ -10,10 +10,10 @@ const buildAlfinSettings = (mongoose) => {
|
|
|
10
10
|
type: Number,
|
|
11
11
|
required: true,
|
|
12
12
|
},
|
|
13
|
-
|
|
13
|
+
treasuryCCIVPEN: {
|
|
14
14
|
type: String,
|
|
15
15
|
},
|
|
16
|
-
|
|
16
|
+
treasuryCodigoPagoCCIVPEN: {
|
|
17
17
|
type: String,
|
|
18
18
|
},
|
|
19
19
|
treasuryCCIVUSD: {
|