@pax2pay/model-banking 0.1.593 → 0.1.594
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/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/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/package.json +1 -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
|
}
|
|
@@ -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;
|
|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eAAa,CAAC,IAAI;QAC1B,IAAI,EAAE,QAAA,IAAI,CAAC,IAAI;KACf,CAAC,CAAA;IACF,SAAgB,YAAY,CAAC,KAA+B;QAC3D,OAAO,iBAAO,CAAC,UAAU,CAAC,EAAE,CAAC,KAAK,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"}
|
|
@@ -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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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,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAChE,OAAO,EAAE,EAAE,IAAI,cAAc,EAAE,MAAM,MAAM,CAAA;AAC3C,OAAO,EAAE,IAAI,IAAI,gBAAgB,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../Organization/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,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,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAChE,OAAO,EAAE,EAAE,IAAI,cAAc,EAAE,MAAM,MAAM,CAAA;AAC3C,OAAO,EAAE,IAAI,IAAI,gBAAgB,EAAE,MAAM,QAAQ,CAAA;AAcjD,MAAM,KAAW,YAAY,CAqB5B;AArBD,WAAiB,YAAY;IACd,sBAAS,GAAG,qBAAqB,CAAA;IACjC,uBA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