@pax2pay/model-banking 0.1.268 → 0.1.270
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/Client/Logs.ts +10 -0
- package/Client/index.ts +2 -0
- package/Log.ts +7 -0
- package/Rule/Rule/Base.ts +22 -0
- package/Rule/Rule/Other.ts +3 -2
- package/Rule/Rule/Score.ts +3 -2
- package/Rule/Rule/index.ts +4 -23
- package/Rule/index.ts +2 -2
- package/Transaction/Note.ts +1 -1
- package/dist/Client/Logs.d.ts +8 -0
- package/dist/Client/Logs.js +9 -0
- package/dist/Client/Logs.js.map +1 -0
- package/dist/Client/index.d.ts +2 -0
- package/dist/Client/index.js +2 -0
- package/dist/Client/index.js.map +1 -1
- package/dist/Log.d.ts +8 -0
- package/dist/Log.js +2 -0
- package/dist/Log.js.map +1 -0
- package/dist/Rule/Rule/Base.d.ts +14 -0
- package/dist/Rule/Rule/Base.js +14 -0
- package/dist/Rule/Rule/Base.js.map +1 -0
- package/dist/Rule/Rule/Other.d.ts +2 -1
- package/dist/Rule/Rule/Other.js +2 -1
- package/dist/Rule/Rule/Other.js.map +1 -1
- package/dist/Rule/Rule/Score.d.ts +2 -1
- package/dist/Rule/Rule/Score.js +2 -1
- package/dist/Rule/Rule/Score.js.map +1 -1
- package/dist/Rule/Rule/index.d.ts +4 -13
- package/dist/Rule/Rule/index.js +3 -10
- package/dist/Rule/Rule/index.js.map +1 -1
- package/dist/Rule/index.d.ts +3 -3
- package/dist/Rule/index.js +1 -1
- package/dist/Rule/index.js.map +1 -1
- package/dist/Transaction/Note.d.ts +1 -3
- package/dist/pax2pay.d.ts +1 -0
- package/package.json +3 -2
- package/pax2pay.ts +1 -0
package/Client/Logs.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { gracely } from "gracely"
|
|
2
|
+
import { http } from "cloudly-http"
|
|
3
|
+
import { Log } from "../Log"
|
|
4
|
+
|
|
5
|
+
export class Logs {
|
|
6
|
+
constructor(private readonly client: http.Client) {}
|
|
7
|
+
async list(resource?: Log.Resource): Promise<Log[] | gracely.Error> {
|
|
8
|
+
return this.client.get<Log[]>(`/audit/${resource}`)
|
|
9
|
+
}
|
|
10
|
+
}
|
package/Client/index.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { Accounts } from "./Accounts"
|
|
|
6
6
|
import { Cards } from "./Cards"
|
|
7
7
|
import { Exchanges } from "./Exchanges"
|
|
8
8
|
import { Labels } from "./Labels"
|
|
9
|
+
import { Logs } from "./Logs"
|
|
9
10
|
import { Operations } from "./Operations"
|
|
10
11
|
import { Organizations } from "./Organizations"
|
|
11
12
|
import { Reports } from "./Reports"
|
|
@@ -24,6 +25,7 @@ export class Client extends rest.Client<gracely.Error> {
|
|
|
24
25
|
readonly exchanges = new Exchanges(this.client)
|
|
25
26
|
readonly organizations = new Organizations(this.client)
|
|
26
27
|
readonly reports = new Reports(this.client)
|
|
28
|
+
readonly logs = new Logs(this.client)
|
|
27
29
|
readonly rules = new Rules(this.client)
|
|
28
30
|
readonly settlements = new Settlements(this.client)
|
|
29
31
|
readonly transactions = new Transactions(this.client)
|
package/Log.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { isly } from "isly"
|
|
2
|
+
|
|
3
|
+
export interface Base {
|
|
4
|
+
name: string
|
|
5
|
+
description: string
|
|
6
|
+
type: Base.Kind
|
|
7
|
+
condition: string
|
|
8
|
+
flags: string[]
|
|
9
|
+
groups?: string[]
|
|
10
|
+
}
|
|
11
|
+
export namespace Base {
|
|
12
|
+
export const kinds = ["authorization", "outbound", "inbound"] as const
|
|
13
|
+
export type Kind = typeof kinds[number]
|
|
14
|
+
export const type = isly.object<Base>({
|
|
15
|
+
name: isly.string(),
|
|
16
|
+
description: isly.string(),
|
|
17
|
+
type: isly.string(kinds),
|
|
18
|
+
condition: isly.string(),
|
|
19
|
+
flags: isly.string().array(),
|
|
20
|
+
groups: isly.string().array().optional(),
|
|
21
|
+
})
|
|
22
|
+
}
|
package/Rule/Rule/Other.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { isly } from "isly"
|
|
2
|
+
import { Base } from "./Base"
|
|
2
3
|
|
|
3
|
-
export interface Other {
|
|
4
|
+
export interface Other extends Base {
|
|
4
5
|
action: Other.Action
|
|
5
6
|
}
|
|
6
7
|
export namespace Other {
|
|
7
8
|
export const actions = ["review", "reject", "flag"] as const
|
|
8
9
|
export type Action = typeof actions[number]
|
|
9
|
-
export const type =
|
|
10
|
+
export const type = Base.type.extend<Other>({ action: isly.string<Action>(actions) })
|
|
10
11
|
}
|
package/Rule/Rule/Score.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { isly } from "isly"
|
|
2
|
+
import { Base } from "./Base"
|
|
2
3
|
|
|
3
|
-
export interface Score {
|
|
4
|
+
export interface Score extends Base {
|
|
4
5
|
action: "score"
|
|
5
6
|
risk: Score.Risk
|
|
6
7
|
}
|
|
7
8
|
export namespace Score {
|
|
8
9
|
export type Risk = number
|
|
9
10
|
export const Risk = isly.number<Risk>(["positive", "integer"])
|
|
10
|
-
export const type =
|
|
11
|
+
export const type = Base.type.extend<Score>({ action: isly.string("score"), risk: Risk })
|
|
11
12
|
}
|
package/Rule/Rule/index.ts
CHANGED
|
@@ -1,35 +1,16 @@
|
|
|
1
1
|
import { isly } from "isly"
|
|
2
|
+
import { Base as RuleBase } from "./Base"
|
|
2
3
|
import { Other as RuleOther } from "./Other"
|
|
3
4
|
import { Score as RuleScore } from "./Score"
|
|
4
5
|
|
|
5
|
-
export type Rule = Rule.
|
|
6
|
+
export type Rule = Rule.Other | Rule.Score
|
|
6
7
|
|
|
7
8
|
export namespace Rule {
|
|
8
9
|
export import Other = RuleOther
|
|
9
10
|
export import Score = RuleScore
|
|
11
|
+
export import Base = RuleBase
|
|
10
12
|
export const actions = [...Other.actions, "score"] as const
|
|
11
13
|
export type Action = typeof actions[number]
|
|
12
|
-
export const kinds = ["authorization", "outbound", "inbound"] as const
|
|
13
|
-
export type Kind = typeof kinds[number]
|
|
14
|
-
export interface Base {
|
|
15
|
-
name: string
|
|
16
|
-
description: string
|
|
17
|
-
type: Rule.Kind
|
|
18
|
-
condition: string
|
|
19
|
-
flags: string[]
|
|
20
|
-
groups?: string[]
|
|
21
|
-
}
|
|
22
|
-
export const Base = isly.object<Base>({
|
|
23
|
-
name: isly.string(),
|
|
24
|
-
description: isly.string(),
|
|
25
|
-
type: isly.string(kinds),
|
|
26
|
-
condition: isly.string(),
|
|
27
|
-
flags: isly.string().array(),
|
|
28
|
-
groups: isly.string().array().optional(),
|
|
29
|
-
})
|
|
30
14
|
}
|
|
31
15
|
// Outside of the namespace otherwise the Rule import in Card/Card.Creatable and Organization causes a circular dependency crash
|
|
32
|
-
export const type = isly.
|
|
33
|
-
Rule.Base,
|
|
34
|
-
isly.union<Rule.Other | Rule.Score, Rule.Other, Rule.Score>(Rule.Other.type, Rule.Score.type)
|
|
35
|
-
)
|
|
16
|
+
export const type = isly.union<Rule.Other | Rule.Score, Rule.Other, Rule.Score>(Rule.Other.type, Rule.Score.type)
|
package/Rule/index.ts
CHANGED
|
@@ -8,8 +8,8 @@ export type Rule = ModelRule
|
|
|
8
8
|
export namespace Rule {
|
|
9
9
|
export const actions = ModelRule.actions
|
|
10
10
|
export type Action = ModelRule.Action
|
|
11
|
-
export const kinds = ModelRule.kinds
|
|
12
|
-
export type Kind = ModelRule.Kind
|
|
11
|
+
export const kinds = ModelRule.Base.kinds
|
|
12
|
+
export type Kind = ModelRule.Base.Kind
|
|
13
13
|
export import Other = ModelRule.Other
|
|
14
14
|
export import Score = ModelRule.Score
|
|
15
15
|
export import State = RuleState
|
package/Transaction/Note.ts
CHANGED
|
@@ -15,7 +15,7 @@ export namespace Note {
|
|
|
15
15
|
text?: string
|
|
16
16
|
action?: "approve" | "reject"
|
|
17
17
|
flags?: string[]
|
|
18
|
-
rule?:
|
|
18
|
+
rule?: Rule
|
|
19
19
|
}
|
|
20
20
|
export namespace Creatable {
|
|
21
21
|
export const type = isly.object<Creatable>({
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { gracely } from "gracely";
|
|
2
|
+
import { http } from "cloudly-http";
|
|
3
|
+
import { Log } from "../Log";
|
|
4
|
+
export declare class Logs {
|
|
5
|
+
private readonly client;
|
|
6
|
+
constructor(client: http.Client);
|
|
7
|
+
list(resource?: Log.Resource): Promise<Log[] | gracely.Error>;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Logs.js","sourceRoot":"../","sources":["Client/Logs.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,IAAI;IAChB,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,IAAI,CAAC,QAAuB;QACjC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAQ,UAAU,QAAQ,EAAE,CAAC,CAAA;IACpD,CAAC;CACD"}
|
package/dist/Client/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { Accounts } from "./Accounts";
|
|
|
6
6
|
import { Cards } from "./Cards";
|
|
7
7
|
import { Exchanges } from "./Exchanges";
|
|
8
8
|
import { Labels } from "./Labels";
|
|
9
|
+
import { Logs } from "./Logs";
|
|
9
10
|
import { Operations } from "./Operations";
|
|
10
11
|
import { Organizations } from "./Organizations";
|
|
11
12
|
import { Reports } from "./Reports";
|
|
@@ -23,6 +24,7 @@ export declare class Client extends rest.Client<gracely.Error> {
|
|
|
23
24
|
readonly exchanges: Exchanges;
|
|
24
25
|
readonly organizations: Organizations;
|
|
25
26
|
readonly reports: Reports;
|
|
27
|
+
readonly logs: Logs;
|
|
26
28
|
readonly rules: Rules;
|
|
27
29
|
readonly settlements: Settlements;
|
|
28
30
|
readonly transactions: Transactions;
|
package/dist/Client/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import { Accounts } from "./Accounts";
|
|
|
5
5
|
import { Cards } from "./Cards";
|
|
6
6
|
import { Exchanges } from "./Exchanges";
|
|
7
7
|
import { Labels } from "./Labels";
|
|
8
|
+
import { Logs } from "./Logs";
|
|
8
9
|
import { Operations } from "./Operations";
|
|
9
10
|
import { Organizations } from "./Organizations";
|
|
10
11
|
import { Reports } from "./Reports";
|
|
@@ -22,6 +23,7 @@ export class Client extends rest.Client {
|
|
|
22
23
|
this.exchanges = new Exchanges(this.client);
|
|
23
24
|
this.organizations = new Organizations(this.client);
|
|
24
25
|
this.reports = new Reports(this.client);
|
|
26
|
+
this.logs = new Logs(this.client);
|
|
25
27
|
this.rules = new Rules(this.client);
|
|
26
28
|
this.settlements = new Settlements(this.client);
|
|
27
29
|
this.transactions = new Transactions(this.client);
|
package/dist/Client/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,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,CAAC,EAAE,EAAE,WAAW,EAAE,CAAC,CAAA;QAClE,YAAO,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAa5C,CAAC;IAXA,MAAM,CAAC,MAAM,CAA0B,MAAc,EAAE,GAAY,EAAE,IAAiC;QACrG,IAAI,UAAsC,CAAA;QAC1C,MAAM,MAAM,GAAW,IAAI,MAAM,CAChC,CAAC,UAAU,GAAG,IAAI,IAAI,CAAC,MAAM,CAAgB,MAAM,EAAE,GAAG,EAAE;YACzD,YAAY,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC;SACxG,CAAC,CAAC,CACH,CAAA;QACD,IAAI,IAAI;YACP,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAA;QACxC,OAAO,MAAoB,CAAA;IAC5B,CAAC;CACD"}
|
package/dist/Log.d.ts
ADDED
package/dist/Log.js
ADDED
package/dist/Log.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Log.js","sourceRoot":"../","sources":["Log.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { isly } from "isly";
|
|
2
|
+
export interface Base {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
type: Base.Kind;
|
|
6
|
+
condition: string;
|
|
7
|
+
flags: string[];
|
|
8
|
+
groups?: string[];
|
|
9
|
+
}
|
|
10
|
+
export declare namespace Base {
|
|
11
|
+
const kinds: readonly ["authorization", "outbound", "inbound"];
|
|
12
|
+
type Kind = typeof kinds[number];
|
|
13
|
+
const type: isly.object.ExtendableType<Base>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { isly } from "isly";
|
|
2
|
+
export var Base;
|
|
3
|
+
(function (Base) {
|
|
4
|
+
Base.kinds = ["authorization", "outbound", "inbound"];
|
|
5
|
+
Base.type = isly.object({
|
|
6
|
+
name: isly.string(),
|
|
7
|
+
description: isly.string(),
|
|
8
|
+
type: isly.string(Base.kinds),
|
|
9
|
+
condition: isly.string(),
|
|
10
|
+
flags: isly.string().array(),
|
|
11
|
+
groups: isly.string().array().optional(),
|
|
12
|
+
});
|
|
13
|
+
})(Base || (Base = {}));
|
|
14
|
+
//# sourceMappingURL=Base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Base.js","sourceRoot":"../","sources":["Rule/Rule/Base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAU3B,MAAM,KAAW,IAAI,CAWpB;AAXD,WAAiB,IAAI;IACP,UAAK,GAAG,CAAC,eAAe,EAAE,UAAU,EAAE,SAAS,CAAU,CAAA;IAEzD,SAAI,GAAG,IAAI,CAAC,MAAM,CAAO;QACrC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;QACnB,WAAW,EAAE,IAAI,CAAC,MAAM,EAAE;QAC1B,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,KAAA,KAAK,CAAC;QACxB,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE;QACxB,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;QAC5B,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;KACxC,CAAC,CAAA;AACH,CAAC,EAXgB,IAAI,KAAJ,IAAI,QAWpB"}
|
package/dist/Rule/Rule/Other.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { isly } from "isly";
|
|
2
|
+
import { Base } from "./Base";
|
|
2
3
|
export var Other;
|
|
3
4
|
(function (Other) {
|
|
4
5
|
Other.actions = ["review", "reject", "flag"];
|
|
5
|
-
Other.type =
|
|
6
|
+
Other.type = Base.type.extend({ action: isly.string(Other.actions) });
|
|
6
7
|
})(Other || (Other = {}));
|
|
7
8
|
//# sourceMappingURL=Other.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Other.js","sourceRoot":"../","sources":["Rule/Rule/Other.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;
|
|
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,CAIrB;AAJD,WAAiB,KAAK;IACR,aAAO,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAU,CAAA;IAE/C,UAAI,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAS,MAAA,OAAO,CAAC,EAAE,CAAC,CAAA;AACtF,CAAC,EAJgB,KAAK,KAAL,KAAK,QAIrB"}
|
package/dist/Rule/Rule/Score.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { isly } from "isly";
|
|
2
|
+
import { Base } from "./Base";
|
|
2
3
|
export var Score;
|
|
3
4
|
(function (Score) {
|
|
4
5
|
Score.Risk = isly.number(["positive", "integer"]);
|
|
5
|
-
Score.type =
|
|
6
|
+
Score.type = Base.type.extend({ action: isly.string("score"), risk: Score.Risk });
|
|
6
7
|
})(Score || (Score = {}));
|
|
7
8
|
//# sourceMappingURL=Score.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Score.js","sourceRoot":"../","sources":["Rule/Rule/Score.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;
|
|
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;AAM7B,MAAM,KAAW,KAAK,CAIrB;AAJD,WAAiB,KAAK;IAER,UAAI,GAAG,IAAI,CAAC,MAAM,CAAO,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,CAAA;IACjD,UAAI,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAA,IAAI,EAAE,CAAC,CAAA;AAC1F,CAAC,EAJgB,KAAK,KAAL,KAAK,QAIrB"}
|
|
@@ -1,22 +1,13 @@
|
|
|
1
1
|
import { isly } from "isly";
|
|
2
|
+
import { Base as RuleBase } from "./Base";
|
|
2
3
|
import { Other as RuleOther } from "./Other";
|
|
3
4
|
import { Score as RuleScore } from "./Score";
|
|
4
|
-
export type Rule = Rule.
|
|
5
|
+
export type Rule = Rule.Other | Rule.Score;
|
|
5
6
|
export declare namespace Rule {
|
|
6
7
|
export import Other = RuleOther;
|
|
7
8
|
export import Score = RuleScore;
|
|
9
|
+
export import Base = RuleBase;
|
|
8
10
|
const actions: readonly ["review", "reject", "flag", "score"];
|
|
9
11
|
type Action = typeof actions[number];
|
|
10
|
-
const kinds: readonly ["authorization", "outbound", "inbound"];
|
|
11
|
-
type Kind = typeof kinds[number];
|
|
12
|
-
interface Base {
|
|
13
|
-
name: string;
|
|
14
|
-
description: string;
|
|
15
|
-
type: Rule.Kind;
|
|
16
|
-
condition: string;
|
|
17
|
-
flags: string[];
|
|
18
|
-
groups?: string[];
|
|
19
|
-
}
|
|
20
|
-
const Base: isly.object.ExtendableType<Base>;
|
|
21
12
|
}
|
|
22
|
-
export declare const type: isly.Type<
|
|
13
|
+
export declare const type: isly.Type<RuleOther | RuleScore>;
|
package/dist/Rule/Rule/index.js
CHANGED
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
import { isly } from "isly";
|
|
2
|
+
import { Base as RuleBase } from "./Base";
|
|
2
3
|
import { Other as RuleOther } from "./Other";
|
|
3
4
|
import { Score as RuleScore } from "./Score";
|
|
4
5
|
export var Rule;
|
|
5
6
|
(function (Rule) {
|
|
6
7
|
Rule.Other = RuleOther;
|
|
7
8
|
Rule.Score = RuleScore;
|
|
9
|
+
Rule.Base = RuleBase;
|
|
8
10
|
Rule.actions = [...Rule.Other.actions, "score"];
|
|
9
|
-
Rule.kinds = ["authorization", "outbound", "inbound"];
|
|
10
|
-
Rule.Base = isly.object({
|
|
11
|
-
name: isly.string(),
|
|
12
|
-
description: isly.string(),
|
|
13
|
-
type: isly.string(Rule.kinds),
|
|
14
|
-
condition: isly.string(),
|
|
15
|
-
flags: isly.string().array(),
|
|
16
|
-
groups: isly.string().array().optional(),
|
|
17
|
-
});
|
|
18
11
|
})(Rule || (Rule = {}));
|
|
19
|
-
export const type = isly.
|
|
12
|
+
export const type = isly.union(Rule.Other.type, Rule.Score.type);
|
|
20
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Rule/Rule/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,SAAS,CAAA;AAI5C,MAAM,KAAW,IAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Rule/Rule/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,QAAQ,CAAA;AACzC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,SAAS,CAAA;AAI5C,MAAM,KAAW,IAAI,CAMpB;AAND,WAAiB,IAAI;IACN,UAAK,GAAG,SAAS,CAAA;IACjB,UAAK,GAAG,SAAS,CAAA;IACjB,SAAI,GAAG,QAAQ,CAAA;IAChB,YAAO,GAAG,CAAC,GAAG,KAAA,KAAK,CAAC,OAAO,EAAE,OAAO,CAAU,CAAA;AAE5D,CAAC,EANgB,IAAI,KAAJ,IAAI,QAMpB;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAkD,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA"}
|
package/dist/Rule/index.d.ts
CHANGED
|
@@ -6,12 +6,12 @@ export declare namespace Rule {
|
|
|
6
6
|
const actions: readonly ["review", "reject", "flag", "score"];
|
|
7
7
|
type Action = ModelRule.Action;
|
|
8
8
|
const kinds: readonly ["authorization", "outbound", "inbound"];
|
|
9
|
-
type Kind = ModelRule.Kind;
|
|
9
|
+
type Kind = ModelRule.Base.Kind;
|
|
10
10
|
export import Other = ModelRule.Other;
|
|
11
11
|
export import Score = ModelRule.Score;
|
|
12
12
|
export import State = RuleState;
|
|
13
|
-
const type: import("isly/dist/cjs/Type").Type<
|
|
14
|
-
const is: import("isly/dist/cjs/Type").Type.IsFunction<
|
|
13
|
+
const type: import("isly/dist/cjs/Type").Type<Other | Score>;
|
|
14
|
+
const is: import("isly/dist/cjs/Type").Type.IsFunction<Other | Score>;
|
|
15
15
|
const flaw: import("isly/dist/cjs/Type").Type.FlawFunction;
|
|
16
16
|
function evaluate(rules: Rule[], state: State, macros?: Record<string, selectively.Definition>): Record<ModelRule.Other.Action, Rule[]> & {
|
|
17
17
|
risk?: number;
|
package/dist/Rule/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { State as RuleState } from "./State";
|
|
|
5
5
|
export var Rule;
|
|
6
6
|
(function (Rule) {
|
|
7
7
|
Rule.actions = ModelRule.actions;
|
|
8
|
-
Rule.kinds = ModelRule.kinds;
|
|
8
|
+
Rule.kinds = ModelRule.Base.kinds;
|
|
9
9
|
Rule.Other = ModelRule.Other;
|
|
10
10
|
Rule.Score = ModelRule.Score;
|
|
11
11
|
Rule.State = RuleState;
|
package/dist/Rule/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Rule/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAC5D,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,SAAS,CAAA;AAI5C,MAAM,KAAW,IAAI,CA0CpB;AA1CD,WAAiB,IAAI;IACP,YAAO,GAAG,SAAS,CAAC,OAAO,CAAA;IAE3B,UAAK,GAAG,SAAS,CAAC,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Rule/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAC5D,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,SAAS,CAAA;AAI5C,MAAM,KAAW,IAAI,CA0CpB;AA1CD,WAAiB,IAAI;IACP,YAAO,GAAG,SAAS,CAAC,OAAO,CAAA;IAE3B,UAAK,GAAG,SAAS,CAAC,IAAI,CAAC,KAAK,CAAA;IAE3B,UA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AAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YAC1D,OAAO,CAAC,CAAA;QACT,CAAC,EACD,CAAC,EAAE,EAAE,EAAE,CAAC,CACR,CAAA;QACD,KAAK,CAAC,WAAW,CAAC,IAAI,GAAG,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,CAAA;QACtD,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,CAAA;QACpC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;QACrF,OAAO,MAAM,CAAA;IACd,CAAC;IAjBe,aAAQ,WAiBvB,CAAA;AACF,CAAC,EA1CgB,IAAI,KAAJ,IAAI,QA0CpB"}
|
package/dist/pax2pay.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pax2pay/model-banking",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.270",
|
|
4
4
|
"description": "Library containing data model types and functions for the Pax2Pay Banking API.",
|
|
5
5
|
"author": "Pax2Pay Ltd",
|
|
6
6
|
"license": "MIT",
|
|
@@ -71,9 +71,10 @@
|
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"@userwidgets/model": "0.8.24",
|
|
74
|
-
"authly": "^3.0.
|
|
74
|
+
"authly": "^3.0.12",
|
|
75
75
|
"cloudly-http": "^0.1.7",
|
|
76
76
|
"cloudly-rest": "^0.1.3",
|
|
77
|
+
"cloudly-storage": "^0.10.6",
|
|
77
78
|
"cryptly": "^4.0.4",
|
|
78
79
|
"gracely": "^2.0.8",
|
|
79
80
|
"isly": "0.1.13",
|
package/pax2pay.ts
CHANGED