@pax2pay/model-banking 0.1.593 → 0.1.595
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/Account/Creatable.ts +0 -1
- package/Account/Type.ts +7 -0
- package/Account/index.ts +4 -4
- package/Organization/index.ts +6 -0
- package/Rule/Other.ts +2 -4
- package/Rule/State/Account.ts +4 -4
- package/Rule/State/index.ts +2 -6
- package/Rule/control.ts +1 -2
- package/Rule/index.ts +2 -10
- package/dist/cjs/Account/Creatable.js.map +1 -1
- package/dist/cjs/Account/Type.d.ts +6 -0
- package/dist/cjs/Account/Type.js +10 -0
- package/dist/cjs/Account/Type.js.map +1 -0
- package/dist/cjs/Account/index.d.ts +3 -2
- package/dist/cjs/Account/index.js +3 -4
- package/dist/cjs/Account/index.js.map +1 -1
- package/dist/cjs/Organization/index.d.ts +3 -0
- package/dist/cjs/Organization/index.js +6 -0
- package/dist/cjs/Organization/index.js.map +1 -1
- package/dist/cjs/Rule/Other.d.ts +1 -2
- package/dist/cjs/Rule/Other.js +2 -2
- package/dist/cjs/Rule/Other.js.map +1 -1
- package/dist/cjs/Rule/State/Account.d.ts +3 -3
- package/dist/cjs/Rule/State/Account.js +2 -2
- package/dist/cjs/Rule/State/Account.js.map +1 -1
- package/dist/cjs/Rule/State/index.d.ts +2 -2
- package/dist/cjs/Rule/State/index.js +4 -4
- package/dist/cjs/Rule/State/index.js.map +1 -1
- package/dist/cjs/Rule/control.js +1 -2
- package/dist/cjs/Rule/control.js.map +1 -1
- package/dist/cjs/Rule/index.d.ts +1 -3
- package/dist/cjs/Rule/index.js +2 -2
- package/dist/cjs/Rule/index.js.map +1 -1
- package/dist/mjs/Account/Creatable.js.map +1 -1
- package/dist/mjs/Account/Type.d.ts +6 -0
- package/dist/mjs/Account/Type.js +7 -0
- package/dist/mjs/Account/Type.js.map +1 -0
- package/dist/mjs/Account/index.d.ts +3 -2
- package/dist/mjs/Account/index.js +3 -4
- package/dist/mjs/Account/index.js.map +1 -1
- package/dist/mjs/Organization/index.d.ts +3 -0
- package/dist/mjs/Organization/index.js +6 -0
- package/dist/mjs/Organization/index.js.map +1 -1
- package/dist/mjs/Rule/Other.d.ts +1 -2
- package/dist/mjs/Rule/Other.js +2 -2
- package/dist/mjs/Rule/Other.js.map +1 -1
- package/dist/mjs/Rule/State/Account.d.ts +3 -3
- package/dist/mjs/Rule/State/Account.js +2 -2
- package/dist/mjs/Rule/State/Account.js.map +1 -1
- package/dist/mjs/Rule/State/index.d.ts +2 -2
- package/dist/mjs/Rule/State/index.js +4 -4
- package/dist/mjs/Rule/State/index.js.map +1 -1
- package/dist/mjs/Rule/control.js +1 -2
- package/dist/mjs/Rule/control.js.map +1 -1
- package/dist/mjs/Rule/index.d.ts +1 -3
- package/dist/mjs/Rule/index.js +2 -2
- package/dist/mjs/Rule/index.js.map +1 -1
- package/package.json +1 -1
- package/Rule/definitions.ts +0 -6
- package/dist/cjs/Rule/definitions.d.ts +0 -2
- package/dist/cjs/Rule/definitions.js +0 -8
- package/dist/cjs/Rule/definitions.js.map +0 -1
- package/dist/mjs/Rule/definitions.d.ts +0 -2
- package/dist/mjs/Rule/definitions.js +0 -5
- package/dist/mjs/Rule/definitions.js.map +0 -1
package/Account/Creatable.ts
CHANGED
package/Account/Type.ts
ADDED
package/Account/index.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { Creatable as AccountCreatable } from "./Creatable"
|
|
|
9
9
|
import { Details as AccountDetails } from "./Details"
|
|
10
10
|
import { History as AccountHistory } from "./History"
|
|
11
11
|
import { Status as AccountStatus } from "./Status"
|
|
12
|
+
import { Type as AccountType } from "./Type"
|
|
12
13
|
|
|
13
14
|
export interface Account extends Account.Creatable {
|
|
14
15
|
id: cryptly.Identifier
|
|
@@ -22,6 +23,7 @@ export interface Account extends Account.Creatable {
|
|
|
22
23
|
charges?: AccountCharge
|
|
23
24
|
rules?: Rule[]
|
|
24
25
|
status: Account.Status
|
|
26
|
+
type: Account.Type
|
|
25
27
|
}
|
|
26
28
|
export namespace Account {
|
|
27
29
|
export import Charge = AccountCharge
|
|
@@ -29,10 +31,7 @@ export namespace Account {
|
|
|
29
31
|
export import Status = AccountStatus
|
|
30
32
|
export import History = AccountHistory
|
|
31
33
|
export import Details = AccountDetails
|
|
32
|
-
export
|
|
33
|
-
export function fromLegacy(maybeLegacy: Legacy | Account, status?: Account.Status): Account {
|
|
34
|
-
return { ...maybeLegacy, status: status ?? ("status" in maybeLegacy ? maybeLegacy.status : { mode: "active" }) }
|
|
35
|
-
}
|
|
34
|
+
export import Type = AccountType
|
|
36
35
|
export const type = Creatable.type.extend<Account>({
|
|
37
36
|
id: isly.string(),
|
|
38
37
|
created: isly.fromIs("isoly.DateTime", isoly.DateTime.is),
|
|
@@ -45,6 +44,7 @@ export namespace Account {
|
|
|
45
44
|
charges: AccountCharge.type.optional(),
|
|
46
45
|
rules: Rule.type.array().optional(),
|
|
47
46
|
status: AccountStatus.type,
|
|
47
|
+
type: Type.type,
|
|
48
48
|
})
|
|
49
49
|
export function isIdentifier(value: cryptly.Identifier | any): value is cryptly.Identifier {
|
|
50
50
|
return cryptly.Identifier.is(value, 8)
|
package/Organization/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isly } from "isly"
|
|
2
|
+
import { Type } from "../Account/Type"
|
|
2
3
|
import { Realm } from "../Realm"
|
|
3
4
|
import { Rule } from "../Rule"
|
|
4
5
|
import { type as ruleType } from "../Rule/type"
|
|
@@ -18,6 +19,7 @@ export interface Organization {
|
|
|
18
19
|
contact?: Organization.Contact
|
|
19
20
|
groups?: string[]
|
|
20
21
|
fx?: OrganizationFx
|
|
22
|
+
type: Type
|
|
21
23
|
}
|
|
22
24
|
export namespace Organization {
|
|
23
25
|
export import Creatable = OrganizationCreatable
|
|
@@ -35,5 +37,9 @@ export namespace Organization {
|
|
|
35
37
|
contact: Contact.type.optional(),
|
|
36
38
|
groups: isly.string().array().optional(),
|
|
37
39
|
fx: OrganizationFx.type.optional(),
|
|
40
|
+
type: Type.type,
|
|
38
41
|
})
|
|
42
|
+
export function from(creatable: Creatable, realm: Realm): Organization {
|
|
43
|
+
return { ...creatable, realm, rules: creatable.rules ?? [], status: "active", type: "emoney" }
|
|
44
|
+
}
|
|
39
45
|
}
|
package/Rule/Other.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { isoly } from "isoly"
|
|
2
|
-
import { selectively } from "selectively"
|
|
3
2
|
import { isly } from "isly"
|
|
4
3
|
import { isly as isly2 } from "isly2"
|
|
5
4
|
import type { Note } from "../Transaction/Note"
|
|
@@ -24,8 +23,7 @@ export namespace Other {
|
|
|
24
23
|
export const type2: isly2.Object<Other> = Base.type2.extend<Other>({ action: Action.type2 })
|
|
25
24
|
export function evaluate(
|
|
26
25
|
rules: Other[],
|
|
27
|
-
state: State
|
|
28
|
-
macros?: Record<string, selectively.Definition>
|
|
26
|
+
state: State
|
|
29
27
|
): { outcomes: Record<Other.Action, Other[]>; notes: Note[]; flags: Set<string> } {
|
|
30
28
|
const now = isoly.DateTime.now()
|
|
31
29
|
const result: ReturnType<typeof evaluate> = {
|
|
@@ -42,7 +40,7 @@ export namespace Other {
|
|
|
42
40
|
["card", "external", "internal"].some(type => type == state.transaction.type)
|
|
43
41
|
)
|
|
44
42
|
for (const rule of rules)
|
|
45
|
-
if (control(rule, state
|
|
43
|
+
if (control(rule, state)) {
|
|
46
44
|
result.outcomes[rule.action].push(rule)
|
|
47
45
|
result.notes.push({ author: "automatic", created: now, text: rule.name, rule })
|
|
48
46
|
rule.flags.forEach(f => result.flags.add(f))
|
package/Rule/State/Account.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { Rail } from "../../Rail"
|
|
|
3
3
|
|
|
4
4
|
export interface Account extends ModelAccount {
|
|
5
5
|
address: Rail.Address
|
|
6
|
-
transactions
|
|
7
|
-
days
|
|
6
|
+
transactions?: Account.Transactions
|
|
7
|
+
days?: Account.Days
|
|
8
8
|
}
|
|
9
9
|
// keep for note so we remember how to store: type Storage = Record<`statistics|currency|${isoly.Currency}`, isoly.DateTime>
|
|
10
10
|
export namespace Account {
|
|
@@ -26,7 +26,7 @@ export namespace Account {
|
|
|
26
26
|
outgoing: { today: Today }
|
|
27
27
|
card: { today: Today }
|
|
28
28
|
}
|
|
29
|
-
export function from(account: ModelAccount, address: Rail.Address
|
|
30
|
-
return { ...account, address
|
|
29
|
+
export function from(account: ModelAccount, address: Rail.Address): Account {
|
|
30
|
+
return { ...account, address }
|
|
31
31
|
}
|
|
32
32
|
}
|
package/Rule/State/index.ts
CHANGED
|
@@ -39,8 +39,6 @@ export namespace State {
|
|
|
39
39
|
export function from(
|
|
40
40
|
account: ModelAccount,
|
|
41
41
|
address: Rail.Address,
|
|
42
|
-
transactions: Account.Transactions,
|
|
43
|
-
days: Account.Days,
|
|
44
42
|
transaction: ModelTransaction.Creatable.Resolved | ModelTransaction,
|
|
45
43
|
kind: Rule.Base.Kind,
|
|
46
44
|
stage: "finalize" | "initiate",
|
|
@@ -48,7 +46,7 @@ export namespace State {
|
|
|
48
46
|
organization?: Organization
|
|
49
47
|
): State {
|
|
50
48
|
return {
|
|
51
|
-
account: Account.from(account, address
|
|
49
|
+
account: Account.from(account, address),
|
|
52
50
|
transaction: Transaction.from(account, transaction, kind, stage),
|
|
53
51
|
authorization: Authorization.from(transaction),
|
|
54
52
|
card,
|
|
@@ -63,14 +61,12 @@ export namespace State {
|
|
|
63
61
|
export function fromPreTransaction(
|
|
64
62
|
account: ModelAccount,
|
|
65
63
|
address: Rail.Address,
|
|
66
|
-
transactions: Account.Transactions,
|
|
67
|
-
days: Account.Days,
|
|
68
64
|
transaction: ModelTransaction.PreTransaction,
|
|
69
65
|
card?: ModelCard & { statistics: Card.Statistics },
|
|
70
66
|
organization?: Organization
|
|
71
67
|
): State {
|
|
72
68
|
return {
|
|
73
|
-
account: Account.from(account, address
|
|
69
|
+
account: Account.from(account, address),
|
|
74
70
|
transaction: Transaction.from(account, transaction, type[transaction.type], "initiate"),
|
|
75
71
|
card: card ? Card.from(card, card.statistics) : undefined,
|
|
76
72
|
organization,
|
package/Rule/control.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { selectively } from "selectively"
|
|
2
2
|
import type { Rule } from "."
|
|
3
|
-
import { definitions } from "./definitions"
|
|
4
3
|
import type { State } from "./State"
|
|
5
4
|
|
|
6
5
|
export function control(rule: Rule, state: State, macros?: Record<string, selectively.Definition>): boolean {
|
|
7
|
-
return selectively.
|
|
6
|
+
return selectively.parse(rule.condition).is(state)
|
|
8
7
|
}
|
package/Rule/index.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { selectively } from "selectively"
|
|
2
1
|
import { isly } from "isly"
|
|
3
|
-
import { Exchange } from "../Exchange"
|
|
4
2
|
import type { Note } from "../Transaction/Note"
|
|
5
3
|
import { Base as RuleBase } from "./Base"
|
|
6
4
|
import { control as ruleControl } from "./control"
|
|
@@ -23,12 +21,7 @@ export namespace Rule {
|
|
|
23
21
|
export const type = isly.string<Action>(values)
|
|
24
22
|
}
|
|
25
23
|
export const type = ruleType
|
|
26
|
-
export function evaluate(
|
|
27
|
-
rules: Rule[],
|
|
28
|
-
state: RuleState,
|
|
29
|
-
macros?: Record<string, selectively.Definition>,
|
|
30
|
-
table: Exchange.Rates = {}
|
|
31
|
-
): RuleState.Evaluated {
|
|
24
|
+
export function evaluate(rules: Rule[], state: RuleState): RuleState.Evaluated {
|
|
32
25
|
const outcomes: Record<Rule.Action, Rule[]> = {
|
|
33
26
|
review: [],
|
|
34
27
|
reject: [],
|
|
@@ -37,8 +30,7 @@ export namespace Rule {
|
|
|
37
30
|
const notes: Note[] = []
|
|
38
31
|
const evaluated = Other.evaluate(
|
|
39
32
|
rules.filter(rule => Base.Kind.is(state.transaction.kind, rule, state.organization?.groups, state.card?.preset)),
|
|
40
|
-
state
|
|
41
|
-
macros
|
|
33
|
+
state
|
|
42
34
|
)
|
|
43
35
|
notes.push(...evaluated.notes)
|
|
44
36
|
outcomes.flag.push(...evaluated.outcomes.flag)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Creatable.js","sourceRoot":"","sources":["../../../Account/Creatable.ts"],"names":[],"mappings":";;;AACA,+BAA2B;
|
|
1
|
+
{"version":3,"file":"Creatable.js","sourceRoot":"","sources":["../../../Account/Creatable.ts"],"names":[],"mappings":";;;AACA,+BAA2B;AAM3B,IAAiB,SAAS,CAWzB;AAXD,WAAiB,SAAS;IAEzB,IAAiB,QAAQ,CAOxB;IAPD,WAAiB,QAAQ;QACX,eAAM,GAAG,CAAC,oBAAoB,EAAE,aAAa,CAAU,CAAA;QACpE,SAAgB,YAAY,CAAC,KAAe;YAC3C,OAAO,KAAK,IAAI,oBAAoB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAA;QACvD,CAAC;QAFe,qBAAY,eAE3B,CAAA;QAEY,aAAI,GAAG,WAAI,CAAC,MAAM,CAAC,SAAA,MAAM,CAAC,CAAA;IACxC,CAAC,EAPgB,QAAQ,GAAR,kBAAQ,KAAR,kBAAQ,QAOxB;IACY,cAAI,GAAG,WAAI,CAAC,MAAM,CAAY,EAAE,IAAI,EAAE,WAAI,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;AACxG,CAAC,EAXgB,SAAS,yBAAT,SAAS,QAWzB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Type = void 0;
|
|
4
|
+
const isly_1 = require("isly");
|
|
5
|
+
var Type;
|
|
6
|
+
(function (Type) {
|
|
7
|
+
Type.values = ["own funds", "emoney"];
|
|
8
|
+
Type.type = isly_1.isly.string(Type.values);
|
|
9
|
+
})(Type || (exports.Type = Type = {}));
|
|
10
|
+
//# sourceMappingURL=Type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Type.js","sourceRoot":"","sources":["../../../Account/Type.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAG3B,IAAiB,IAAI,CAGpB;AAHD,WAAiB,IAAI;IACP,WAAM,GAAG,CAAC,WAAW,EAAE,QAAQ,CAAU,CAAA;IACzC,SAAI,GAAG,WAAI,CAAC,MAAM,CAAO,KAAA,MAAM,CAAC,CAAA;AAC9C,CAAC,EAHgB,IAAI,oBAAJ,IAAI,QAGpB"}
|
|
@@ -8,6 +8,7 @@ import { Creatable as AccountCreatable } from "./Creatable";
|
|
|
8
8
|
import { Details as AccountDetails } from "./Details";
|
|
9
9
|
import { History as AccountHistory } from "./History";
|
|
10
10
|
import { Status as AccountStatus } from "./Status";
|
|
11
|
+
import { Type as AccountType } from "./Type";
|
|
11
12
|
export interface Account extends Account.Creatable {
|
|
12
13
|
id: cryptly.Identifier;
|
|
13
14
|
created: isoly.DateTime;
|
|
@@ -20,6 +21,7 @@ export interface Account extends Account.Creatable {
|
|
|
20
21
|
charges?: AccountCharge;
|
|
21
22
|
rules?: Rule[];
|
|
22
23
|
status: Account.Status;
|
|
24
|
+
type: Account.Type;
|
|
23
25
|
}
|
|
24
26
|
export declare namespace Account {
|
|
25
27
|
export import Charge = AccountCharge;
|
|
@@ -27,8 +29,7 @@ export declare namespace Account {
|
|
|
27
29
|
export import Status = AccountStatus;
|
|
28
30
|
export import History = AccountHistory;
|
|
29
31
|
export import Details = AccountDetails;
|
|
30
|
-
|
|
31
|
-
function fromLegacy(maybeLegacy: Legacy | Account, status?: Account.Status): Account;
|
|
32
|
+
export import Type = AccountType;
|
|
32
33
|
const type: import("isly/dist/cjs/object").IslyObject<Account, Creatable>;
|
|
33
34
|
function isIdentifier(value: cryptly.Identifier | any): value is cryptly.Identifier;
|
|
34
35
|
}
|
|
@@ -12,6 +12,7 @@ const Creatable_1 = require("./Creatable");
|
|
|
12
12
|
const Details_1 = require("./Details");
|
|
13
13
|
const History_1 = require("./History");
|
|
14
14
|
const Status_1 = require("./Status");
|
|
15
|
+
const Type_1 = require("./Type");
|
|
15
16
|
var Account;
|
|
16
17
|
(function (Account) {
|
|
17
18
|
Account.Charge = Charge_1.Charge;
|
|
@@ -19,10 +20,7 @@ var Account;
|
|
|
19
20
|
Account.Status = Status_1.Status;
|
|
20
21
|
Account.History = History_1.History;
|
|
21
22
|
Account.Details = Details_1.Details;
|
|
22
|
-
|
|
23
|
-
return { ...maybeLegacy, status: status ?? ("status" in maybeLegacy ? maybeLegacy.status : { mode: "active" }) };
|
|
24
|
-
}
|
|
25
|
-
Account.fromLegacy = fromLegacy;
|
|
23
|
+
Account.Type = Type_1.Type;
|
|
26
24
|
Account.type = Account.Creatable.type.extend({
|
|
27
25
|
id: isly_1.isly.string(),
|
|
28
26
|
created: isly_1.isly.fromIs("isoly.DateTime", isoly_1.isoly.DateTime.is),
|
|
@@ -35,6 +33,7 @@ var Account;
|
|
|
35
33
|
charges: Charge_1.Charge.type.optional(),
|
|
36
34
|
rules: Rule_1.Rule.type.array().optional(),
|
|
37
35
|
status: Status_1.Status.type,
|
|
36
|
+
type: Account.Type.type,
|
|
38
37
|
});
|
|
39
38
|
function isIdentifier(value) {
|
|
40
39
|
return cryptly_1.cryptly.Identifier.is(value, 8);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../Account/index.ts"],"names":[],"mappings":";;;AAAA,qCAAiC;AACjC,iCAA6B;AAC7B,+BAA2B;AAC3B,0CAAsC;AACtC,kCAA8B;AAC9B,kCAA8B;AAC9B,qCAAkD;AAClD,2CAA2D;AAC3D,uCAAqD;AACrD,uCAAqD;AACrD,qCAAkD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../Account/index.ts"],"names":[],"mappings":";;;AAAA,qCAAiC;AACjC,iCAA6B;AAC7B,+BAA2B;AAC3B,0CAAsC;AACtC,kCAA8B;AAC9B,kCAA8B;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AAK,EAAE,CAAC,CAAC,CAAA;IACvC,CAAC;IAFe,oBAAY,eAE3B,CAAA;AACF,CAAC,EAxBgB,OAAO,uBAAP,OAAO,QAwBvB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Type } from "../Account/Type";
|
|
1
2
|
import { Realm } from "../Realm";
|
|
2
3
|
import { Rule } from "../Rule";
|
|
3
4
|
import { Changeable as OrganizationChangeable } from "./Changeable";
|
|
@@ -15,6 +16,7 @@ export interface Organization {
|
|
|
15
16
|
contact?: Organization.Contact;
|
|
16
17
|
groups?: string[];
|
|
17
18
|
fx?: OrganizationFx;
|
|
19
|
+
type: Type;
|
|
18
20
|
}
|
|
19
21
|
export declare namespace Organization {
|
|
20
22
|
export import Creatable = OrganizationCreatable;
|
|
@@ -23,4 +25,5 @@ export declare namespace Organization {
|
|
|
23
25
|
export import Contact = OrganizationContact;
|
|
24
26
|
export import Fx = OrganizationFx;
|
|
25
27
|
const type: import("isly/dist/cjs/object").IslyObject<Rule.State.Organization, object>;
|
|
28
|
+
function from(creatable: Creatable, realm: Realm): Organization;
|
|
26
29
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Organization = void 0;
|
|
4
4
|
const isly_1 = require("isly");
|
|
5
|
+
const Type_1 = require("../Account/Type");
|
|
5
6
|
const Realm_1 = require("../Realm");
|
|
6
7
|
const type_1 = require("../Rule/type");
|
|
7
8
|
const Changeable_1 = require("./Changeable");
|
|
@@ -26,6 +27,11 @@ var Organization;
|
|
|
26
27
|
contact: Organization.Contact.type.optional(),
|
|
27
28
|
groups: isly_1.isly.string().array().optional(),
|
|
28
29
|
fx: Fx_1.Fx.type.optional(),
|
|
30
|
+
type: Type_1.Type.type,
|
|
29
31
|
});
|
|
32
|
+
function from(creatable, realm) {
|
|
33
|
+
return { ...creatable, realm, rules: creatable.rules ?? [], status: "active", type: "emoney" };
|
|
34
|
+
}
|
|
35
|
+
Organization.from = from;
|
|
30
36
|
})(Organization || (exports.Organization = Organization = {}));
|
|
31
37
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../Organization/index.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,oCAAgC;AAEhC,uCAA+C;AAC/C,6CAAmE;AACnE,uCAA0D;AAC1D,2CAAgE;AAChE,6BAA2C;AAC3C,iCAAiD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../Organization/index.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,0CAAsC;AACtC,oCAAgC;AAEhC,uCAA+C;AAC/C,6CAAmE;AACnE,uCAA0D;AAC1D,2CAAgE;AAChE,6BAA2C;AAC3C,iCAAiD;AAcjD,IAAiB,YAAY,CAqB5B;AArBD,WAAiB,YAAY;IACd,sBAAS,GAAG,qBAAqB,CAAA;IACjC,uBAAU,GAAG,uBAAsB,CAAA;IACnC,iBAAI,GAAG,WAAgB,CAAA;IACvB,oBAAO,GAAG,iBAAmB,CAAA;IAC7B,eAAE,GAAG,OAAc,CAAA;IACpB,iBAAI,GAAG,WAAI,CAAC,MAAM,CAAe;QAC7C,IAAI,EAAE,WAAI,CAAC,MAAM,EAAE;QACnB,IAAI,EAAE,WAAI,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAAC;QAClD,KAAK,EAAE,aAAK,CAAC,IAAI;QACjB,KAAK,EAAE,WAAQ,CAAC,KAAK,EAAE;QACvB,MAAM,EAAE,WAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QAC3C,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI;QAC5B,OAAO,EAAE,aAAA,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE;QAChC,MAAM,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QACxC,EAAE,EAAE,OAAc,CAAC,IAAI,CAAC,QAAQ,EAAE;QAClC,IAAI,EAAE,WAAI,CAAC,IAAI;KACf,CAAC,CAAA;IACF,SAAgB,IAAI,CAAC,SAAoB,EAAE,KAAY;QACtD,OAAO,EAAE,GAAG,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,IAAI,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAA;IAC/F,CAAC;IAFe,iBAAI,OAEnB,CAAA;AACF,CAAC,EArBgB,YAAY,4BAAZ,YAAY,QAqB5B"}
|
package/dist/cjs/Rule/Other.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { selectively } from "selectively";
|
|
2
1
|
import { isly } from "isly";
|
|
3
2
|
import { isly as isly2 } from "isly2";
|
|
4
3
|
import type { Note } from "../Transaction/Note";
|
|
@@ -16,7 +15,7 @@ export declare namespace Other {
|
|
|
16
15
|
}
|
|
17
16
|
const type: import("isly/dist/cjs/object").IslyObject<Other, Base>;
|
|
18
17
|
const type2: isly2.Object<Other>;
|
|
19
|
-
function evaluate(rules: Other[], state: State
|
|
18
|
+
function evaluate(rules: Other[], state: State): {
|
|
20
19
|
outcomes: Record<Other.Action, Other[]>;
|
|
21
20
|
notes: Note[];
|
|
22
21
|
flags: Set<string>;
|
package/dist/cjs/Rule/Other.js
CHANGED
|
@@ -19,7 +19,7 @@ var Other;
|
|
|
19
19
|
})(Action = Other.Action || (Other.Action = {}));
|
|
20
20
|
Other.type = Base_1.Base.type.extend({ action: Action.type });
|
|
21
21
|
Other.type2 = Base_1.Base.type2.extend({ action: Action.type2 });
|
|
22
|
-
function evaluate(rules, state
|
|
22
|
+
function evaluate(rules, state) {
|
|
23
23
|
const now = isoly_1.isoly.DateTime.now();
|
|
24
24
|
const result = {
|
|
25
25
|
outcomes: {
|
|
@@ -33,7 +33,7 @@ var Other;
|
|
|
33
33
|
if (state.transaction.stage == "initiate" &&
|
|
34
34
|
["card", "external", "internal"].some(type => type == state.transaction.type))
|
|
35
35
|
for (const rule of rules)
|
|
36
|
-
if ((0, control_1.control)(rule, state
|
|
36
|
+
if ((0, control_1.control)(rule, state)) {
|
|
37
37
|
result.outcomes[rule.action].push(rule);
|
|
38
38
|
result.notes.push({ author: "automatic", created: now, text: rule.name, rule });
|
|
39
39
|
rule.flags.forEach(f => result.flags.add(f));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Other.js","sourceRoot":"","sources":["../../../Rule/Other.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;
|
|
1
|
+
{"version":3,"file":"Other.js","sourceRoot":"","sources":["../../../Rule/Other.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,+BAA2B;AAC3B,iCAAqC;AAErC,iCAA6B;AAC7B,uCAAmC;AAMnC,IAAiB,KAAK,CAuCrB;AAvCD,WAAiB,KAAK;IAErB,IAAiB,MAAM,CAOtB;IAPD,WAAiB,MAAM;QACT,aAAM,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAU,CAAA;QAC9C,WAAI,GAAG,WAAI,CAAC,MAAM,CAAS,OAAA,MAAM,CAAC,CAAA;QAClC,YAAK,GAAG,YAAK;aACxB,MAAM,CAAS,OAAO,EAAE,GAAG,OAAA,MAAM,CAAC;aAClC,MAAM,CAAC,QAAQ,CAAC;aAChB,QAAQ,CAAC,8CAA8C,CAAC,CAAA;IAC3D,CAAC,EAPgB,MAAM,GAAN,YAAM,KAAN,YAAM,QAOtB;IACY,UAAI,GAAG,WAAI,CAAC,IAAI,CAAC,MAAM,CAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAA;IACvD,WAAK,GAAwB,WAAI,CAAC,KAAK,CAAC,MAAM,CAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAA;IAC5F,SAAgB,QAAQ,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account";
|
|
|
2
2
|
import { Rail } from "../../Rail";
|
|
3
3
|
export interface Account extends ModelAccount {
|
|
4
4
|
address: Rail.Address;
|
|
5
|
-
transactions
|
|
6
|
-
days
|
|
5
|
+
transactions?: Account.Transactions;
|
|
6
|
+
days?: Account.Days;
|
|
7
7
|
}
|
|
8
8
|
export declare namespace Account {
|
|
9
9
|
type Today = {
|
|
@@ -30,6 +30,6 @@ export declare namespace Account {
|
|
|
30
30
|
today: Today;
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
export function from(account: ModelAccount, address: Rail.Address
|
|
33
|
+
export function from(account: ModelAccount, address: Rail.Address): Account;
|
|
34
34
|
export {};
|
|
35
35
|
}
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Account = void 0;
|
|
4
4
|
var Account;
|
|
5
5
|
(function (Account) {
|
|
6
|
-
function from(account, address
|
|
7
|
-
return { ...account, address
|
|
6
|
+
function from(account, address) {
|
|
7
|
+
return { ...account, address };
|
|
8
8
|
}
|
|
9
9
|
Account.from = from;
|
|
10
10
|
})(Account || (exports.Account = Account = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Account.js","sourceRoot":"","sources":["../../../../Rule/State/Account.ts"],"names":[],"mappings":";;;AASA,IAAiB,OAAO,CAsBvB;AAtBD,WAAiB,OAAO;IAmBvB,SAAgB,IAAI,CAAC,OAAqB,EAAE,OAAqB
|
|
1
|
+
{"version":3,"file":"Account.js","sourceRoot":"","sources":["../../../../Rule/State/Account.ts"],"names":[],"mappings":";;;AASA,IAAiB,OAAO,CAsBvB;AAtBD,WAAiB,OAAO;IAmBvB,SAAgB,IAAI,CAAC,OAAqB,EAAE,OAAqB;QAChE,OAAO,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,CAAA;IAC/B,CAAC;IAFe,YAAI,OAEnB,CAAA;AACF,CAAC,EAtBgB,OAAO,uBAAP,OAAO,QAsBvB"}
|
|
@@ -35,9 +35,9 @@ export declare namespace State {
|
|
|
35
35
|
flags: string[];
|
|
36
36
|
notes: ModelTransaction.Note[];
|
|
37
37
|
}
|
|
38
|
-
function from(account: ModelAccount, address: Rail.Address,
|
|
38
|
+
function from(account: ModelAccount, address: Rail.Address, transaction: ModelTransaction.Creatable.Resolved | ModelTransaction, kind: Rule.Base.Kind, stage: "finalize" | "initiate", card?: Card, organization?: Organization): State;
|
|
39
39
|
const type: Record<ModelTransaction.PreTransaction["type"], Rule.Base.Kind>;
|
|
40
|
-
function fromPreTransaction(account: ModelAccount, address: Rail.Address,
|
|
40
|
+
function fromPreTransaction(account: ModelAccount, address: Rail.Address, transaction: ModelTransaction.PreTransaction, card?: ModelCard & {
|
|
41
41
|
statistics: Card.Statistics;
|
|
42
42
|
}, organization?: Organization): State;
|
|
43
43
|
}
|
|
@@ -21,9 +21,9 @@ var State;
|
|
|
21
21
|
Outcome.values = ["approve", "reject", "review"];
|
|
22
22
|
Outcome.type = isly_1.isly.string(Outcome.values);
|
|
23
23
|
})(Outcome = State.Outcome || (State.Outcome = {}));
|
|
24
|
-
function from(account, address,
|
|
24
|
+
function from(account, address, transaction, kind, stage, card, organization) {
|
|
25
25
|
return {
|
|
26
|
-
account: State.Account.from(account, address
|
|
26
|
+
account: State.Account.from(account, address),
|
|
27
27
|
transaction: State.Transaction.from(account, transaction, kind, stage),
|
|
28
28
|
authorization: State.Authorization.from(transaction),
|
|
29
29
|
card,
|
|
@@ -36,9 +36,9 @@ var State;
|
|
|
36
36
|
incoming: "inbound",
|
|
37
37
|
outgoing: "outbound",
|
|
38
38
|
};
|
|
39
|
-
function fromPreTransaction(account, address,
|
|
39
|
+
function fromPreTransaction(account, address, transaction, card, organization) {
|
|
40
40
|
return {
|
|
41
|
-
account: State.Account.from(account, address
|
|
41
|
+
account: State.Account.from(account, address),
|
|
42
42
|
transaction: State.Transaction.from(account, transaction, State.type[transaction.type], "initiate"),
|
|
43
43
|
card: card ? State.Card.from(card, card.statistics) : undefined,
|
|
44
44
|
organization,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Rule/State/index.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAM3B,uCAAmD;AACnD,mDAAqE;AACrE,iCAA0C;AAC1C,iDAAkE;AAClE,uCAAmD;AACnD,+CAA+D;AAS/D,IAAiB,KAAK,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Rule/State/index.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAM3B,uCAAmD;AACnD,mDAAqE;AACrE,iCAA0C;AAC1C,iDAAkE;AAClE,uCAAmD;AACnD,+CAA+D;AAS/D,IAAiB,KAAK,CAsDrB;AAtDD,WAAiB,KAAK;IACP,aAAO,GAAG,iBAAY,CAAA;IACtB,mBAAa,GAAG,6BAAkB,CAAA;IAClC,UAAI,GAAG,WAAS,CAAA;IAChB,aAAO,GAAG,iBAAY,CAAA;IACtB,iBAAW,GAAG,yBAAgB,CAAA;IAC9B,kBAAY,GAAG,2BAAiB,CAAA;IAE9C,IAAiB,OAAO,CAGvB;IAHD,WAAiB,OAAO;QACV,cAAM,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAU,CAAA;QACjD,YAAI,GAAG,WAAI,CAAC,MAAM,CAAU,QAAA,MAAM,CAAC,CAAA;IACjD,CAAC,EAHgB,OAAO,GAAP,aAAO,KAAP,aAAO,QAGvB;IAOD,SAAgB,IAAI,CACnB,OAAqB,EACrB,OAAqB,EACrB,WAAmE,EACnE,IAAoB,EACpB,KAA8B,EAC9B,IAAW,EACX,YAA2B;QAE3B,OAAO;YACN,OAAO,EAAE,MAAA,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC;YACvC,WAAW,EAAE,MAAA,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,KAAK,CAAC;YAChE,aAAa,EAAE,MAAA,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC;YAC9C,IAAI;YACJ,YAAY;SACZ,CAAA;IACF,CAAC;IAhBe,UAAI,OAgBnB,CAAA;IACY,UAAI,GAAoE;QACpF,aAAa,EAAE,eAAe;QAC9B,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,UAAU;KACpB,CAAA;IACD,SAAgB,kBAAkB,CACjC,OAAqB,EACrB,OAAqB,EACrB,WAA4C,EAC5C,IAAkD,EAClD,YAA2B;QAE3B,OAAO;YACN,OAAO,EAAE,MAAA,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC;YACvC,WAAW,EAAE,MAAA,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,MAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC;YACvF,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS;YACzD,YAAY;SACZ,CAAA;IACF,CAAC;IAbe,wBAAkB,qBAajC,CAAA;AACF,CAAC,EAtDgB,KAAK,qBAAL,KAAK,QAsDrB"}
|
package/dist/cjs/Rule/control.js
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.control = control;
|
|
4
4
|
const selectively_1 = require("selectively");
|
|
5
|
-
const definitions_1 = require("./definitions");
|
|
6
5
|
function control(rule, state, macros) {
|
|
7
|
-
return selectively_1.selectively.
|
|
6
|
+
return selectively_1.selectively.parse(rule.condition).is(state);
|
|
8
7
|
}
|
|
9
8
|
//# sourceMappingURL=control.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control.js","sourceRoot":"","sources":["../../../Rule/control.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"control.js","sourceRoot":"","sources":["../../../Rule/control.ts"],"names":[],"mappings":";;AAIA,0BAEC;AAND,6CAAyC;AAIzC,SAAgB,OAAO,CAAC,IAAU,EAAE,KAAY,EAAE,MAA+C;IAChG,OAAO,yBAAW,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAA;AACnD,CAAC"}
|
package/dist/cjs/Rule/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { selectively } from "selectively";
|
|
2
1
|
import { isly } from "isly";
|
|
3
|
-
import { Exchange } from "../Exchange";
|
|
4
2
|
import { Base as RuleBase } from "./Base";
|
|
5
3
|
import { control as ruleControl } from "./control";
|
|
6
4
|
import { Other as RuleOther } from "./Other";
|
|
@@ -19,7 +17,7 @@ export declare namespace Rule {
|
|
|
19
17
|
const type: isly.Type<"reject" | "review" | "flag">;
|
|
20
18
|
}
|
|
21
19
|
const type: import("isly/dist/cjs/object").IslyObject<Other, Base>;
|
|
22
|
-
function evaluate(rules: Rule[], state: RuleState
|
|
20
|
+
function evaluate(rules: Rule[], state: RuleState): RuleState.Evaluated;
|
|
23
21
|
function isLegacy(rule: Rule): boolean;
|
|
24
22
|
function fromLegacy(rule: Rule): Rule;
|
|
25
23
|
}
|
package/dist/cjs/Rule/index.js
CHANGED
|
@@ -21,14 +21,14 @@ var Rule;
|
|
|
21
21
|
Action.type = isly_1.isly.string(Action.values);
|
|
22
22
|
})(Action = Rule.Action || (Rule.Action = {}));
|
|
23
23
|
Rule.type = type_1.type;
|
|
24
|
-
function evaluate(rules, state
|
|
24
|
+
function evaluate(rules, state) {
|
|
25
25
|
const outcomes = {
|
|
26
26
|
review: [],
|
|
27
27
|
reject: [],
|
|
28
28
|
flag: [],
|
|
29
29
|
};
|
|
30
30
|
const notes = [];
|
|
31
|
-
const evaluated = Rule.Other.evaluate(rules.filter(rule => Rule.Base.Kind.is(state.transaction.kind, rule, state.organization?.groups, state.card?.preset)), state
|
|
31
|
+
const evaluated = Rule.Other.evaluate(rules.filter(rule => Rule.Base.Kind.is(state.transaction.kind, rule, state.organization?.groups, state.card?.preset)), state);
|
|
32
32
|
notes.push(...evaluated.notes);
|
|
33
33
|
outcomes.flag.push(...evaluated.outcomes.flag);
|
|
34
34
|
outcomes.review.push(...evaluated.outcomes.review);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../Rule/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../Rule/index.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAE3B,iCAAyC;AACzC,uCAAkD;AAClD,mCAA4C;AAC5C,mCAA4C;AAC5C,iCAAyC;AAGzC,IAAiB,IAAI,CAsCpB;AAtCD,WAAiB,IAAI;IACN,UAAK,GAAG,aAAS,CAAA;IACjB,UAAK,GAAG,aAAS,CAAA;IACjB,SAAI,GAAG,WAAQ,CAAA;IACf,SAAI,GAAG,KAAA,IAAI,CAAC,IAAI,CAAA;IAChB,aAAQ,GAAG,KAAA,IAAI,CAAC,QAAQ,CAAA;IACzB,YAAO,GAAG,iBAAW,CAAA;IAGlC,IAAiB,MAAM,CAGtB;IAHD,WAAiB,MAAM;QACT,aAAM,GAAG,CAAC,GAAG,KAAA,KAAK,CAAC,MAAM,CAAC,MAAM,CAAU,CAAA;QAC1C,WAAI,GAAG,WAAI,CAAC,MAAM,CAAS,OAAA,MAAM,CAAC,CAAA;IAChD,CAAC,EAHgB,MAAM,GAAN,WAAM,KAAN,WAAM,QAGtB;IACY,SAAI,GAAG,WAAQ,CAAA;IAC5B,SAAgB,QAAQ,CAAC,KAAa,EAAE,KAAgB;QACvD,MAAM,QAAQ,GAAgC;YAC7C,MAAM,EAAE,EAAE;YACV,MAAM,EAAE,EAAE;YACV,IAAI,EAAE,EAAE;SACR,CAAA;QACD,MAAM,KAAK,GAAW,EAAE,CAAA;QACxB,MAAM,SAAS,GAAG,KAAA,KAAK,CA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AC,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,IAAI,CAAA;IACjE,CAAC;IAFe,eAAU,aAEzB,CAAA;AACF,CAAC,EAtCgB,IAAI,oBAAJ,IAAI,QAsCpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Creatable.js","sourceRoot":"","sources":["../../../Account/Creatable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"Creatable.js","sourceRoot":"","sources":["../../../Account/Creatable.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAM3B,MAAM,KAAW,SAAS,CAWzB;AAXD,WAAiB,SAAS;IAEzB,IAAiB,QAAQ,CAOxB;IAPD,WAAiB,QAAQ;QACX,eAAM,GAAG,CAAC,oBAAoB,EAAE,aAAa,CAAU,CAAA;QACpE,SAAgB,YAAY,CAAC,KAAe;YAC3C,OAAO,KAAK,IAAI,oBAAoB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAA;QACvD,CAAC;QAFe,qBAAY,eAE3B,CAAA;QAEY,aAAI,GAAG,IAAI,CAAC,MAAM,CAAC,SAAA,MAAM,CAAC,CAAA;IACxC,CAAC,EAPgB,QAAQ,GAAR,kBAAQ,KAAR,kBAAQ,QAOxB;IACY,cAAI,GAAG,IAAI,CAAC,MAAM,CAAY,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;AACxG,CAAC,EAXgB,SAAS,KAAT,SAAS,QAWzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Type.js","sourceRoot":"","sources":["../../../Account/Type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAG3B,MAAM,KAAW,IAAI,CAGpB;AAHD,WAAiB,IAAI;IACP,WAAM,GAAG,CAAC,WAAW,EAAE,QAAQ,CAAU,CAAA;IACzC,SAAI,GAAG,IAAI,CAAC,MAAM,CAAO,KAAA,MAAM,CAAC,CAAA;AAC9C,CAAC,EAHgB,IAAI,KAAJ,IAAI,QAGpB"}
|
|
@@ -8,6 +8,7 @@ import { Creatable as AccountCreatable } from "./Creatable";
|
|
|
8
8
|
import { Details as AccountDetails } from "./Details";
|
|
9
9
|
import { History as AccountHistory } from "./History";
|
|
10
10
|
import { Status as AccountStatus } from "./Status";
|
|
11
|
+
import { Type as AccountType } from "./Type";
|
|
11
12
|
export interface Account extends Account.Creatable {
|
|
12
13
|
id: cryptly.Identifier;
|
|
13
14
|
created: isoly.DateTime;
|
|
@@ -20,6 +21,7 @@ export interface Account extends Account.Creatable {
|
|
|
20
21
|
charges?: AccountCharge;
|
|
21
22
|
rules?: Rule[];
|
|
22
23
|
status: Account.Status;
|
|
24
|
+
type: Account.Type;
|
|
23
25
|
}
|
|
24
26
|
export declare namespace Account {
|
|
25
27
|
export import Charge = AccountCharge;
|
|
@@ -27,8 +29,7 @@ export declare namespace Account {
|
|
|
27
29
|
export import Status = AccountStatus;
|
|
28
30
|
export import History = AccountHistory;
|
|
29
31
|
export import Details = AccountDetails;
|
|
30
|
-
|
|
31
|
-
function fromLegacy(maybeLegacy: Legacy | Account, status?: Account.Status): Account;
|
|
32
|
+
export import Type = AccountType;
|
|
32
33
|
const type: import("isly/dist/cjs/object").IslyObject<Account, Creatable>;
|
|
33
34
|
function isIdentifier(value: cryptly.Identifier | any): value is cryptly.Identifier;
|
|
34
35
|
}
|
|
@@ -9,6 +9,7 @@ import { Creatable as AccountCreatable } from "./Creatable";
|
|
|
9
9
|
import { Details as AccountDetails } from "./Details";
|
|
10
10
|
import { History as AccountHistory } from "./History";
|
|
11
11
|
import { Status as AccountStatus } from "./Status";
|
|
12
|
+
import { Type as AccountType } from "./Type";
|
|
12
13
|
export var Account;
|
|
13
14
|
(function (Account) {
|
|
14
15
|
Account.Charge = AccountCharge;
|
|
@@ -16,10 +17,7 @@ export var Account;
|
|
|
16
17
|
Account.Status = AccountStatus;
|
|
17
18
|
Account.History = AccountHistory;
|
|
18
19
|
Account.Details = AccountDetails;
|
|
19
|
-
|
|
20
|
-
return { ...maybeLegacy, status: status ?? ("status" in maybeLegacy ? maybeLegacy.status : { mode: "active" }) };
|
|
21
|
-
}
|
|
22
|
-
Account.fromLegacy = fromLegacy;
|
|
20
|
+
Account.Type = AccountType;
|
|
23
21
|
Account.type = Account.Creatable.type.extend({
|
|
24
22
|
id: isly.string(),
|
|
25
23
|
created: isly.fromIs("isoly.DateTime", isoly.DateTime.is),
|
|
@@ -32,6 +30,7 @@ export var Account;
|
|
|
32
30
|
charges: AccountCharge.type.optional(),
|
|
33
31
|
rules: Rule.type.array().optional(),
|
|
34
32
|
status: AccountStatus.type,
|
|
33
|
+
type: Account.Type.type,
|
|
35
34
|
});
|
|
36
35
|
function isIdentifier(value) {
|
|
37
36
|
return cryptly.Identifier.is(value, 8);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../Account/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,UAAU,CAAA;AAClD,OAAO,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC3D,OA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AC,MAAM,EAAE;QACjB,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzD,YAAY,EAAE,IAAI,CAAC,MAAM,EAAE;QAC3B,QAAQ,EAAE,QAAQ,CAAC,IAAI;QACvB,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE;QAChC,OAAO,EAAE,QAAA,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE;QAChC,YAAY,EAAE,IAAI,CAAC,MAAM,CAA+B,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;QACpG,GAAG,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC7B,OAAO,EAAE,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE;QACtC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QACnC,MAAM,EAAE,aAAa,CAAC,IAAI;QAC1B,IAAI,EAAE,QAAA,IAAI,CAAC,IAAI;KACf,CAAC,CAAA;IACF,SAAgB,YAAY,CAAC,KAA+B;QAC3D,OAAO,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;IACvC,CAAC;IAFe,oBAAY,eAE3B,CAAA;AACF,CAAC,EAxBgB,OAAO,KAAP,OAAO,QAwBvB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Type } from "../Account/Type";
|
|
1
2
|
import { Realm } from "../Realm";
|
|
2
3
|
import { Rule } from "../Rule";
|
|
3
4
|
import { Changeable as OrganizationChangeable } from "./Changeable";
|
|
@@ -15,6 +16,7 @@ export interface Organization {
|
|
|
15
16
|
contact?: Organization.Contact;
|
|
16
17
|
groups?: string[];
|
|
17
18
|
fx?: OrganizationFx;
|
|
19
|
+
type: Type;
|
|
18
20
|
}
|
|
19
21
|
export declare namespace Organization {
|
|
20
22
|
export import Creatable = OrganizationCreatable;
|
|
@@ -23,4 +25,5 @@ export declare namespace Organization {
|
|
|
23
25
|
export import Contact = OrganizationContact;
|
|
24
26
|
export import Fx = OrganizationFx;
|
|
25
27
|
const type: import("isly/dist/cjs/object").IslyObject<Rule.State.Organization, object>;
|
|
28
|
+
function from(creatable: Creatable, realm: Realm): Organization;
|
|
26
29
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isly } from "isly";
|
|
2
|
+
import { Type } from "../Account/Type";
|
|
2
3
|
import { Realm } from "../Realm";
|
|
3
4
|
import { type as ruleType } from "../Rule/type";
|
|
4
5
|
import { Changeable as OrganizationChangeable } from "./Changeable";
|
|
@@ -23,6 +24,11 @@ export var Organization;
|
|
|
23
24
|
contact: Organization.Contact.type.optional(),
|
|
24
25
|
groups: isly.string().array().optional(),
|
|
25
26
|
fx: OrganizationFx.type.optional(),
|
|
27
|
+
type: Type.type,
|
|
26
28
|
});
|
|
29
|
+
function from(creatable, realm) {
|
|
30
|
+
return { ...creatable, realm, rules: creatable.rules ?? [], status: "active", type: "emoney" };
|
|
31
|
+
}
|
|
32
|
+
Organization.from = from;
|
|
27
33
|
})(Organization || (Organization = {}));
|
|
28
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../Organization/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAEhC,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,UAAU,IAAI,sBAAsB,EAAE,MAAM,cAAc,CAAA;AACnE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,WAAW,CAAA;AAC1D,OAAO,EAAE,SAAS,IAAI,q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,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QAC3C,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI;QAC5B,OAAO,EAAE,aAAA,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE;QAChC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QACxC,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE;QAClC,IAAI,EAAE,IAAI,CAAC,IAAI;KACf,CAAC,CAAA;IACF,SAAgB,IAAI,CAAC,SAAoB,EAAE,KAAY;QACtD,OAAO,EAAE,GAAG,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,IAAI,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAA;IAC/F,CAAC;IAFe,iBAAI,OAEnB,CAAA;AACF,CAAC,EArBgB,YAAY,KAAZ,YAAY,QAqB5B"}
|
package/dist/mjs/Rule/Other.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { selectively } from "selectively";
|
|
2
1
|
import { isly } from "isly";
|
|
3
2
|
import { isly as isly2 } from "isly2";
|
|
4
3
|
import type { Note } from "../Transaction/Note";
|
|
@@ -16,7 +15,7 @@ export declare namespace Other {
|
|
|
16
15
|
}
|
|
17
16
|
const type: import("isly/dist/cjs/object").IslyObject<Other, Base>;
|
|
18
17
|
const type2: isly2.Object<Other>;
|
|
19
|
-
function evaluate(rules: Other[], state: State
|
|
18
|
+
function evaluate(rules: Other[], state: State): {
|
|
20
19
|
outcomes: Record<Other.Action, Other[]>;
|
|
21
20
|
notes: Note[];
|
|
22
21
|
flags: Set<string>;
|
package/dist/mjs/Rule/Other.js
CHANGED
|
@@ -16,7 +16,7 @@ export var Other;
|
|
|
16
16
|
})(Action = Other.Action || (Other.Action = {}));
|
|
17
17
|
Other.type = Base.type.extend({ action: Action.type });
|
|
18
18
|
Other.type2 = Base.type2.extend({ action: Action.type2 });
|
|
19
|
-
function evaluate(rules, state
|
|
19
|
+
function evaluate(rules, state) {
|
|
20
20
|
const now = isoly.DateTime.now();
|
|
21
21
|
const result = {
|
|
22
22
|
outcomes: {
|
|
@@ -30,7 +30,7 @@ export var Other;
|
|
|
30
30
|
if (state.transaction.stage == "initiate" &&
|
|
31
31
|
["card", "external", "internal"].some(type => type == state.transaction.type))
|
|
32
32
|
for (const rule of rules)
|
|
33
|
-
if (control(rule, state
|
|
33
|
+
if (control(rule, state)) {
|
|
34
34
|
result.outcomes[rule.action].push(rule);
|
|
35
35
|
result.notes.push({ author: "automatic", created: now, text: rule.name, rule });
|
|
36
36
|
rule.flags.forEach(f => result.flags.add(f));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Other.js","sourceRoot":"","sources":["../../../Rule/Other.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Other.js","sourceRoot":"","sources":["../../../Rule/Other.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,IAAI,IAAI,KAAK,EAAE,MAAM,OAAO,CAAA;AAErC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAMnC,MAAM,KAAW,KAAK,CAuCrB;AAvCD,WAAiB,KAAK;IAErB,IAAiB,MAAM,CAOtB;IAPD,WAAiB,MAAM;QACT,aAAM,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAU,CAAA;QAC9C,WAAI,GAAG,IAAI,CAAC,MAAM,CAAS,OAAA,MAAM,CAAC,CAAA;QAClC,YAAK,GAAG,KAAK;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AE,CAAC,CAAA;oBAC/E,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;oBAC5C,IAAI,CAAC,MAAM,IAAI,QAAQ,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;gBACtD,CAAC;QACH,OAAO,MAAM,CAAA;IACd,CAAC;IA1Be,cAAQ,WA0BvB,CAAA;AACF,CAAC,EAvCgB,KAAK,KAAL,KAAK,QAuCrB"}
|
|
@@ -2,8 +2,8 @@ import type { Account as ModelAccount } from "../../Account";
|
|
|
2
2
|
import { Rail } from "../../Rail";
|
|
3
3
|
export interface Account extends ModelAccount {
|
|
4
4
|
address: Rail.Address;
|
|
5
|
-
transactions
|
|
6
|
-
days
|
|
5
|
+
transactions?: Account.Transactions;
|
|
6
|
+
days?: Account.Days;
|
|
7
7
|
}
|
|
8
8
|
export declare namespace Account {
|
|
9
9
|
type Today = {
|
|
@@ -30,6 +30,6 @@ export declare namespace Account {
|
|
|
30
30
|
today: Today;
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
export function from(account: ModelAccount, address: Rail.Address
|
|
33
|
+
export function from(account: ModelAccount, address: Rail.Address): Account;
|
|
34
34
|
export {};
|
|
35
35
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export var Account;
|
|
2
2
|
(function (Account) {
|
|
3
|
-
function from(account, address
|
|
4
|
-
return { ...account, address
|
|
3
|
+
function from(account, address) {
|
|
4
|
+
return { ...account, address };
|
|
5
5
|
}
|
|
6
6
|
Account.from = from;
|
|
7
7
|
})(Account || (Account = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Account.js","sourceRoot":"","sources":["../../../../Rule/State/Account.ts"],"names":[],"mappings":"AASA,MAAM,KAAW,OAAO,CAsBvB;AAtBD,WAAiB,OAAO;IAmBvB,SAAgB,IAAI,CAAC,OAAqB,EAAE,OAAqB
|
|
1
|
+
{"version":3,"file":"Account.js","sourceRoot":"","sources":["../../../../Rule/State/Account.ts"],"names":[],"mappings":"AASA,MAAM,KAAW,OAAO,CAsBvB;AAtBD,WAAiB,OAAO;IAmBvB,SAAgB,IAAI,CAAC,OAAqB,EAAE,OAAqB;QAChE,OAAO,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,CAAA;IAC/B,CAAC;IAFe,YAAI,OAEnB,CAAA;AACF,CAAC,EAtBgB,OAAO,KAAP,OAAO,QAsBvB"}
|
|
@@ -35,9 +35,9 @@ export declare namespace State {
|
|
|
35
35
|
flags: string[];
|
|
36
36
|
notes: ModelTransaction.Note[];
|
|
37
37
|
}
|
|
38
|
-
function from(account: ModelAccount, address: Rail.Address,
|
|
38
|
+
function from(account: ModelAccount, address: Rail.Address, transaction: ModelTransaction.Creatable.Resolved | ModelTransaction, kind: Rule.Base.Kind, stage: "finalize" | "initiate", card?: Card, organization?: Organization): State;
|
|
39
39
|
const type: Record<ModelTransaction.PreTransaction["type"], Rule.Base.Kind>;
|
|
40
|
-
function fromPreTransaction(account: ModelAccount, address: Rail.Address,
|
|
40
|
+
function fromPreTransaction(account: ModelAccount, address: Rail.Address, transaction: ModelTransaction.PreTransaction, card?: ModelCard & {
|
|
41
41
|
statistics: Card.Statistics;
|
|
42
42
|
}, organization?: Organization): State;
|
|
43
43
|
}
|
|
@@ -18,9 +18,9 @@ export var State;
|
|
|
18
18
|
Outcome.values = ["approve", "reject", "review"];
|
|
19
19
|
Outcome.type = isly.string(Outcome.values);
|
|
20
20
|
})(Outcome = State.Outcome || (State.Outcome = {}));
|
|
21
|
-
function from(account, address,
|
|
21
|
+
function from(account, address, transaction, kind, stage, card, organization) {
|
|
22
22
|
return {
|
|
23
|
-
account: State.Account.from(account, address
|
|
23
|
+
account: State.Account.from(account, address),
|
|
24
24
|
transaction: State.Transaction.from(account, transaction, kind, stage),
|
|
25
25
|
authorization: State.Authorization.from(transaction),
|
|
26
26
|
card,
|
|
@@ -33,9 +33,9 @@ export var State;
|
|
|
33
33
|
incoming: "inbound",
|
|
34
34
|
outgoing: "outbound",
|
|
35
35
|
};
|
|
36
|
-
function fromPreTransaction(account, address,
|
|
36
|
+
function fromPreTransaction(account, address, transaction, card, organization) {
|
|
37
37
|
return {
|
|
38
|
-
account: State.Account.from(account, address
|
|
38
|
+
account: State.Account.from(account, address),
|
|
39
39
|
transaction: State.Transaction.from(account, transaction, State.type[transaction.type], "initiate"),
|
|
40
40
|
card: card ? State.Card.from(card, card.statistics) : undefined,
|
|
41
41
|
organization,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Rule/State/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAM3B,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EAAE,aAAa,IAAI,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACrE,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,QAAQ,CAAA;AAC1C,OAAO,EAAE,YAAY,IAAI,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAClE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EAAE,WAAW,IAAI,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAS/D,MAAM,KAAW,KAAK,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Rule/State/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAM3B,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EAAE,aAAa,IAAI,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACrE,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,QA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kB,CACjC,OAAqB,EACrB,OAAqB,EACrB,WAA4C,EAC5C,IAAkD,EAClD,YAA2B;QAE3B,OAAO;YACN,OAAO,EAAE,MAAA,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC;YACvC,WAAW,EAAE,MAAA,WAAW,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,MAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC;YACvF,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS;YACzD,YAAY;SACZ,CAAA;IACF,CAAC;IAbe,wBAAkB,qBAajC,CAAA;AACF,CAAC,EAtDgB,KAAK,KAAL,KAAK,QAsDrB"}
|
package/dist/mjs/Rule/control.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { selectively } from "selectively";
|
|
2
|
-
import { definitions } from "./definitions";
|
|
3
2
|
export function control(rule, state, macros) {
|
|
4
|
-
return selectively.
|
|
3
|
+
return selectively.parse(rule.condition).is(state);
|
|
5
4
|
}
|
|
6
5
|
//# sourceMappingURL=control.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control.js","sourceRoot":"","sources":["../../../Rule/control.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"control.js","sourceRoot":"","sources":["../../../Rule/control.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAIzC,MAAM,UAAU,OAAO,CAAC,IAAU,EAAE,KAAY,EAAE,MAA+C;IAChG,OAAO,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAA;AACnD,CAAC"}
|
package/dist/mjs/Rule/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { selectively } from "selectively";
|
|
2
1
|
import { isly } from "isly";
|
|
3
|
-
import { Exchange } from "../Exchange";
|
|
4
2
|
import { Base as RuleBase } from "./Base";
|
|
5
3
|
import { control as ruleControl } from "./control";
|
|
6
4
|
import { Other as RuleOther } from "./Other";
|
|
@@ -19,7 +17,7 @@ export declare namespace Rule {
|
|
|
19
17
|
const type: isly.Type<"reject" | "review" | "flag">;
|
|
20
18
|
}
|
|
21
19
|
const type: import("isly/dist/cjs/object").IslyObject<Other, Base>;
|
|
22
|
-
function evaluate(rules: Rule[], state: RuleState
|
|
20
|
+
function evaluate(rules: Rule[], state: RuleState): RuleState.Evaluated;
|
|
23
21
|
function isLegacy(rule: Rule): boolean;
|
|
24
22
|
function fromLegacy(rule: Rule): Rule;
|
|
25
23
|
}
|
package/dist/mjs/Rule/index.js
CHANGED
|
@@ -18,14 +18,14 @@ export var Rule;
|
|
|
18
18
|
Action.type = isly.string(Action.values);
|
|
19
19
|
})(Action = Rule.Action || (Rule.Action = {}));
|
|
20
20
|
Rule.type = ruleType;
|
|
21
|
-
function evaluate(rules, state
|
|
21
|
+
function evaluate(rules, state) {
|
|
22
22
|
const outcomes = {
|
|
23
23
|
review: [],
|
|
24
24
|
reject: [],
|
|
25
25
|
flag: [],
|
|
26
26
|
};
|
|
27
27
|
const notes = [];
|
|
28
|
-
const evaluated = Rule.Other.evaluate(rules.filter(rule => Rule.Base.Kind.is(state.transaction.kind, rule, state.organization?.groups, state.card?.preset)), state
|
|
28
|
+
const evaluated = Rule.Other.evaluate(rules.filter(rule => Rule.Base.Kind.is(state.transaction.kind, rule, state.organization?.groups, state.card?.preset)), state);
|
|
29
29
|
notes.push(...evaluated.notes);
|
|
30
30
|
outcomes.flag.push(...evaluated.outcomes.flag);
|
|
31
31
|
outcomes.review.push(...evaluated.outcomes.review);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRo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,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,IAAI,CAAA;IACjE,CAAC;IAFe,eAAU,aAEzB,CAAA;AACF,CAAC,EAtCgB,IAAI,KAAJ,IAAI,QAsCpB"}
|
package/package.json
CHANGED
package/Rule/definitions.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.definitions = void 0;
|
|
4
|
-
exports.definitions = {
|
|
5
|
-
isInternal: { arguments: [], definition: "transaction.counterpart.type:internal" },
|
|
6
|
-
alwaysTrue: { arguments: [], definition: "a:0|!a:0" },
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=definitions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../../Rule/definitions.ts"],"names":[],"mappings":";;;AAEa,QAAA,WAAW,GAA2C;IAClE,UAAU,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,UAAU,EAAE,uCAAuC,EAAE;IAClF,UAAU,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE;CACrD,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../../Rule/definitions.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAA2C;IAClE,UAAU,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,UAAU,EAAE,uCAAuC,EAAE;IAClF,UAAU,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE;CACrD,CAAA"}
|