@riocrypto/common 1.0.2703 → 1.0.2705
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/index.d.ts
CHANGED
|
@@ -293,6 +293,7 @@ export * from "./types/payout-method";
|
|
|
293
293
|
export * from "./types/processor";
|
|
294
294
|
export * from "./types/processor-routing";
|
|
295
295
|
export * from "./types/processor-readiness";
|
|
296
|
+
export * from "./types/routing-decision";
|
|
296
297
|
export * from "./types/payment-address-verification";
|
|
297
298
|
export * from "./types/side";
|
|
298
299
|
export * from "./types/auth";
|
package/build/index.js
CHANGED
|
@@ -309,6 +309,7 @@ __exportStar(require("./types/payout-method"), exports);
|
|
|
309
309
|
__exportStar(require("./types/processor"), exports);
|
|
310
310
|
__exportStar(require("./types/processor-routing"), exports);
|
|
311
311
|
__exportStar(require("./types/processor-readiness"), exports);
|
|
312
|
+
__exportStar(require("./types/routing-decision"), exports);
|
|
312
313
|
__exportStar(require("./types/payment-address-verification"), exports);
|
|
313
314
|
__exportStar(require("./types/side"), exports);
|
|
314
315
|
__exportStar(require("./types/auth"), exports);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Processor } from "./processor";
|
|
2
|
+
export declare enum RoutingDecisionReason {
|
|
3
|
+
CustomRioBankAccount = "customRioBankAccount",
|
|
4
|
+
CustomRioBankAccountWithoutRail = "customRioBankAccountWithoutRail",
|
|
5
|
+
Split = "split",
|
|
6
|
+
OnlyCandidate = "onlyCandidate",
|
|
7
|
+
EnabledRailWithoutShare = "enabledRailWithoutShare",
|
|
8
|
+
NoEligibleCandidate = "noEligibleCandidate",
|
|
9
|
+
NoEnabledCandidate = "noEnabledCandidate",
|
|
10
|
+
NoAcceptedCandidate = "noAcceptedCandidate",
|
|
11
|
+
Structural = "structural"
|
|
12
|
+
}
|
|
13
|
+
export interface RoutingDecision {
|
|
14
|
+
processor?: Processor;
|
|
15
|
+
reason: RoutingDecisionReason;
|
|
16
|
+
corridor: Processor[];
|
|
17
|
+
excluded?: Processor[];
|
|
18
|
+
disabled?: Processor[];
|
|
19
|
+
unset?: Processor[];
|
|
20
|
+
percentages?: {
|
|
21
|
+
[processor in Processor]?: number;
|
|
22
|
+
};
|
|
23
|
+
seed?: number;
|
|
24
|
+
decidedAt: Date;
|
|
25
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RoutingDecisionReason = void 0;
|
|
4
|
+
// Why an order ended up on the rail it did. A decision without a processor is a
|
|
5
|
+
// deliberate refusal rather than a bug, so the reasons cover both outcomes.
|
|
6
|
+
var RoutingDecisionReason;
|
|
7
|
+
(function (RoutingDecisionReason) {
|
|
8
|
+
// The customer pays into a Rio bank account of their own, which fixes the rail
|
|
9
|
+
// because it is where the money physically lands.
|
|
10
|
+
RoutingDecisionReason["CustomRioBankAccount"] = "customRioBankAccount";
|
|
11
|
+
// Same, for an account recorded before we tracked which rail it belongs to.
|
|
12
|
+
// Hands back to the structural default rather than guessing.
|
|
13
|
+
RoutingDecisionReason["CustomRioBankAccountWithoutRail"] = "customRioBankAccountWithoutRail";
|
|
14
|
+
// Drawn from the configured split.
|
|
15
|
+
RoutingDecisionReason["Split"] = "split";
|
|
16
|
+
// One rail carried a share, so there was nothing to draw.
|
|
17
|
+
RoutingDecisionReason["OnlyCandidate"] = "onlyCandidate";
|
|
18
|
+
// Rails were available but none carried a share, so the corridor default was
|
|
19
|
+
// used. Reached by a corridor with no rule saved, or one whose shares are all
|
|
20
|
+
// zero, and by a customer whose only rails sit at zero.
|
|
21
|
+
RoutingDecisionReason["EnabledRailWithoutShare"] = "enabledRailWithoutShare";
|
|
22
|
+
// No rail in the corridor is reachable from this environment at all.
|
|
23
|
+
RoutingDecisionReason["NoEligibleCandidate"] = "noEligibleCandidate";
|
|
24
|
+
// Rails exist but the customer has switched all of them off.
|
|
25
|
+
RoutingDecisionReason["NoEnabledCandidate"] = "noEnabledCandidate";
|
|
26
|
+
// Buys only, while payin accounts are opt-in. The customer has turned none of
|
|
27
|
+
// the corridor's rails on, so there is nowhere they have agreed to pay.
|
|
28
|
+
RoutingDecisionReason["NoAcceptedCandidate"] = "noAcceptedCandidate";
|
|
29
|
+
// Structural routing, where the corridor has a single rail and nothing to
|
|
30
|
+
// decide.
|
|
31
|
+
RoutingDecisionReason["Structural"] = "structural";
|
|
32
|
+
})(RoutingDecisionReason = exports.RoutingDecisionReason || (exports.RoutingDecisionReason = {}));
|