@pax2pay/model-banking 0.1.96 → 0.1.97
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/Organization/Contact/index.ts +0 -1
- package/Rule/State/Account.ts +7 -1
- package/Rule/State/Authorization.ts +7 -1
- package/Rule/State/Card.ts +7 -1
- package/Rule/State/Transaction.ts +7 -1
- package/Rule/State/index.ts +36 -8
- package/Rule/index.ts +8 -0
- package/dist/Organization/Contact/index.js.map +1 -1
- package/dist/Rule/State/Account.d.ts +4 -1
- package/dist/Rule/State/Account.js +7 -1
- package/dist/Rule/State/Account.js.map +1 -1
- package/dist/Rule/State/Authorization.d.ts +4 -1
- package/dist/Rule/State/Authorization.js +7 -1
- package/dist/Rule/State/Authorization.js.map +1 -1
- package/dist/Rule/State/Card.d.ts +4 -1
- package/dist/Rule/State/Card.js +7 -1
- package/dist/Rule/State/Card.js.map +1 -1
- package/dist/Rule/State/Transaction.d.ts +4 -1
- package/dist/Rule/State/Transaction.js +7 -1
- package/dist/Rule/State/Transaction.js.map +1 -1
- package/dist/Rule/State/index.d.ts +23 -8
- package/dist/Rule/State/index.js +20 -1
- package/dist/Rule/State/index.js.map +1 -1
- package/dist/Rule/index.d.ts +7 -0
- package/dist/Rule/index.js +2 -0
- package/dist/Rule/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -20,7 +20,6 @@ export namespace Contact {
|
|
|
20
20
|
export const Addresses = ContactAddresses
|
|
21
21
|
export type Addresses = ContactAddresses
|
|
22
22
|
export const Address = ContactAddress
|
|
23
|
-
|
|
24
23
|
export type Address = ContactAddress
|
|
25
24
|
export const type = isly.object<Contact>({
|
|
26
25
|
address: Addresses.type,
|
package/Rule/State/Account.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
import { Account as ModelAccount } from "../../Account"
|
|
1
|
+
import type { Account as ModelAccount } from "../../Account"
|
|
2
2
|
|
|
3
3
|
export type Account = ModelAccount
|
|
4
|
+
|
|
5
|
+
export namespace Account {
|
|
6
|
+
export function from(account: ModelAccount): Account {
|
|
7
|
+
return account
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
import { Authorization as ModelAuthorization } from "../../Authorization"
|
|
1
|
+
import type { Authorization as ModelAuthorization } from "../../Authorization"
|
|
2
2
|
|
|
3
3
|
export type Authorization = ModelAuthorization
|
|
4
|
+
|
|
5
|
+
export namespace Authorization {
|
|
6
|
+
export function from(authorization: ModelAuthorization): Authorization {
|
|
7
|
+
return authorization
|
|
8
|
+
}
|
|
9
|
+
}
|
package/Rule/State/Card.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
import { Transaction as ModelTransaction } from "../../Transaction"
|
|
1
|
+
import type { Transaction as ModelTransaction } from "../../Transaction"
|
|
2
2
|
|
|
3
3
|
export type Transaction = ModelTransaction
|
|
4
|
+
|
|
5
|
+
export namespace Transaction {
|
|
6
|
+
export function from(transaction: ModelTransaction): Transaction {
|
|
7
|
+
return transaction
|
|
8
|
+
}
|
|
9
|
+
}
|
package/Rule/State/index.ts
CHANGED
|
@@ -1,11 +1,39 @@
|
|
|
1
|
-
import { Account } from "
|
|
2
|
-
import { Authorization } from "
|
|
3
|
-
import { Card } from "
|
|
4
|
-
import { Transaction } from "
|
|
1
|
+
import { Account as ModelAccount } from "../../Account"
|
|
2
|
+
import { Authorization as ModelAuthorization } from "../../Authorization"
|
|
3
|
+
import { Card as ModelCard } from "../../Card"
|
|
4
|
+
import { Transaction as ModelTransaction } from "../../Transaction"
|
|
5
|
+
import { Account as StateAccount } from "./Account"
|
|
6
|
+
import { Authorization as StateAuthorization } from "./Authorization"
|
|
7
|
+
import { Card as StateCard } from "./Card"
|
|
8
|
+
import { Transaction as StateTransaction } from "./Transaction"
|
|
5
9
|
|
|
6
10
|
export interface State {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
account: StateAccount
|
|
12
|
+
authorization?: StateAuthorization
|
|
13
|
+
card?: StateCard
|
|
14
|
+
transaction: StateTransaction
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export namespace State {
|
|
18
|
+
export function from(
|
|
19
|
+
account: ModelAccount,
|
|
20
|
+
transaction: ModelTransaction,
|
|
21
|
+
authorization?: ModelAuthorization,
|
|
22
|
+
card?: ModelCard
|
|
23
|
+
): State {
|
|
24
|
+
return {
|
|
25
|
+
account: Account.from(account),
|
|
26
|
+
authorization: authorization && Authorization.from(authorization),
|
|
27
|
+
card: card && Card.from(card),
|
|
28
|
+
transaction: Transaction.from(transaction),
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export type Account = StateAccount
|
|
32
|
+
export const Account = StateAccount
|
|
33
|
+
export type Authorization = StateAuthorization
|
|
34
|
+
export const Authorization = StateAuthorization
|
|
35
|
+
export type Card = StateCard
|
|
36
|
+
export const Card = StateCard
|
|
37
|
+
export type Transaction = StateTransaction
|
|
38
|
+
export const Transaction = StateTransaction
|
|
11
39
|
}
|
package/Rule/index.ts
CHANGED
|
@@ -18,6 +18,14 @@ export namespace Rule {
|
|
|
18
18
|
export const kinds = ["authorization", "outbound", "inbound"] as const
|
|
19
19
|
export type Kind = typeof kinds[number]
|
|
20
20
|
export type State = RuleState
|
|
21
|
+
export const State = RuleState
|
|
22
|
+
export namespace State {
|
|
23
|
+
export type Account = RuleState.Account
|
|
24
|
+
export type Authorization = RuleState.Authorization
|
|
25
|
+
export type Card = RuleState.Card
|
|
26
|
+
export type Transaction = RuleState.Transaction
|
|
27
|
+
}
|
|
28
|
+
|
|
21
29
|
export const type = isly.object<Rule>({
|
|
22
30
|
name: isly.string(),
|
|
23
31
|
description: isly.string(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Organization/Contact/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,WAAW,CAAA;AACrD,OAAO,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAe3D,MAAM,KAAW,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Organization/Contact/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,WAAW,CAAA;AACrD,OAAO,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAe3D,MAAM,KAAW,OAAO,CAiBvB;AAjBD,WAAiB,OAAO;IACV,iBAAS,GAAG,gBAAgB,CAAA;IAE5B,eAAO,GAAG,cAAc,CAAA;IAExB,YAAI,GAAG,IAAI,CAAC,MAAM,CAAU;QACxC,OAAO,EAAE,QAAA,SAAS,CAAC,IAAI;QACvB,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE;QACpB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAkB;YAClC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE;YACpB,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;SACnB,CAAC;QACF,KAAK,EAAE,IAAI,CAAC,MAAM,CAAmB;YACpC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;YACrB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC;SACtD,CAAC;KACF,CAAC,CAAA;AACH,CAAC,EAjBgB,OAAO,KAAP,OAAO,QAiBvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Account.js","sourceRoot":"../","sources":["Rule/State/Account.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Account.js","sourceRoot":"../","sources":["Rule/State/Account.ts"],"names":[],"mappings":"AAIA,MAAM,KAAW,OAAO,CAIvB;AAJD,WAAiB,OAAO;IACvB,SAAgB,IAAI,CAAC,OAAqB;QACzC,OAAO,OAAO,CAAA;IACf,CAAC;IAFe,YAAI,OAEnB,CAAA;AACF,CAAC,EAJgB,OAAO,KAAP,OAAO,QAIvB"}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
import { Authorization as ModelAuthorization } from "../../Authorization";
|
|
1
|
+
import type { Authorization as ModelAuthorization } from "../../Authorization";
|
|
2
2
|
export type Authorization = ModelAuthorization;
|
|
3
|
+
export declare namespace Authorization {
|
|
4
|
+
function from(authorization: ModelAuthorization): Authorization;
|
|
5
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Authorization.js","sourceRoot":"../","sources":["Rule/State/Authorization.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Authorization.js","sourceRoot":"../","sources":["Rule/State/Authorization.ts"],"names":[],"mappings":"AAIA,MAAM,KAAW,aAAa,CAI7B;AAJD,WAAiB,aAAa;IAC7B,SAAgB,IAAI,CAAC,aAAiC;QACrD,OAAO,aAAa,CAAA;IACrB,CAAC;IAFe,kBAAI,OAEnB,CAAA;AACF,CAAC,EAJgB,aAAa,KAAb,aAAa,QAI7B"}
|
package/dist/Rule/State/Card.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sourceRoot":"../","sources":["Rule/State/Card.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Card.js","sourceRoot":"../","sources":["Rule/State/Card.ts"],"names":[],"mappings":"AAIA,MAAM,KAAW,IAAI,CAIpB;AAJD,WAAiB,IAAI;IACpB,SAAgB,IAAI,CAAC,IAAe;QACnC,OAAO,IAAI,CAAA;IACZ,CAAC;IAFe,SAAI,OAEnB,CAAA;AACF,CAAC,EAJgB,IAAI,KAAJ,IAAI,QAIpB"}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
import { Transaction as ModelTransaction } from "../../Transaction";
|
|
1
|
+
import type { Transaction as ModelTransaction } from "../../Transaction";
|
|
2
2
|
export type Transaction = ModelTransaction;
|
|
3
|
+
export declare namespace Transaction {
|
|
4
|
+
function from(transaction: ModelTransaction): Transaction;
|
|
5
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Transaction.js","sourceRoot":"../","sources":["Rule/State/Transaction.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Transaction.js","sourceRoot":"../","sources":["Rule/State/Transaction.ts"],"names":[],"mappings":"AAIA,MAAM,KAAW,WAAW,CAI3B;AAJD,WAAiB,WAAW;IAC3B,SAAgB,IAAI,CAAC,WAA6B;QACjD,OAAO,WAAW,CAAA;IACnB,CAAC;IAFe,gBAAI,OAEnB,CAAA;AACF,CAAC,EAJgB,WAAW,KAAX,WAAW,QAI3B"}
|
|
@@ -1,10 +1,25 @@
|
|
|
1
|
-
import { Account } from "
|
|
2
|
-
import { Authorization } from "
|
|
3
|
-
import { Card } from "
|
|
4
|
-
import { Transaction } from "
|
|
1
|
+
import { Account as ModelAccount } from "../../Account";
|
|
2
|
+
import { Authorization as ModelAuthorization } from "../../Authorization";
|
|
3
|
+
import { Card as ModelCard } from "../../Card";
|
|
4
|
+
import { Transaction as ModelTransaction } from "../../Transaction";
|
|
5
|
+
import { Account as StateAccount } from "./Account";
|
|
6
|
+
import { Authorization as StateAuthorization } from "./Authorization";
|
|
7
|
+
import { Card as StateCard } from "./Card";
|
|
8
|
+
import { Transaction as StateTransaction } from "./Transaction";
|
|
5
9
|
export interface State {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
account: StateAccount;
|
|
11
|
+
authorization?: StateAuthorization;
|
|
12
|
+
card?: StateCard;
|
|
13
|
+
transaction: StateTransaction;
|
|
14
|
+
}
|
|
15
|
+
export declare namespace State {
|
|
16
|
+
function from(account: ModelAccount, transaction: ModelTransaction, authorization?: ModelAuthorization, card?: ModelCard): State;
|
|
17
|
+
type Account = StateAccount;
|
|
18
|
+
const Account: typeof StateAccount;
|
|
19
|
+
type Authorization = StateAuthorization;
|
|
20
|
+
const Authorization: typeof StateAuthorization;
|
|
21
|
+
type Card = StateCard;
|
|
22
|
+
const Card: typeof StateCard;
|
|
23
|
+
type Transaction = StateTransaction;
|
|
24
|
+
const Transaction: typeof StateTransaction;
|
|
10
25
|
}
|
package/dist/Rule/State/index.js
CHANGED
|
@@ -1,2 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
import { Account as StateAccount } from "./Account";
|
|
2
|
+
import { Authorization as StateAuthorization } from "./Authorization";
|
|
3
|
+
import { Card as StateCard } from "./Card";
|
|
4
|
+
import { Transaction as StateTransaction } from "./Transaction";
|
|
5
|
+
export var State;
|
|
6
|
+
(function (State) {
|
|
7
|
+
function from(account, transaction, authorization, card) {
|
|
8
|
+
return {
|
|
9
|
+
account: State.Account.from(account),
|
|
10
|
+
authorization: authorization && State.Authorization.from(authorization),
|
|
11
|
+
card: card && State.Card.from(card),
|
|
12
|
+
transaction: State.Transaction.from(transaction),
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
State.from = from;
|
|
16
|
+
State.Account = StateAccount;
|
|
17
|
+
State.Authorization = StateAuthorization;
|
|
18
|
+
State.Card = StateCard;
|
|
19
|
+
State.Transaction = StateTransaction;
|
|
20
|
+
})(State || (State = {}));
|
|
2
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Rule/State/index.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Rule/State/index.ts"],"names":[],"mappings":"AAIA,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,WAAW,IAAI,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAS/D,MAAM,KAAW,KAAK,CAsBrB;AAtBD,WAAiB,KAAK;IACrB,SAAgB,IAAI,CACnB,OAAqB,EACrB,WAA6B,EAC7B,aAAkC,EAClC,IAAgB;QAEhB,OAAO;YACN,OAAO,EAAE,MAAA,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC;YAC9B,aAAa,EAAE,aAAa,IAAI,MAAA,aAAa,CAAC,IAAI,CAAC,aAAa,CAAC;YACjE,IAAI,EAAE,IAAI,IAAI,MAAA,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;YAC7B,WAAW,EAAE,MAAA,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC;SAC1C,CAAA;IACF,CAAC;IAZe,UAAI,OAYnB,CAAA;IAEY,aAAO,GAAG,YAAY,CAAA;IAEtB,mBAAa,GAAG,kBAAkB,CAAA;IAElC,UAAI,GAAG,SAAS,CAAA;IAEhB,iBAAW,GAAG,gBAAgB,CAAA;AAC5C,CAAC,EAtBgB,KAAK,KAAL,KAAK,QAsBrB"}
|
package/dist/Rule/index.d.ts
CHANGED
|
@@ -15,6 +15,13 @@ export declare namespace Rule {
|
|
|
15
15
|
const kinds: readonly ["authorization", "outbound", "inbound"];
|
|
16
16
|
type Kind = typeof kinds[number];
|
|
17
17
|
type State = RuleState;
|
|
18
|
+
const State: typeof RuleState;
|
|
19
|
+
namespace State {
|
|
20
|
+
type Account = RuleState.Account;
|
|
21
|
+
type Authorization = RuleState.Authorization;
|
|
22
|
+
type Card = RuleState.Card;
|
|
23
|
+
type Transaction = RuleState.Transaction;
|
|
24
|
+
}
|
|
18
25
|
const type: isly.object.ExtendableType<Rule>;
|
|
19
26
|
const is: isly.Type.IsFunction<Rule>;
|
|
20
27
|
const flaw: isly.Type.FlawFunction;
|
package/dist/Rule/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { selectively } from "selectively";
|
|
2
2
|
import { isly } from "isly";
|
|
3
3
|
import { definitions } from "./definitions";
|
|
4
|
+
import { State as RuleState } from "./State";
|
|
4
5
|
export var Rule;
|
|
5
6
|
(function (Rule) {
|
|
6
7
|
Rule.actions = ["review", "reject", "flag"];
|
|
7
8
|
Rule.kinds = ["authorization", "outbound", "inbound"];
|
|
9
|
+
Rule.State = RuleState;
|
|
8
10
|
Rule.type = isly.object({
|
|
9
11
|
name: isly.string(),
|
|
10
12
|
description: isly.string(),
|
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,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,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,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,SAAS,CAAA;AAW5C,MAAM,KAAW,IAAI,CAwCpB;AAxCD,WAAiB,IAAI;IACP,YAAO,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAU,CAAA;IAE/C,UAAK,GAAG,CAAC,eAAe,EAAE,UAAU,EAAE,SAAS,CAAU,CAAA;IAGzD,UAAK,GAAG,SAAS,CAAA;IAQjB,SAAI,GAAG,IAAI,CAAC,MAAM,CAAO;QACrC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;QACnB,WAAW,EAAE,IAAI,CAAC,MAAM,EAAE;QAC1B,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,KAAA,OAAO,CAAC;QAC5B,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;KAC5B,CAAC,CAAA;IACW,OAAE,GAAG,KAAA,IAAI,CAAC,EAAE,CAAA;IACZ,SAAI,GAAG,KAAA,IAAI,CAAC,IAAI,CAAA;IAC7B,SAAgB,SAAS,CAAC,IAAU;QACnC,OAAO,YAAY,IAAI,CAAC,IAAI,aAAa,IAAI,CAAC,MAAM,WAAW,IAAI,CAAC,IAAI,gBAAgB,IAAI,CAAC,SAAS,kBAAkB,IAAI,CAAC,WAAW,KAAK,CAAA;IAC9I,CAAC;IAFe,cAAS,YAExB,CAAA;IACD,SAAgB,QAAQ,CACvB,KAAa,EACb,KAAY,EACZ,MAA+C;QAE/C,MAAM,MAAM,GAA2B,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAA;QAC3E,KAAK,CAAC,OAAO,CACZ,CAAC,CAAC,EAAE,CACH,WAAW,CAAC,OAAO,CAAC,EAAE,GAAG,MAAM,EAAE,GAAG,WAAW,EAAE,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC;YAC5F,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACzB,CAAA;QACD,OAAO,MAAM,CAAA;IACd,CAAC;IAZe,aAAQ,WAYvB,CAAA;AACF,CAAC,EAxCgB,IAAI,KAAJ,IAAI,QAwCpB"}
|