@pax2pay/model-banking 0.1.654 → 0.1.656
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/Type.ts +2 -0
- package/Backup/Rule.ts +13 -9
- package/Organization/Changeable.ts +5 -0
- package/Organization/Contact/Address/GB.ts +8 -0
- package/Organization/Contact/Address/General.ts +9 -0
- package/Organization/Contact/Address/SE.ts +7 -0
- package/Organization/Contact/Address/index.ts +2 -0
- package/Organization/Contact/Addresses.ts +7 -0
- package/Organization/Contact/Creatable.ts +8 -0
- package/Organization/Contact/Name.ts +2 -0
- package/Organization/Contact/Phone.ts +5 -0
- package/Organization/Contact/index.ts +8 -0
- package/Organization/Creatable.ts +11 -1
- package/Organization/Fx.ts +2 -0
- package/Organization/Risk.ts +2 -0
- package/Organization/index.ts +14 -1
- package/Rule/State/Transaction.ts +2 -2
- package/Rule/State/index.ts +2 -2
- package/Rule/index.ts +7 -36
- package/Rule/type.ts +5 -2
- package/Transaction/Note.ts +10 -2
- package/dist/cjs/Account/Type.d.ts +5 -0
- package/dist/cjs/Account/Type.js +2 -0
- package/dist/cjs/Account/Type.js.map +1 -1
- package/dist/cjs/Audit.d.ts +1 -1
- package/dist/cjs/Backup/Rule.d.ts +1 -1
- package/dist/cjs/Backup/Rule.js +12 -9
- package/dist/cjs/Backup/Rule.js.map +1 -1
- package/dist/cjs/Organization/Changeable.d.ts +97 -0
- package/dist/cjs/Organization/Changeable.js +5 -0
- package/dist/cjs/Organization/Changeable.js.map +1 -1
- package/dist/cjs/Organization/Contact/Address/GB.d.ts +8 -0
- package/dist/cjs/Organization/Contact/Address/GB.js +8 -0
- package/dist/cjs/Organization/Contact/Address/GB.js.map +1 -1
- package/dist/cjs/Organization/Contact/Address/General.d.ts +9 -0
- package/dist/cjs/Organization/Contact/Address/General.js +9 -0
- package/dist/cjs/Organization/Contact/Address/General.js.map +1 -1
- package/dist/cjs/Organization/Contact/Address/SE.d.ts +7 -0
- package/dist/cjs/Organization/Contact/Address/SE.js +7 -0
- package/dist/cjs/Organization/Contact/Address/SE.js.map +1 -1
- package/dist/cjs/Organization/Contact/Address/index.d.ts +20 -0
- package/dist/cjs/Organization/Contact/Address/index.js +2 -0
- package/dist/cjs/Organization/Contact/Address/index.js.map +1 -1
- package/dist/cjs/Organization/Contact/Addresses.d.ts +79 -0
- package/dist/cjs/Organization/Contact/Addresses.js +7 -0
- package/dist/cjs/Organization/Contact/Addresses.js.map +1 -1
- package/dist/cjs/Organization/Contact/Creatable.d.ts +94 -0
- package/dist/cjs/Organization/Contact/Creatable.js +8 -0
- package/dist/cjs/Organization/Contact/Creatable.js.map +1 -1
- package/dist/cjs/Organization/Contact/Name.d.ts +5 -0
- package/dist/cjs/Organization/Contact/Name.js +2 -0
- package/dist/cjs/Organization/Contact/Name.js.map +1 -1
- package/dist/cjs/Organization/Contact/Phone.d.ts +5 -0
- package/dist/cjs/Organization/Contact/Phone.js +5 -0
- package/dist/cjs/Organization/Contact/Phone.js.map +1 -1
- package/dist/cjs/Organization/Contact/index.d.ts +94 -0
- package/dist/cjs/Organization/Contact/index.js +8 -0
- package/dist/cjs/Organization/Contact/index.js.map +1 -1
- package/dist/cjs/Organization/Creatable.d.ts +110 -1
- package/dist/cjs/Organization/Creatable.js +10 -0
- package/dist/cjs/Organization/Creatable.js.map +1 -1
- package/dist/cjs/Organization/Fx.d.ts +4 -0
- package/dist/cjs/Organization/Fx.js +2 -0
- package/dist/cjs/Organization/Fx.js.map +1 -1
- package/dist/cjs/Organization/Risk.d.ts +7 -0
- package/dist/cjs/Organization/Risk.js +2 -0
- package/dist/cjs/Organization/Risk.js.map +1 -1
- package/dist/cjs/Organization/index.d.ts +123 -1
- package/dist/cjs/Organization/index.js +13 -0
- package/dist/cjs/Organization/index.js.map +1 -1
- package/dist/cjs/Rule/State/Transaction.d.ts +2 -2
- package/dist/cjs/Rule/State/Transaction.js.map +1 -1
- package/dist/cjs/Rule/State/index.d.ts +3 -3
- package/dist/cjs/Rule/State/index.js.map +1 -1
- package/dist/cjs/Rule/index.d.ts +8 -14
- package/dist/cjs/Rule/index.js +6 -33
- package/dist/cjs/Rule/index.js.map +1 -1
- package/dist/cjs/Rule/type.d.ts +2 -2
- package/dist/cjs/Rule/type.js +2 -2
- package/dist/cjs/Rule/type.js.map +1 -1
- package/dist/cjs/Transaction/Note.d.ts +10 -2
- package/dist/cjs/Transaction/Note.js.map +1 -1
- package/dist/cjs/User/Access/Permission.d.ts +4 -4
- package/dist/cjs/User/Access/index.d.ts +3 -3
- package/dist/cjs/User/JWT/Payload.d.ts +12 -12
- package/dist/cjs/User/index.d.ts +6 -6
- package/dist/mjs/Account/Type.d.ts +5 -0
- package/dist/mjs/Account/Type.js +2 -0
- package/dist/mjs/Account/Type.js.map +1 -1
- package/dist/mjs/Audit.d.ts +1 -1
- package/dist/mjs/Backup/Rule.d.ts +1 -1
- package/dist/mjs/Backup/Rule.js +12 -9
- package/dist/mjs/Backup/Rule.js.map +1 -1
- package/dist/mjs/Organization/Changeable.d.ts +97 -0
- package/dist/mjs/Organization/Changeable.js +5 -0
- package/dist/mjs/Organization/Changeable.js.map +1 -1
- package/dist/mjs/Organization/Contact/Address/GB.d.ts +8 -0
- package/dist/mjs/Organization/Contact/Address/GB.js +8 -0
- package/dist/mjs/Organization/Contact/Address/GB.js.map +1 -1
- package/dist/mjs/Organization/Contact/Address/General.d.ts +9 -0
- package/dist/mjs/Organization/Contact/Address/General.js +9 -0
- package/dist/mjs/Organization/Contact/Address/General.js.map +1 -1
- package/dist/mjs/Organization/Contact/Address/SE.d.ts +7 -0
- package/dist/mjs/Organization/Contact/Address/SE.js +7 -0
- package/dist/mjs/Organization/Contact/Address/SE.js.map +1 -1
- package/dist/mjs/Organization/Contact/Address/index.d.ts +20 -0
- package/dist/mjs/Organization/Contact/Address/index.js +2 -0
- package/dist/mjs/Organization/Contact/Address/index.js.map +1 -1
- package/dist/mjs/Organization/Contact/Addresses.d.ts +79 -0
- package/dist/mjs/Organization/Contact/Addresses.js +7 -0
- package/dist/mjs/Organization/Contact/Addresses.js.map +1 -1
- package/dist/mjs/Organization/Contact/Creatable.d.ts +94 -0
- package/dist/mjs/Organization/Contact/Creatable.js +8 -0
- package/dist/mjs/Organization/Contact/Creatable.js.map +1 -1
- package/dist/mjs/Organization/Contact/Name.d.ts +5 -0
- package/dist/mjs/Organization/Contact/Name.js +2 -0
- package/dist/mjs/Organization/Contact/Name.js.map +1 -1
- package/dist/mjs/Organization/Contact/Phone.d.ts +5 -0
- package/dist/mjs/Organization/Contact/Phone.js +5 -0
- package/dist/mjs/Organization/Contact/Phone.js.map +1 -1
- package/dist/mjs/Organization/Contact/index.d.ts +94 -0
- package/dist/mjs/Organization/Contact/index.js +8 -0
- package/dist/mjs/Organization/Contact/index.js.map +1 -1
- package/dist/mjs/Organization/Creatable.d.ts +110 -1
- package/dist/mjs/Organization/Creatable.js +10 -0
- package/dist/mjs/Organization/Creatable.js.map +1 -1
- package/dist/mjs/Organization/Fx.d.ts +4 -0
- package/dist/mjs/Organization/Fx.js +2 -0
- package/dist/mjs/Organization/Fx.js.map +1 -1
- package/dist/mjs/Organization/Risk.d.ts +7 -0
- package/dist/mjs/Organization/Risk.js +2 -0
- package/dist/mjs/Organization/Risk.js.map +1 -1
- package/dist/mjs/Organization/index.d.ts +123 -1
- package/dist/mjs/Organization/index.js +13 -0
- package/dist/mjs/Organization/index.js.map +1 -1
- package/dist/mjs/Rule/State/Transaction.d.ts +2 -2
- package/dist/mjs/Rule/State/Transaction.js.map +1 -1
- package/dist/mjs/Rule/State/index.d.ts +3 -3
- package/dist/mjs/Rule/State/index.js.map +1 -1
- package/dist/mjs/Rule/index.d.ts +8 -14
- package/dist/mjs/Rule/index.js +6 -33
- package/dist/mjs/Rule/index.js.map +1 -1
- package/dist/mjs/Rule/type.d.ts +2 -2
- package/dist/mjs/Rule/type.js +2 -2
- package/dist/mjs/Rule/type.js.map +1 -1
- package/dist/mjs/Transaction/Note.d.ts +10 -2
- package/dist/mjs/Transaction/Note.js.map +1 -1
- package/dist/mjs/User/Access/Permission.d.ts +4 -4
- package/dist/mjs/User/Access/index.d.ts +3 -3
- package/dist/mjs/User/JWT/Payload.d.ts +12 -12
- package/dist/mjs/User/index.d.ts +6 -6
- package/package.json +5 -3
- package/Rule/Base.ts +0 -43
- package/Rule/Other.ts +0 -47
- package/Rule/control.ts +0 -7
- package/dist/cjs/Rule/Base.d.ts +0 -27
- package/dist/cjs/Rule/Base.js +0 -36
- package/dist/cjs/Rule/Base.js.map +0 -1
- package/dist/cjs/Rule/Other.d.ts +0 -20
- package/dist/cjs/Rule/Other.js +0 -42
- package/dist/cjs/Rule/Other.js.map +0 -1
- package/dist/cjs/Rule/control.d.ts +0 -4
- package/dist/cjs/Rule/control.js +0 -8
- package/dist/cjs/Rule/control.js.map +0 -1
- package/dist/mjs/Rule/Base.d.ts +0 -27
- package/dist/mjs/Rule/Base.js +0 -33
- package/dist/mjs/Rule/Base.js.map +0 -1
- package/dist/mjs/Rule/Other.d.ts +0 -20
- package/dist/mjs/Rule/Other.js +0 -39
- package/dist/mjs/Rule/Other.js.map +0 -1
- package/dist/mjs/Rule/control.d.ts +0 -4
- package/dist/mjs/Rule/control.js +0 -5
- package/dist/mjs/Rule/control.js.map +0 -1
package/Account/Type.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { isly } from "isly"
|
|
2
|
+
import { zod } from "../zod"
|
|
2
3
|
|
|
3
4
|
export type Type = (typeof Type.values)[number]
|
|
4
5
|
export namespace Type {
|
|
5
6
|
export const values = ["own funds", "emoney"] as const
|
|
6
7
|
export const type = isly.string<Type>(values)
|
|
8
|
+
export const typeZod = zod.enum(values)
|
|
7
9
|
}
|
package/Backup/Rule.ts
CHANGED
|
@@ -12,14 +12,18 @@ export namespace Rule {
|
|
|
12
12
|
value: modelRule,
|
|
13
13
|
action: Base.Action,
|
|
14
14
|
data?: { organization?: string; account?: string }
|
|
15
|
-
) =>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
) => {
|
|
16
|
+
// Rule is currently typed as `never`, so its fields are read via a cast until rules are retyped.
|
|
17
|
+
const rule = value as { code: string; category: string; type: string; action: string }
|
|
18
|
+
return {
|
|
19
|
+
entityType: "rule",
|
|
20
|
+
entity: rule.code,
|
|
21
|
+
...data,
|
|
22
|
+
action,
|
|
23
|
+
created: isoly.DateTime.now(),
|
|
24
|
+
meta: `${rule.category}.${rule.type}.${rule.action}`,
|
|
25
|
+
value,
|
|
26
|
+
}
|
|
27
|
+
}
|
|
24
28
|
export const addSender = Base.pipeToSender(create)
|
|
25
29
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isly } from "isly"
|
|
2
|
+
import { zod } from "../zod"
|
|
2
3
|
import { Contact } from "./Contact"
|
|
3
4
|
|
|
4
5
|
export interface Changeable {
|
|
@@ -10,4 +11,8 @@ export namespace Changeable {
|
|
|
10
11
|
name: isly.string().optional(),
|
|
11
12
|
contact: Contact.Creatable.type.optional(),
|
|
12
13
|
})
|
|
14
|
+
export const typeZod = zod.object({
|
|
15
|
+
name: zod.string().optional(),
|
|
16
|
+
contact: Contact.Creatable.typeZod.optional(),
|
|
17
|
+
})
|
|
13
18
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { isoly } from "isoly"
|
|
2
2
|
import { isly } from "isly"
|
|
3
|
+
import { zod } from "../../../zod"
|
|
3
4
|
|
|
4
5
|
export interface GB {
|
|
5
6
|
countryCode: "GB"
|
|
@@ -18,4 +19,11 @@ export namespace GB {
|
|
|
18
19
|
building: isly.string(),
|
|
19
20
|
zipCode: isly.string(),
|
|
20
21
|
})
|
|
22
|
+
export const typeZod = zod.object({
|
|
23
|
+
countryCode: zod.literal("GB"),
|
|
24
|
+
city: zod.string(),
|
|
25
|
+
street: zod.string(),
|
|
26
|
+
building: zod.string(),
|
|
27
|
+
zipCode: zod.string(),
|
|
28
|
+
})
|
|
21
29
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { isoly } from "isoly"
|
|
2
2
|
import { isly } from "isly"
|
|
3
|
+
import { zod } from "../../../zod"
|
|
3
4
|
|
|
4
5
|
export interface Default {
|
|
5
6
|
countryCode: Exclude<isoly.CountryCode.Alpha2, "GB" | "SE">
|
|
@@ -19,4 +20,12 @@ export namespace Default {
|
|
|
19
20
|
street: isly.string(),
|
|
20
21
|
zipCode: isly.string(),
|
|
21
22
|
})
|
|
23
|
+
export const typeZod = zod.object({
|
|
24
|
+
countryCode: zod.string(),
|
|
25
|
+
state: zod.string().optional(),
|
|
26
|
+
county: zod.string().optional(),
|
|
27
|
+
city: zod.string(),
|
|
28
|
+
zipCode: zod.string(),
|
|
29
|
+
street: zod.string(),
|
|
30
|
+
})
|
|
22
31
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isly } from "isly"
|
|
2
|
+
import { zod } from "../../../zod"
|
|
2
3
|
|
|
3
4
|
export interface SE {
|
|
4
5
|
countryCode: "SE"
|
|
@@ -13,4 +14,10 @@ export namespace SE {
|
|
|
13
14
|
city: isly.string(),
|
|
14
15
|
street: isly.string(),
|
|
15
16
|
})
|
|
17
|
+
export const typeZod = zod.object({
|
|
18
|
+
countryCode: zod.literal("SE"),
|
|
19
|
+
zipCode: zod.string(),
|
|
20
|
+
city: zod.string(),
|
|
21
|
+
street: zod.string(),
|
|
22
|
+
})
|
|
16
23
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isly } from "isly"
|
|
2
|
+
import { zod } from "../../../zod"
|
|
2
3
|
import { GB } from "./GB"
|
|
3
4
|
import { Default } from "./General"
|
|
4
5
|
import { SE } from "./SE"
|
|
@@ -7,4 +8,5 @@ export type Address = GB | SE | Default
|
|
|
7
8
|
|
|
8
9
|
export namespace Address {
|
|
9
10
|
export const type = isly.union(GB.type, SE.type, Default.type)
|
|
11
|
+
export const typeZod = zod.union([GB.typeZod, SE.typeZod, Default.typeZod])
|
|
10
12
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isly } from "isly"
|
|
2
|
+
import { zod } from "../../zod"
|
|
2
3
|
import { Address } from "./Address"
|
|
3
4
|
|
|
4
5
|
export interface Addresses {
|
|
@@ -14,4 +15,10 @@ export namespace Addresses {
|
|
|
14
15
|
delivery: Address.type.optional(),
|
|
15
16
|
visit: Address.type.optional(),
|
|
16
17
|
})
|
|
18
|
+
export const typeZod = zod.object({
|
|
19
|
+
primary: Address.typeZod,
|
|
20
|
+
billing: Address.typeZod.optional(),
|
|
21
|
+
delivery: Address.typeZod.optional(),
|
|
22
|
+
visit: Address.typeZod.optional(),
|
|
23
|
+
})
|
|
17
24
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isly } from "isly"
|
|
2
|
+
import { zod } from "../../zod"
|
|
2
3
|
import { Addresses } from "./Addresses"
|
|
3
4
|
import { Name } from "./Name"
|
|
4
5
|
import { Phone } from "./Phone"
|
|
@@ -18,4 +19,11 @@ export namespace Creatable {
|
|
|
18
19
|
phone: Phone.type,
|
|
19
20
|
owners: Name.type.array({ criteria: "minLength", value: 1 }),
|
|
20
21
|
})
|
|
22
|
+
export const typeZod = zod.object({
|
|
23
|
+
address: Addresses.typeZod,
|
|
24
|
+
email: zod.string().regex(/^\S+@\S+\.\S+$/),
|
|
25
|
+
name: Name.typeZod,
|
|
26
|
+
phone: Phone.typeZod,
|
|
27
|
+
owners: zod.array(Name.typeZod).min(1),
|
|
28
|
+
})
|
|
21
29
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isly } from "isly"
|
|
2
|
+
import { zod } from "../../zod"
|
|
2
3
|
|
|
3
4
|
export interface Name {
|
|
4
5
|
first: string
|
|
@@ -6,4 +7,5 @@ export interface Name {
|
|
|
6
7
|
}
|
|
7
8
|
export namespace Name {
|
|
8
9
|
export const type = isly.object<Name>({ first: isly.string(), last: isly.string() })
|
|
10
|
+
export const typeZod = zod.object({ first: zod.string(), last: zod.string() })
|
|
9
11
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { isoly } from "isoly"
|
|
2
2
|
import { isly } from "isly"
|
|
3
|
+
import { zod } from "../../zod"
|
|
3
4
|
|
|
4
5
|
export interface Phone {
|
|
5
6
|
number: string
|
|
@@ -10,4 +11,8 @@ export namespace Phone {
|
|
|
10
11
|
number: isly.string(/^\d+$/),
|
|
11
12
|
code: isly.fromIs("CallingCode", isoly.CallingCode.is),
|
|
12
13
|
})
|
|
14
|
+
export const typeZod = zod.object({
|
|
15
|
+
number: zod.string().regex(/^\d+$/),
|
|
16
|
+
code: zod.custom<isoly.CallingCode>(isoly.CallingCode.is),
|
|
17
|
+
})
|
|
13
18
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isly } from "isly"
|
|
2
|
+
import { zod } from "../../zod"
|
|
2
3
|
import { Address as ContactAddress } from "./Address"
|
|
3
4
|
import { Addresses as ContactAddresses } from "./Addresses"
|
|
4
5
|
import { Creatable as ContactCreatable } from "./Creatable"
|
|
@@ -25,4 +26,11 @@ export namespace Contact {
|
|
|
25
26
|
phone: Phone.type,
|
|
26
27
|
owners: Name.type.array().optional(),
|
|
27
28
|
})
|
|
29
|
+
export const typeZod = zod.object({
|
|
30
|
+
address: Addresses.typeZod,
|
|
31
|
+
email: zod.string().regex(/^\S+@\S+\.\S+$/),
|
|
32
|
+
name: Name.typeZod,
|
|
33
|
+
phone: Phone.typeZod,
|
|
34
|
+
owners: zod.array(Name.typeZod).optional(),
|
|
35
|
+
})
|
|
28
36
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { isly } from "isly"
|
|
2
|
-
import { Rule } from "../Rule"
|
|
2
|
+
import type { Rule } from "../Rule"
|
|
3
3
|
import { type as ruleType } from "../Rule/type"
|
|
4
|
+
import { zod } from "../zod"
|
|
4
5
|
import { Contact } from "./Contact"
|
|
5
6
|
import { Fx } from "./Fx"
|
|
6
7
|
import { Risk } from "./Risk"
|
|
@@ -24,4 +25,13 @@ export namespace Creatable {
|
|
|
24
25
|
groups: isly.string().array().optional(),
|
|
25
26
|
fx: Fx.type.optional(),
|
|
26
27
|
})
|
|
28
|
+
export const typeZod = zod.object({
|
|
29
|
+
name: zod.string(),
|
|
30
|
+
code: zod.string().regex(/^[A-Za-z0-9\-_]+$/),
|
|
31
|
+
risk: Risk.typeZod,
|
|
32
|
+
rules: zod.array(zod.never()).optional(),
|
|
33
|
+
contact: Contact.Creatable.typeZod.optional(),
|
|
34
|
+
groups: zod.array(zod.string()).optional(),
|
|
35
|
+
fx: Fx.typeZod.optional(),
|
|
36
|
+
})
|
|
27
37
|
}
|
package/Organization/Fx.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { isly } from "isly"
|
|
2
|
+
import { zod } from "../zod"
|
|
2
3
|
|
|
3
4
|
export interface Fx {
|
|
4
5
|
markup: number
|
|
5
6
|
}
|
|
6
7
|
export namespace Fx {
|
|
7
8
|
export const type = isly.object<Fx>({ markup: isly.number(value => value >= 0) })
|
|
9
|
+
export const typeZod = zod.object({ markup: zod.number().min(0) })
|
|
8
10
|
}
|
package/Organization/Risk.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { isly } from "isly"
|
|
2
|
+
import { zod } from "../zod"
|
|
2
3
|
|
|
3
4
|
export type Risk = (typeof Risk.values)[number]
|
|
4
5
|
|
|
5
6
|
export namespace Risk {
|
|
6
7
|
export const values = ["low", "medium", "high", "prohibited"] as const
|
|
7
8
|
export const type = isly.string(values)
|
|
9
|
+
export const typeZod = zod.enum(values)
|
|
8
10
|
}
|
package/Organization/index.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { isly } from "isly"
|
|
2
2
|
import { Type } from "../Account/Type"
|
|
3
3
|
import { Realm } from "../Realm"
|
|
4
|
-
import { Rule } from "../Rule"
|
|
4
|
+
import type { Rule } from "../Rule"
|
|
5
5
|
import { type as ruleType } from "../Rule/type"
|
|
6
|
+
import { zod } from "../zod"
|
|
6
7
|
import { Changeable as OrganizationChangeable } from "./Changeable"
|
|
7
8
|
import { Contact as OrganizationContact } from "./Contact"
|
|
8
9
|
import { Creatable as OrganizationCreatable } from "./Creatable"
|
|
@@ -39,6 +40,18 @@ export namespace Organization {
|
|
|
39
40
|
fx: OrganizationFx.type.optional(),
|
|
40
41
|
type: Type.type,
|
|
41
42
|
})
|
|
43
|
+
export const typeZod = zod.object({
|
|
44
|
+
name: zod.string(),
|
|
45
|
+
code: zod.string().regex(/^[A-Za-z0-9\-_]+$/),
|
|
46
|
+
realm: Realm.typeZod,
|
|
47
|
+
rules: zod.array(zod.never()),
|
|
48
|
+
status: zod.enum(["active", "inactive"]),
|
|
49
|
+
risk: Organization.Risk.typeZod,
|
|
50
|
+
contact: Contact.typeZod.optional(),
|
|
51
|
+
groups: zod.array(zod.string()).optional(),
|
|
52
|
+
fx: OrganizationFx.typeZod.optional(),
|
|
53
|
+
type: Type.typeZod,
|
|
54
|
+
})
|
|
42
55
|
export function from(creatable: Creatable, realm: Realm): Organization {
|
|
43
56
|
return { ...creatable, realm, rules: creatable.rules ?? [], status: "active", type: "emoney" }
|
|
44
57
|
}
|
|
@@ -5,7 +5,7 @@ import type { Rule } from "../index"
|
|
|
5
5
|
|
|
6
6
|
export type Transaction = ModelTransaction.Creatable.Resolved & {
|
|
7
7
|
id: string
|
|
8
|
-
kind: Rule.
|
|
8
|
+
kind: Rule.Kind
|
|
9
9
|
stage: "finalize" | "initiate"
|
|
10
10
|
amount: number
|
|
11
11
|
type: ModelTransaction.Types
|
|
@@ -19,7 +19,7 @@ export namespace Transaction {
|
|
|
19
19
|
export function from(
|
|
20
20
|
account: ModelAccount,
|
|
21
21
|
transaction: ModelTransaction.Creatable.Resolved | ModelTransaction,
|
|
22
|
-
kind: Rule.
|
|
22
|
+
kind: Rule.Kind,
|
|
23
23
|
stage: "finalize" | "initiate"
|
|
24
24
|
): Transaction {
|
|
25
25
|
const amount = Math.abs(typeof transaction.amount == "number" ? transaction.amount : transaction.amount.original)
|
package/Rule/State/index.ts
CHANGED
|
@@ -39,7 +39,7 @@ export namespace State {
|
|
|
39
39
|
account: ModelAccount,
|
|
40
40
|
address: Rail.Address,
|
|
41
41
|
transaction: ModelTransaction.Creatable.Resolved | ModelTransaction,
|
|
42
|
-
kind: Rule.
|
|
42
|
+
kind: Rule.Kind,
|
|
43
43
|
stage: "finalize" | "initiate",
|
|
44
44
|
card?: Card,
|
|
45
45
|
organization?: Organization
|
|
@@ -52,7 +52,7 @@ export namespace State {
|
|
|
52
52
|
organization,
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
export const type: Record<ModelTransaction.PreTransaction["type"], Rule.
|
|
55
|
+
export const type: Record<ModelTransaction.PreTransaction["type"], Rule.Kind> = {
|
|
56
56
|
authorization: "authorization",
|
|
57
57
|
incoming: "inbound",
|
|
58
58
|
outgoing: "outbound",
|
package/Rule/index.ts
CHANGED
|
@@ -1,48 +1,19 @@
|
|
|
1
1
|
import { isly } from "isly"
|
|
2
|
-
import type { Note } from "../Transaction/Note"
|
|
3
|
-
import { Base as RuleBase } from "./Base"
|
|
4
|
-
import { control as ruleControl } from "./control"
|
|
5
|
-
import { Other as RuleOther } from "./Other"
|
|
6
2
|
import { State as RuleState } from "./State"
|
|
7
3
|
import { type as ruleType } from "./type"
|
|
8
4
|
|
|
9
|
-
export type Rule =
|
|
5
|
+
export type Rule = never
|
|
10
6
|
export namespace Rule {
|
|
11
|
-
export import Other = RuleOther
|
|
12
7
|
export import State = RuleState
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
export type Kind = (typeof Kind.values)[number]
|
|
9
|
+
export namespace Kind {
|
|
10
|
+
export const values = ["authorization", "outbound", "inbound", "capture", "refund"] as const
|
|
11
|
+
export const type = isly.string<Kind>(values)
|
|
12
|
+
}
|
|
18
13
|
export type Action = (typeof Action.values)[number]
|
|
19
14
|
export namespace Action {
|
|
20
|
-
export const values = [
|
|
15
|
+
export const values = ["review", "reject", "flag"] as const
|
|
21
16
|
export const type = isly.string<Action>(values)
|
|
22
17
|
}
|
|
23
18
|
export const type = ruleType
|
|
24
|
-
export function evaluate(rules: Rule[], state: RuleState): RuleState.Evaluated {
|
|
25
|
-
const outcomes: Record<Rule.Action, Rule[]> = {
|
|
26
|
-
review: [],
|
|
27
|
-
reject: [],
|
|
28
|
-
flag: [],
|
|
29
|
-
}
|
|
30
|
-
const notes: Note[] = []
|
|
31
|
-
const evaluated = Other.evaluate(
|
|
32
|
-
rules.filter(rule => Base.Kind.is(state.transaction.kind, rule, state.organization?.groups, state.card?.preset)),
|
|
33
|
-
state
|
|
34
|
-
)
|
|
35
|
-
notes.push(...evaluated.notes)
|
|
36
|
-
outcomes.flag.push(...evaluated.outcomes.flag)
|
|
37
|
-
outcomes.review.push(...evaluated.outcomes.review)
|
|
38
|
-
outcomes.reject.push(...evaluated.outcomes.reject)
|
|
39
|
-
const outcome = outcomes.reject.length > 0 ? "reject" : outcomes.review.length > 0 ? "review" : "approve"
|
|
40
|
-
return { ...state, flags: [...evaluated.flags], notes, outcomes, outcome }
|
|
41
|
-
}
|
|
42
|
-
export function isLegacy(rule: Rule): boolean {
|
|
43
|
-
return !Rule.Base.Category.type.is(rule.category)
|
|
44
|
-
}
|
|
45
|
-
export function fromLegacy(rule: Rule): Rule {
|
|
46
|
-
return isLegacy(rule) ? { ...rule, category: "fincrime" } : rule
|
|
47
|
-
}
|
|
48
19
|
}
|
package/Rule/type.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isly } from "isly"
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// Standalone isly type for rules, kept out of Rule/index.ts to avoid a circular
|
|
4
|
+
// import (Rule/index → Rule/State → State/Card → Card → Rule). Rule is currently
|
|
5
|
+
// typed as `never`, so this validates to `never[]` when used as an array.
|
|
6
|
+
export const type = isly.any<never>()
|
package/Transaction/Note.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { isoly } from "isoly"
|
|
2
2
|
import { isly } from "isly"
|
|
3
|
-
import type { Rule } from "../Rule"
|
|
4
3
|
|
|
5
4
|
export interface Note extends Note.Creatable {
|
|
6
5
|
author: string
|
|
@@ -15,7 +14,16 @@ export namespace Note {
|
|
|
15
14
|
text?: string
|
|
16
15
|
action?: "approve" | "reject"
|
|
17
16
|
flags?: string[]
|
|
18
|
-
rule?:
|
|
17
|
+
rule?: {
|
|
18
|
+
action: "reject"
|
|
19
|
+
code: string
|
|
20
|
+
name: string
|
|
21
|
+
type: "authorization"
|
|
22
|
+
category: "fincrime"
|
|
23
|
+
condition: ""
|
|
24
|
+
description: string
|
|
25
|
+
flags: ["category", "merchant"]
|
|
26
|
+
}
|
|
19
27
|
}
|
|
20
28
|
export namespace Creatable {
|
|
21
29
|
export const type = isly.object<Creatable>({
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { isly } from "isly";
|
|
2
|
+
import { zod } from "../zod";
|
|
2
3
|
export type Type = (typeof Type.values)[number];
|
|
3
4
|
export declare namespace Type {
|
|
4
5
|
const values: readonly ["own funds", "emoney"];
|
|
5
6
|
const type: isly.Type<"own funds" | "emoney">;
|
|
7
|
+
const typeZod: zod.ZodEnum<{
|
|
8
|
+
"own funds": "own funds";
|
|
9
|
+
emoney: "emoney";
|
|
10
|
+
}>;
|
|
6
11
|
}
|
package/dist/cjs/Account/Type.js
CHANGED
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Type = void 0;
|
|
4
4
|
const isly_1 = require("isly");
|
|
5
|
+
const zod_1 = require("../zod");
|
|
5
6
|
var Type;
|
|
6
7
|
(function (Type) {
|
|
7
8
|
Type.values = ["own funds", "emoney"];
|
|
8
9
|
Type.type = isly_1.isly.string(Type.values);
|
|
10
|
+
Type.typeZod = zod_1.zod.enum(Type.values);
|
|
9
11
|
})(Type || (exports.Type = Type = {}));
|
|
10
12
|
//# sourceMappingURL=Type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Type.js","sourceRoot":"","sources":["../../../Account/Type.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;
|
|
1
|
+
{"version":3,"file":"Type.js","sourceRoot":"","sources":["../../../Account/Type.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,gCAA4B;AAG5B,IAAiB,IAAI,CAIpB;AAJD,WAAiB,IAAI;IACP,WAAM,GAAG,CAAC,WAAW,EAAE,QAAQ,CAAU,CAAA;IACzC,SAAI,GAAG,WAAI,CAAC,MAAM,CAAO,KAAA,MAAM,CAAC,CAAA;IAChC,YAAO,GAAG,SAAG,CAAC,IAAI,CAAC,KAAA,MAAM,CAAC,CAAA;AACxC,CAAC,EAJgB,IAAI,oBAAJ,IAAI,QAIpB"}
|
package/dist/cjs/Audit.d.ts
CHANGED
|
@@ -38,6 +38,6 @@ export declare namespace Audit {
|
|
|
38
38
|
readonly clearbank: readonly ["assessmentFailed", "validationFailed"];
|
|
39
39
|
};
|
|
40
40
|
const keys: (keyof typeof value)[];
|
|
41
|
-
const type: isly.Type<"clearbank" | "
|
|
41
|
+
const type: isly.Type<"clearbank" | "account" | "transaction" | "organization" | "rule" | "settlements" | "user" | "marqeta" | "label" | "route">;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -10,7 +10,7 @@ export declare namespace Rule {
|
|
|
10
10
|
organization?: string;
|
|
11
11
|
account?: string;
|
|
12
12
|
}>;
|
|
13
|
-
const addSender: (sender: (backup: Rule) => any | Promise<any>) => (args_0:
|
|
13
|
+
const addSender: (sender: (backup: Rule) => any | Promise<any>) => (args_0: never, args_1: "created" | "cancelled" | "updated" | "removed" | "inactivated", args_2?: {
|
|
14
14
|
organization?: string;
|
|
15
15
|
account?: string;
|
|
16
16
|
} | undefined) => ReturnType<(backup: Rule) => any | Promise<any>>;
|
package/dist/cjs/Backup/Rule.js
CHANGED
|
@@ -5,15 +5,18 @@ const isoly_1 = require("isoly");
|
|
|
5
5
|
const Base_1 = require("./Base");
|
|
6
6
|
var Rule;
|
|
7
7
|
(function (Rule) {
|
|
8
|
-
Rule.create = (value, action, data) =>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
Rule.create = (value, action, data) => {
|
|
9
|
+
const rule = value;
|
|
10
|
+
return {
|
|
11
|
+
entityType: "rule",
|
|
12
|
+
entity: rule.code,
|
|
13
|
+
...data,
|
|
14
|
+
action,
|
|
15
|
+
created: isoly_1.isoly.DateTime.now(),
|
|
16
|
+
meta: `${rule.category}.${rule.type}.${rule.action}`,
|
|
17
|
+
value,
|
|
18
|
+
};
|
|
19
|
+
};
|
|
17
20
|
Rule.addSender = Base_1.Base.pipeToSender(Rule.create);
|
|
18
21
|
})(Rule || (exports.Rule = Rule = {}));
|
|
19
22
|
//# sourceMappingURL=Rule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Rule.js","sourceRoot":"","sources":["../../../Backup/Rule.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAE7B,iCAA6B;AAO7B,IAAiB,IAAI,
|
|
1
|
+
{"version":3,"file":"Rule.js","sourceRoot":"","sources":["../../../Backup/Rule.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAE7B,iCAA6B;AAO7B,IAAiB,IAAI,CAmBpB;AAnBD,WAAiB,IAAI;IACP,WAAM,GAA8E,CAChG,KAAgB,EAChB,MAAmB,EACnB,IAAkD,EACjD,EAAE;QAEH,MAAM,IAAI,GAAG,KAAyE,CAAA;QACtF,OAAO;YACN,UAAU,EAAE,MAAM;YAClB,MAAM,EAAE,IAAI,CAAC,IAAI;YACjB,GAAG,IAAI;YACP,MAAM;YACN,OAAO,EAAE,aAAK,CAAC,QAAQ,CAAC,GAAG,EAAE;YAC7B,IAAI,EAAE,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE;YACpD,KAAK;SACL,CAAA;IACF,CAAC,CAAA;IACY,cAAS,GAAG,WAAI,CAAC,YAAY,CAAC,KAAA,MAAM,CAAC,CAAA;AACnD,CAAC,EAnBgB,IAAI,oBAAJ,IAAI,QAmBpB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { zod } from "../zod";
|
|
1
2
|
import { Contact } from "./Contact";
|
|
2
3
|
export interface Changeable {
|
|
3
4
|
name?: string;
|
|
@@ -5,4 +6,100 @@ export interface Changeable {
|
|
|
5
6
|
}
|
|
6
7
|
export declare namespace Changeable {
|
|
7
8
|
const type: import("isly/dist/cjs/object").IslyObject<Changeable, object>;
|
|
9
|
+
const typeZod: zod.ZodObject<{
|
|
10
|
+
name: zod.ZodOptional<zod.ZodString>;
|
|
11
|
+
contact: zod.ZodOptional<zod.ZodObject<{
|
|
12
|
+
address: zod.ZodObject<{
|
|
13
|
+
primary: zod.ZodUnion<readonly [zod.ZodObject<{
|
|
14
|
+
countryCode: zod.ZodLiteral<"GB">;
|
|
15
|
+
city: zod.ZodString;
|
|
16
|
+
street: zod.ZodString;
|
|
17
|
+
building: zod.ZodString;
|
|
18
|
+
zipCode: zod.ZodString;
|
|
19
|
+
}, zod.z.core.$strip>, zod.ZodObject<{
|
|
20
|
+
countryCode: zod.ZodLiteral<"SE">;
|
|
21
|
+
zipCode: zod.ZodString;
|
|
22
|
+
city: zod.ZodString;
|
|
23
|
+
street: zod.ZodString;
|
|
24
|
+
}, zod.z.core.$strip>, zod.ZodObject<{
|
|
25
|
+
countryCode: zod.ZodString;
|
|
26
|
+
state: zod.ZodOptional<zod.ZodString>;
|
|
27
|
+
county: zod.ZodOptional<zod.ZodString>;
|
|
28
|
+
city: zod.ZodString;
|
|
29
|
+
zipCode: zod.ZodString;
|
|
30
|
+
street: zod.ZodString;
|
|
31
|
+
}, zod.z.core.$strip>]>;
|
|
32
|
+
billing: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodObject<{
|
|
33
|
+
countryCode: zod.ZodLiteral<"GB">;
|
|
34
|
+
city: zod.ZodString;
|
|
35
|
+
street: zod.ZodString;
|
|
36
|
+
building: zod.ZodString;
|
|
37
|
+
zipCode: zod.ZodString;
|
|
38
|
+
}, zod.z.core.$strip>, zod.ZodObject<{
|
|
39
|
+
countryCode: zod.ZodLiteral<"SE">;
|
|
40
|
+
zipCode: zod.ZodString;
|
|
41
|
+
city: zod.ZodString;
|
|
42
|
+
street: zod.ZodString;
|
|
43
|
+
}, zod.z.core.$strip>, zod.ZodObject<{
|
|
44
|
+
countryCode: zod.ZodString;
|
|
45
|
+
state: zod.ZodOptional<zod.ZodString>;
|
|
46
|
+
county: zod.ZodOptional<zod.ZodString>;
|
|
47
|
+
city: zod.ZodString;
|
|
48
|
+
zipCode: zod.ZodString;
|
|
49
|
+
street: zod.ZodString;
|
|
50
|
+
}, zod.z.core.$strip>]>>;
|
|
51
|
+
delivery: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodObject<{
|
|
52
|
+
countryCode: zod.ZodLiteral<"GB">;
|
|
53
|
+
city: zod.ZodString;
|
|
54
|
+
street: zod.ZodString;
|
|
55
|
+
building: zod.ZodString;
|
|
56
|
+
zipCode: zod.ZodString;
|
|
57
|
+
}, zod.z.core.$strip>, zod.ZodObject<{
|
|
58
|
+
countryCode: zod.ZodLiteral<"SE">;
|
|
59
|
+
zipCode: zod.ZodString;
|
|
60
|
+
city: zod.ZodString;
|
|
61
|
+
street: zod.ZodString;
|
|
62
|
+
}, zod.z.core.$strip>, zod.ZodObject<{
|
|
63
|
+
countryCode: zod.ZodString;
|
|
64
|
+
state: zod.ZodOptional<zod.ZodString>;
|
|
65
|
+
county: zod.ZodOptional<zod.ZodString>;
|
|
66
|
+
city: zod.ZodString;
|
|
67
|
+
zipCode: zod.ZodString;
|
|
68
|
+
street: zod.ZodString;
|
|
69
|
+
}, zod.z.core.$strip>]>>;
|
|
70
|
+
visit: zod.ZodOptional<zod.ZodUnion<readonly [zod.ZodObject<{
|
|
71
|
+
countryCode: zod.ZodLiteral<"GB">;
|
|
72
|
+
city: zod.ZodString;
|
|
73
|
+
street: zod.ZodString;
|
|
74
|
+
building: zod.ZodString;
|
|
75
|
+
zipCode: zod.ZodString;
|
|
76
|
+
}, zod.z.core.$strip>, zod.ZodObject<{
|
|
77
|
+
countryCode: zod.ZodLiteral<"SE">;
|
|
78
|
+
zipCode: zod.ZodString;
|
|
79
|
+
city: zod.ZodString;
|
|
80
|
+
street: zod.ZodString;
|
|
81
|
+
}, zod.z.core.$strip>, zod.ZodObject<{
|
|
82
|
+
countryCode: zod.ZodString;
|
|
83
|
+
state: zod.ZodOptional<zod.ZodString>;
|
|
84
|
+
county: zod.ZodOptional<zod.ZodString>;
|
|
85
|
+
city: zod.ZodString;
|
|
86
|
+
zipCode: zod.ZodString;
|
|
87
|
+
street: zod.ZodString;
|
|
88
|
+
}, zod.z.core.$strip>]>>;
|
|
89
|
+
}, zod.z.core.$strip>;
|
|
90
|
+
email: zod.ZodString;
|
|
91
|
+
name: zod.ZodObject<{
|
|
92
|
+
first: zod.ZodString;
|
|
93
|
+
last: zod.ZodString;
|
|
94
|
+
}, zod.z.core.$strip>;
|
|
95
|
+
phone: zod.ZodObject<{
|
|
96
|
+
number: zod.ZodString;
|
|
97
|
+
code: zod.ZodCustom<"+93" | "+358" | "+355" | "+213" | "+1684" | "+376" | "+244" | "+1264" | "+672" | "+1268" | "+54" | "+374" | "+297" | "+61" | "+43" | "+994" | "+1242" | "+973" | "+880" | "+1246" | "+375" | "+32" | "+501" | "+229" | "+1441" | "+975" | "+591" | "+387" | "+267" | "+55" | "+246" | "+673" | "+359" | "+226" | "+257" | "+855" | "+237" | "+1" | "+238" | "+345" | "+236" | "+235" | "+56" | "+86" | "+57" | "+269" | "+242" | "+243" | "+682" | "+506" | "+225" | "+385" | "+53" | "+357" | "+420" | "+45" | "+253" | "+1767" | "+1849" | "+593" | "+20" | "+503" | "+240" | "+291" | "+372" | "+251" | "+500" | "+298" | "+679" | "+33" | "+594" | "+689" | "+241" | "+220" | "+995" | "+49" | "+233" | "+350" | "+30" | "+299" | "+1473" | "+590" | "+1671" | "+502" | "+44" | "+224" | "+245" | "+592" | "+509" | "+379" | "+504" | "+852" | "+36" | "+354" | "+91" | "+62" | "+98" | "+964" | "+353" | "+972" | "+39" | "+1876" | "+81" | "+962" | "+77" | "+254" | "+686" | "+850" | "+82" | "+965" | "+996" | "+856" | "+371" | "+961" | "+266" | "+231" | "+218" | "+423" | "+370" | "+352" | "+853" | "+389" | "+261" | "+265" | "+60" | "+960" | "+223" | "+356" | "+692" | "+596" | "+222" | "+230" | "+262" | "+52" | "+691" | "+373" | "+377" | "+976" | "+382" | "+1664" | "+212" | "+258" | "+95" | "+264" | "+674" | "+977" | "+31" | "+599" | "+687" | "+64" | "+505" | "+227" | "+234" | "+683" | "+1670" | "+47" | "+968" | "+92" | "+680" | "+970" | "+507" | "+675" | "+595" | "+51" | "+63" | "+872" | "+48" | "+351" | "+1939" | "+974" | "+40" | "+7" | "+250" | "+290" | "+1869" | "+1758" | "+508" | "+1784" | "+685" | "+378" | "+239" | "+966" | "+221" | "+381" | "+248" | "+232" | "+65" | "+421" | "+386" | "+677" | "+252" | "+27" | "+211" | "+34" | "+94" | "+249" | "+597" | "+268" | "+46" | "+41" | "+963" | "+886" | "+992" | "+255" | "+66" | "+670" | "+228" | "+690" | "+676" | "+1868" | "+216" | "+90" | "+993" | "+1649" | "+688" | "+256" | "+380" | "+971" | "+598" | "+998" | "+678" | "+58" | "+84" | "+1284" | "+1340" | "+681" | "+967" | "+260" | "+263", "+93" | "+358" | "+355" | "+213" | "+1684" | "+376" | "+244" | "+1264" | "+672" | "+1268" | "+54" | "+374" | "+297" | "+61" | "+43" | "+994" | "+1242" | "+973" | "+880" | "+1246" | "+375" | "+32" | "+501" | "+229" | "+1441" | "+975" | "+591" | "+387" | "+267" | "+55" | "+246" | "+673" | "+359" | "+226" | "+257" | "+855" | "+237" | "+1" | "+238" | "+345" | "+236" | "+235" | "+56" | "+86" | "+57" | "+269" | "+242" | "+243" | "+682" | "+506" | "+225" | "+385" | "+53" | "+357" | "+420" | "+45" | "+253" | "+1767" | "+1849" | "+593" | "+20" | "+503" | "+240" | "+291" | "+372" | "+251" | "+500" | "+298" | "+679" | "+33" | "+594" | "+689" | "+241" | "+220" | "+995" | "+49" | "+233" | "+350" | "+30" | "+299" | "+1473" | "+590" | "+1671" | "+502" | "+44" | "+224" | "+245" | "+592" | "+509" | "+379" | "+504" | "+852" | "+36" | "+354" | "+91" | "+62" | "+98" | "+964" | "+353" | "+972" | "+39" | "+1876" | "+81" | "+962" | "+77" | "+254" | "+686" | "+850" | "+82" | "+965" | "+996" | "+856" | "+371" | "+961" | "+266" | "+231" | "+218" | "+423" | "+370" | "+352" | "+853" | "+389" | "+261" | "+265" | "+60" | "+960" | "+223" | "+356" | "+692" | "+596" | "+222" | "+230" | "+262" | "+52" | "+691" | "+373" | "+377" | "+976" | "+382" | "+1664" | "+212" | "+258" | "+95" | "+264" | "+674" | "+977" | "+31" | "+599" | "+687" | "+64" | "+505" | "+227" | "+234" | "+683" | "+1670" | "+47" | "+968" | "+92" | "+680" | "+970" | "+507" | "+675" | "+595" | "+51" | "+63" | "+872" | "+48" | "+351" | "+1939" | "+974" | "+40" | "+7" | "+250" | "+290" | "+1869" | "+1758" | "+508" | "+1784" | "+685" | "+378" | "+239" | "+966" | "+221" | "+381" | "+248" | "+232" | "+65" | "+421" | "+386" | "+677" | "+252" | "+27" | "+211" | "+34" | "+94" | "+249" | "+597" | "+268" | "+46" | "+41" | "+963" | "+886" | "+992" | "+255" | "+66" | "+670" | "+228" | "+690" | "+676" | "+1868" | "+216" | "+90" | "+993" | "+1649" | "+688" | "+256" | "+380" | "+971" | "+598" | "+998" | "+678" | "+58" | "+84" | "+1284" | "+1340" | "+681" | "+967" | "+260" | "+263">;
|
|
98
|
+
}, zod.z.core.$strip>;
|
|
99
|
+
owners: zod.ZodArray<zod.ZodObject<{
|
|
100
|
+
first: zod.ZodString;
|
|
101
|
+
last: zod.ZodString;
|
|
102
|
+
}, zod.z.core.$strip>>;
|
|
103
|
+
}, zod.z.core.$strip>>;
|
|
104
|
+
}, zod.z.core.$strip>;
|
|
8
105
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Changeable = void 0;
|
|
4
4
|
const isly_1 = require("isly");
|
|
5
|
+
const zod_1 = require("../zod");
|
|
5
6
|
const Contact_1 = require("./Contact");
|
|
6
7
|
var Changeable;
|
|
7
8
|
(function (Changeable) {
|
|
@@ -9,5 +10,9 @@ var Changeable;
|
|
|
9
10
|
name: isly_1.isly.string().optional(),
|
|
10
11
|
contact: Contact_1.Contact.Creatable.type.optional(),
|
|
11
12
|
});
|
|
13
|
+
Changeable.typeZod = zod_1.zod.object({
|
|
14
|
+
name: zod_1.zod.string().optional(),
|
|
15
|
+
contact: Contact_1.Contact.Creatable.typeZod.optional(),
|
|
16
|
+
});
|
|
12
17
|
})(Changeable || (exports.Changeable = Changeable = {}));
|
|
13
18
|
//# sourceMappingURL=Changeable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Changeable.js","sourceRoot":"","sources":["../../../Organization/Changeable.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,uCAAmC;AAMnC,IAAiB,UAAU,
|
|
1
|
+
{"version":3,"file":"Changeable.js","sourceRoot":"","sources":["../../../Organization/Changeable.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,gCAA4B;AAC5B,uCAAmC;AAMnC,IAAiB,UAAU,CAS1B;AATD,WAAiB,UAAU;IACb,eAAI,GAAG,WAAI,CAAC,MAAM,CAAa;QAC3C,IAAI,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC9B,OAAO,EAAE,iBAAO,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE;KAC1C,CAAC,CAAA;IACW,kBAAO,GAAG,SAAG,CAAC,MAAM,CAAC;QACjC,IAAI,EAAE,SAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC7B,OAAO,EAAE,iBAAO,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,EAAE;KAC7C,CAAC,CAAA;AACH,CAAC,EATgB,UAAU,0BAAV,UAAU,QAS1B"}
|