@pax2pay/model-banking 0.1.384 → 0.1.385
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/Card/Creatable.ts +2 -1
- package/Card/index.ts +2 -1
- package/Operation/Creatable.ts +1 -1
- package/Organization/index.ts +2 -1
- package/Rule/{Rule/Base.ts → Base.ts} +7 -0
- package/Rule/Charge.ts +108 -0
- package/Rule/Other.ts +48 -0
- package/Rule/Reserve.ts +111 -0
- package/Rule/Score.ts +45 -0
- package/Rule/State/Transaction.ts +17 -4
- package/Rule/State/index.ts +3 -2
- package/Rule/control.ts +8 -0
- package/Rule/index.ts +76 -97
- package/Rule/type.ts +13 -0
- package/Transaction/index.ts +3 -3
- package/dist/Authorization/Status.d.ts +1 -1
- package/dist/Card/Creatable.d.ts +1 -1
- package/dist/Card/Creatable.js +1 -1
- package/dist/Card/Creatable.js.map +1 -1
- package/dist/Card/index.d.ts +1 -1
- package/dist/Card/index.js +1 -1
- package/dist/Card/index.js.map +1 -1
- package/dist/Operation/Creatable.js +1 -1
- package/dist/Operation/Creatable.js.map +1 -1
- package/dist/Organization/index.d.ts +3 -3
- package/dist/Organization/index.js +1 -1
- package/dist/Organization/index.js.map +1 -1
- package/dist/Rail/index.d.ts +1 -1
- package/dist/Rule/{Rule/Base.d.ts → Base.d.ts} +1 -0
- package/dist/Rule/{Rule/Base.js → Base.js} +6 -0
- package/dist/Rule/Base.js.map +1 -0
- package/dist/Rule/Charge.d.ts +40 -0
- package/dist/Rule/Charge.js +68 -0
- package/dist/Rule/Charge.js.map +1 -0
- package/dist/Rule/{Rule/Other.d.ts → Other.d.ts} +8 -0
- package/dist/Rule/Other.js +38 -0
- package/dist/Rule/Other.js.map +1 -0
- package/dist/Rule/Reserve.d.ts +38 -0
- package/dist/Rule/Reserve.js +76 -0
- package/dist/Rule/Reserve.js.map +1 -0
- package/dist/Rule/{Rule/Score.d.ts → Score.d.ts} +6 -0
- package/dist/Rule/Score.js +30 -0
- package/dist/Rule/Score.js.map +1 -0
- package/dist/Rule/State/Transaction.d.ts +9 -4
- package/dist/Rule/State/Transaction.js +7 -2
- package/dist/Rule/State/Transaction.js.map +1 -1
- package/dist/Rule/State/index.d.ts +3 -3
- package/dist/Rule/State/index.js +2 -2
- package/dist/Rule/State/index.js.map +1 -1
- package/dist/Rule/control.d.ts +4 -0
- package/dist/Rule/control.js +6 -0
- package/dist/Rule/control.js.map +1 -0
- package/dist/Rule/index.d.ts +29 -13
- package/dist/Rule/index.js +68 -70
- package/dist/Rule/index.js.map +1 -1
- package/dist/Rule/type.d.ts +3 -0
- package/dist/Rule/type.js +7 -0
- package/dist/Rule/type.js.map +1 -0
- package/dist/Transaction/Status.d.ts +1 -1
- package/dist/Transaction/index.js +3 -3
- package/dist/Transaction/index.js.map +1 -1
- package/package.json +1 -1
- package/Rule/Rule/Charge.ts +0 -48
- package/Rule/Rule/Other.ts +0 -14
- package/Rule/Rule/Score.ts +0 -21
- package/Rule/Rule/index.ts +0 -37
- package/dist/Rule/Rule/Base.js.map +0 -1
- package/dist/Rule/Rule/Charge.d.ts +0 -29
- package/dist/Rule/Rule/Charge.js +0 -34
- package/dist/Rule/Rule/Charge.js.map +0 -1
- package/dist/Rule/Rule/Other.js +0 -12
- package/dist/Rule/Rule/Other.js.map +0 -1
- package/dist/Rule/Rule/Score.js +0 -16
- package/dist/Rule/Rule/Score.js.map +0 -1
- package/dist/Rule/Rule/index.d.ts +0 -24
- package/dist/Rule/Rule/index.js +0 -27
- package/dist/Rule/Rule/index.js.map +0 -1
package/dist/Rule/Rule/Charge.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { isly } from "isly";
|
|
2
|
-
import { Amount } from "../../Amount";
|
|
3
|
-
import { Realm } from "../../Realm";
|
|
4
|
-
import { Base } from "./Base";
|
|
5
|
-
export var Charge;
|
|
6
|
-
(function (Charge) {
|
|
7
|
-
let Action;
|
|
8
|
-
(function (Action) {
|
|
9
|
-
Action.value = "charge";
|
|
10
|
-
})(Action = Charge.Action || (Charge.Action = {}));
|
|
11
|
-
let Api;
|
|
12
|
-
(function (Api) {
|
|
13
|
-
Api.type = Base.type.extend({
|
|
14
|
-
action: isly.string(Action.value),
|
|
15
|
-
charge: isly.object({
|
|
16
|
-
percentage: isly.number().optional(),
|
|
17
|
-
fixed: isly.union(Amount.type, isly.number()).optional(),
|
|
18
|
-
}),
|
|
19
|
-
});
|
|
20
|
-
function from(rule, currency) {
|
|
21
|
-
return {
|
|
22
|
-
...rule,
|
|
23
|
-
charge: {
|
|
24
|
-
...rule.charge,
|
|
25
|
-
fixed: typeof rule.charge.fixed == "number"
|
|
26
|
-
? [Realm.is(currency) ? Realm.currency[currency] : currency, rule.charge.fixed]
|
|
27
|
-
: rule.charge.fixed,
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
Api.from = from;
|
|
32
|
-
})(Api = Charge.Api || (Charge.Api = {}));
|
|
33
|
-
})(Charge || (Charge = {}));
|
|
34
|
-
//# sourceMappingURL=Charge.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Charge.js","sourceRoot":"../","sources":["Rule/Rule/Charge.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAQ7B,MAAM,KAAW,MAAM,CAmCtB;AAnCD,WAAiB,MAAM;IAEtB,IAAiB,MAAM,CAEtB;IAFD,WAAiB,MAAM;QACT,YAAK,GAAG,QAAQ,CAAA;IAC9B,CAAC,EAFgB,MAAM,GAAN,aAAM,KAAN,aAAM,QAEtB;IAQD,IAAiB,GAAG,CAsBnB;IAtBD,WAAiB,GAAG;QACN,QAAI,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAM;YACzC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;YACjC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;gBACnB,UAAU,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;gBACpC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAkB,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;aACzE,CAAC;SACF,CAAC,CAAA;QAGF,SAAgB,IAAI,CAAC,IAAS,EAAE,QAAgC;YAC/D,OAAO;gBACN,GAAG,IAAI;gBACP,MAAM,EAAE;oBACP,GAAG,IAAI,CAAC,MAAM;oBACd,KAAK,EACJ,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,QAAQ;wBACnC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;wBAC/E,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;iBACrB;aACD,CAAA;QACF,CAAC;QAXe,QAAI,OAWnB,CAAA;IACF,CAAC,EAtBgB,GAAG,GAAH,UAAG,KAAH,UAAG,QAsBnB;AACF,CAAC,EAnCgB,MAAM,KAAN,MAAM,QAmCtB"}
|
package/dist/Rule/Rule/Other.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { isly } from "isly";
|
|
2
|
-
import { Base } from "./Base";
|
|
3
|
-
export var Other;
|
|
4
|
-
(function (Other) {
|
|
5
|
-
let Action;
|
|
6
|
-
(function (Action) {
|
|
7
|
-
Action.values = ["review", "reject", "flag"];
|
|
8
|
-
Action.type = isly.string(Action.values);
|
|
9
|
-
})(Action = Other.Action || (Other.Action = {}));
|
|
10
|
-
Other.type = Base.type.extend({ action: Action.type });
|
|
11
|
-
})(Other || (Other = {}));
|
|
12
|
-
//# sourceMappingURL=Other.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Other.js","sourceRoot":"../","sources":["Rule/Rule/Other.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAK7B,MAAM,KAAW,KAAK,CAOrB;AAPD,WAAiB,KAAK;IAErB,IAAiB,MAAM,CAGtB;IAHD,WAAiB,MAAM;QACT,aAAM,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAU,CAAA;QAC9C,WAAI,GAAG,IAAI,CAAC,MAAM,CAAS,OAAA,MAAM,CAAC,CAAA;IAChD,CAAC,EAHgB,MAAM,GAAN,YAAM,KAAN,YAAM,QAGtB;IACY,UAAI,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAA;AACrE,CAAC,EAPgB,KAAK,KAAL,KAAK,QAOrB"}
|
package/dist/Rule/Rule/Score.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { isly } from "isly";
|
|
2
|
-
import { Base } from "./Base";
|
|
3
|
-
export var Score;
|
|
4
|
-
(function (Score) {
|
|
5
|
-
let Action;
|
|
6
|
-
(function (Action) {
|
|
7
|
-
Action.value = "score";
|
|
8
|
-
})(Action = Score.Action || (Score.Action = {}));
|
|
9
|
-
Score.Risk = isly.number(["positive", "integer"]);
|
|
10
|
-
Score.type = Base.type.extend({
|
|
11
|
-
action: isly.string(Action.value),
|
|
12
|
-
category: isly.string("fincrime"),
|
|
13
|
-
risk: Score.Risk,
|
|
14
|
-
});
|
|
15
|
-
})(Score || (Score = {}));
|
|
16
|
-
//# sourceMappingURL=Score.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Score.js","sourceRoot":"../","sources":["Rule/Rule/Score.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAO7B,MAAM,KAAW,KAAK,CAYrB;AAZD,WAAiB,KAAK;IAErB,IAAiB,MAAM,CAEtB;IAFD,WAAiB,MAAM;QACT,YAAK,GAAG,OAAO,CAAA;IAC7B,CAAC,EAFgB,MAAM,GAAN,YAAM,KAAN,YAAM,QAEtB;IAEY,UAAI,GAAG,IAAI,CAAC,MAAM,CAAO,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,CAAA;IACjD,UAAI,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAQ;QAC3C,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;QACjC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC;QACjC,IAAI,EAAE,MAAA,IAAI;KACV,CAAC,CAAA;AACH,CAAC,EAZgB,KAAK,KAAL,KAAK,QAYrB"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { isly } from "isly";
|
|
2
|
-
import { Realm } from "../../Realm";
|
|
3
|
-
import { Base as RuleBase } from "./Base";
|
|
4
|
-
import { Charge as RuleCharge } from "./Charge";
|
|
5
|
-
import { Other as RuleOther } from "./Other";
|
|
6
|
-
import { Score as RuleScore } from "./Score";
|
|
7
|
-
export type Rule = Rule.Other | Rule.Score | Rule.Charge;
|
|
8
|
-
export declare namespace Rule {
|
|
9
|
-
export import Other = RuleOther;
|
|
10
|
-
export import Score = RuleScore;
|
|
11
|
-
export import Charge = RuleCharge;
|
|
12
|
-
export import Base = RuleBase;
|
|
13
|
-
type Api = Rule.Other | Rule.Score | Rule.Charge.Api;
|
|
14
|
-
namespace Api {
|
|
15
|
-
const type: isly.Type<Api>;
|
|
16
|
-
function from(rule: Rule.Api, realm: Realm): Rule;
|
|
17
|
-
}
|
|
18
|
-
type Action = typeof Action.values[number];
|
|
19
|
-
namespace Action {
|
|
20
|
-
const values: readonly ["review", "reject", "flag", "score", "charge"];
|
|
21
|
-
const type: isly.Type<"charge" | "review" | "reject" | "flag" | "score">;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
export declare const type: isly.Type<RuleCharge | RuleOther | RuleScore>;
|
package/dist/Rule/Rule/index.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { isly } from "isly";
|
|
2
|
-
import { Base as RuleBase } from "./Base";
|
|
3
|
-
import { Charge as RuleCharge } from "./Charge";
|
|
4
|
-
import { Other as RuleOther } from "./Other";
|
|
5
|
-
import { Score as RuleScore } from "./Score";
|
|
6
|
-
export var Rule;
|
|
7
|
-
(function (Rule) {
|
|
8
|
-
Rule.Other = RuleOther;
|
|
9
|
-
Rule.Score = RuleScore;
|
|
10
|
-
Rule.Charge = RuleCharge;
|
|
11
|
-
Rule.Base = RuleBase;
|
|
12
|
-
let Api;
|
|
13
|
-
(function (Api) {
|
|
14
|
-
Api.type = isly.union(Rule.Other.type, Rule.Score.type, Rule.Charge.Api.type);
|
|
15
|
-
function from(rule, realm) {
|
|
16
|
-
return rule.action == "charge" ? Rule.Charge.Api.from(rule, realm) : rule;
|
|
17
|
-
}
|
|
18
|
-
Api.from = from;
|
|
19
|
-
})(Api = Rule.Api || (Rule.Api = {}));
|
|
20
|
-
let Action;
|
|
21
|
-
(function (Action) {
|
|
22
|
-
Action.values = [...Rule.Other.Action.values, Rule.Score.Action.value, Rule.Charge.Action.value];
|
|
23
|
-
Action.type = isly.string(Action.values);
|
|
24
|
-
})(Action = Rule.Action || (Rule.Action = {}));
|
|
25
|
-
})(Rule || (Rule = {}));
|
|
26
|
-
export const type = isly.union(Rule.Other.type, Rule.Score.type, Rule.Charge.Api.type);
|
|
27
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
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