@pax2pay/model-banking 0.1.531 → 0.1.533

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.
Files changed (55) hide show
  1. package/Client/Organizations/index.ts +1 -1
  2. package/Organization/Changeable.ts +2 -3
  3. package/Organization/Contact/Creatable.ts +21 -0
  4. package/Organization/Contact/Name.ts +9 -0
  5. package/Organization/Contact/Phone.ts +13 -0
  6. package/Organization/Contact/index.ts +14 -22
  7. package/Organization/Creatable.ts +21 -0
  8. package/Organization/index.ts +5 -9
  9. package/dist/cjs/Client/Organizations/index.d.ts +1 -1
  10. package/dist/cjs/Client/Organizations/index.js.map +1 -1
  11. package/dist/cjs/Organization/Changeable.d.ts +1 -1
  12. package/dist/cjs/Organization/Changeable.js +1 -1
  13. package/dist/cjs/Organization/Changeable.js.map +1 -1
  14. package/dist/cjs/Organization/Contact/Creatable.d.ts +13 -0
  15. package/dist/cjs/Organization/Contact/Creatable.js +18 -0
  16. package/dist/cjs/Organization/Contact/Creatable.js.map +1 -0
  17. package/dist/cjs/Organization/Contact/Name.d.ts +7 -0
  18. package/dist/cjs/Organization/Contact/Name.js +9 -0
  19. package/dist/cjs/Organization/Contact/Name.js.map +1 -0
  20. package/dist/cjs/Organization/Contact/Phone.d.ts +8 -0
  21. package/dist/cjs/Organization/Contact/Phone.js +13 -0
  22. package/dist/cjs/Organization/Contact/Phone.js.map +1 -0
  23. package/dist/cjs/Organization/Contact/index.d.ts +11 -13
  24. package/dist/cjs/Organization/Contact/index.js +9 -9
  25. package/dist/cjs/Organization/Contact/index.js.map +1 -1
  26. package/dist/cjs/Organization/Creatable.d.ts +12 -0
  27. package/dist/cjs/Organization/Creatable.js +17 -0
  28. package/dist/cjs/Organization/Creatable.js.map +1 -0
  29. package/dist/cjs/Organization/index.d.ts +4 -8
  30. package/dist/cjs/Organization/index.js +5 -3
  31. package/dist/cjs/Organization/index.js.map +1 -1
  32. package/dist/mjs/Client/Organizations/index.d.ts +1 -1
  33. package/dist/mjs/Client/Organizations/index.js.map +1 -1
  34. package/dist/mjs/Organization/Changeable.d.ts +1 -1
  35. package/dist/mjs/Organization/Changeable.js +1 -1
  36. package/dist/mjs/Organization/Changeable.js.map +1 -1
  37. package/dist/mjs/Organization/Contact/Creatable.d.ts +13 -0
  38. package/dist/mjs/Organization/Contact/Creatable.js +15 -0
  39. package/dist/mjs/Organization/Contact/Creatable.js.map +1 -0
  40. package/dist/mjs/Organization/Contact/Name.d.ts +7 -0
  41. package/dist/mjs/Organization/Contact/Name.js +6 -0
  42. package/dist/mjs/Organization/Contact/Name.js.map +1 -0
  43. package/dist/mjs/Organization/Contact/Phone.d.ts +8 -0
  44. package/dist/mjs/Organization/Contact/Phone.js +10 -0
  45. package/dist/mjs/Organization/Contact/Phone.js.map +1 -0
  46. package/dist/mjs/Organization/Contact/index.d.ts +11 -13
  47. package/dist/mjs/Organization/Contact/index.js +9 -9
  48. package/dist/mjs/Organization/Contact/index.js.map +1 -1
  49. package/dist/mjs/Organization/Creatable.d.ts +12 -0
  50. package/dist/mjs/Organization/Creatable.js +14 -0
  51. package/dist/mjs/Organization/Creatable.js.map +1 -0
  52. package/dist/mjs/Organization/index.d.ts +4 -8
  53. package/dist/mjs/Organization/index.js +5 -3
  54. package/dist/mjs/Organization/index.js.map +1 -1
  55. package/package.json +1 -1
@@ -18,7 +18,7 @@ export class Organizations {
18
18
  }): Promise<(Organization[] & { cursor?: string | undefined }) | gracely.Error> {
19
19
  return this.client.get<Organization[] & { cursor?: string | undefined }>(`/organization`, options)
20
20
  }
21
- async create(organization: Organization): Promise<Organization | gracely.Error> {
21
+ async create(organization: Organization.Creatable): Promise<Organization | gracely.Error> {
22
22
  return this.client.post<Organization>(`/organization`, organization)
23
23
  }
24
24
  async update(id: string, changeable: Organization.Changeable): Promise<Organization | gracely.Error> {
@@ -3,12 +3,11 @@ import { Contact } from "./Contact"
3
3
 
4
4
  export interface Changeable {
5
5
  name?: string
6
- contact?: Contact
6
+ contact?: Contact.Creatable
7
7
  }
8
-
9
8
  export namespace Changeable {
10
9
  export const type = isly.object<Changeable>({
11
10
  name: isly.string().optional(),
12
- contact: Contact.type.optional(),
11
+ contact: Contact.Creatable.type.optional(),
13
12
  })
14
13
  }
@@ -0,0 +1,21 @@
1
+ import { isly } from "isly"
2
+ import { Addresses } from "./Addresses"
3
+ import { Name } from "./Name"
4
+ import { Phone } from "./Phone"
5
+
6
+ export interface Creatable {
7
+ address: Addresses
8
+ email: string
9
+ name: Name
10
+ phone: Phone
11
+ owners: Name[]
12
+ }
13
+ export namespace Creatable {
14
+ export const type = isly.object<Creatable>({
15
+ address: Addresses.type,
16
+ email: isly.string(/^\S+@\S+\.\S+$/),
17
+ name: Name.type,
18
+ phone: Phone.type,
19
+ owners: Name.type.array({ criteria: "minLength", value: 1 }),
20
+ })
21
+ }
@@ -0,0 +1,9 @@
1
+ import { isly } from "isly"
2
+
3
+ export interface Name {
4
+ first: string
5
+ last: string
6
+ }
7
+ export namespace Name {
8
+ export const type = isly.object<Name>({ first: isly.string(), last: isly.string() })
9
+ }
@@ -0,0 +1,13 @@
1
+ import { isoly } from "isoly"
2
+ import { isly } from "isly"
3
+
4
+ export interface Phone {
5
+ number: string
6
+ code: isoly.CallingCode
7
+ }
8
+ export namespace Phone {
9
+ export const type = isly.object<Phone>({
10
+ number: isly.string(/^\d+$/),
11
+ code: isly.fromIs("CallingCode", isoly.CallingCode.is),
12
+ })
13
+ }
@@ -1,36 +1,28 @@
1
- import { isoly } from "isoly"
2
1
  import { isly } from "isly"
3
2
  import { Address as ContactAddress } from "./Address"
4
3
  import { Addresses as ContactAddresses } from "./Addresses"
4
+ import { Creatable as ContactCreatable } from "./Creatable"
5
+ import { Name as ContactName } from "./Name"
6
+ import { Phone as ContactPhone } from "./Phone"
5
7
 
6
8
  export interface Contact {
7
9
  address: Contact.Addresses
8
10
  email: string
9
- name: {
10
- first: string
11
- last: string
12
- }
13
- phone: {
14
- number: string
15
- code: isoly.CallingCode
16
- }
11
+ name: Contact.Name
12
+ phone: Contact.Phone
13
+ owners?: Contact.Name[]
17
14
  }
18
-
19
15
  export namespace Contact {
20
- export const Addresses = ContactAddresses
21
- export type Addresses = ContactAddresses
22
- export const Address = ContactAddress
23
- export type Address = ContactAddress
16
+ export import Addresses = ContactAddresses
17
+ export import Address = ContactAddress
18
+ export import Name = ContactName
19
+ export import Phone = ContactPhone
20
+ export import Creatable = ContactCreatable
24
21
  export const type = isly.object<Contact>({
25
22
  address: Addresses.type,
26
23
  email: isly.string(/^\S+@\S+\.\S+$/),
27
- name: isly.object<Contact["name"]>({
28
- first: isly.string(),
29
- last: isly.string(),
30
- }),
31
- phone: isly.object<Contact["phone"]>({
32
- number: isly.string(/^\d+$/),
33
- code: isly.fromIs("CallingCode", isoly.CallingCode.is),
34
- }),
24
+ name: Name.type,
25
+ phone: Phone.type,
26
+ owners: Name.type.array().optional(),
35
27
  })
36
28
  }
@@ -0,0 +1,21 @@
1
+ import { isly } from "isly"
2
+ import { Rule } from "../Rule"
3
+ import { type as ruleType } from "../Rule/type"
4
+ import { Contact } from "./Contact"
5
+
6
+ export interface Creatable {
7
+ name: string
8
+ code: string
9
+ rules?: Rule[]
10
+ contact?: Contact.Creatable
11
+ groups?: string[]
12
+ }
13
+ export namespace Creatable {
14
+ export const type = isly.object<Creatable>({
15
+ name: isly.string(),
16
+ code: isly.string(new RegExp(/^[A-Za-z0-9\-_]+$/)),
17
+ rules: ruleType.array().optional(),
18
+ contact: Contact.Creatable.type.optional(),
19
+ groups: isly.string().array().optional(),
20
+ })
21
+ }
@@ -4,6 +4,7 @@ import { Rule } from "../Rule"
4
4
  import { type as ruleType } from "../Rule/type"
5
5
  import { Changeable as OrganizationChangeable } from "./Changeable"
6
6
  import { Contact as OrganizationContact } from "./Contact"
7
+ import { Creatable as OrganizationCreatable } from "./Creatable"
7
8
 
8
9
  export interface Organization {
9
10
  name: string
@@ -14,20 +15,15 @@ export interface Organization {
14
15
  groups?: string[]
15
16
  }
16
17
  export namespace Organization {
18
+ export import Creatable = OrganizationCreatable
19
+ export import Changeable = OrganizationChangeable
20
+ export import Contact = OrganizationContact
17
21
  export const type = isly.object<Organization>({
18
22
  name: isly.string(),
19
23
  code: isly.string(new RegExp(/^[A-Za-z0-9\-_]+$/)),
20
24
  realm: Realm.type,
21
25
  rules: ruleType.array(),
22
- contact: OrganizationContact.type.optional(),
26
+ contact: Contact.type.optional(),
23
27
  groups: isly.string().array().optional(),
24
28
  })
25
- export type Changeable = OrganizationChangeable
26
- export const Changeable = OrganizationChangeable
27
- export type Contact = OrganizationContact
28
- export const Contact = OrganizationContact
29
- export namespace Contact {
30
- export type Address = OrganizationContact.Address
31
- export type Addresses = OrganizationContact.Addresses
32
- }
33
29
  }
@@ -14,6 +14,6 @@ export declare class Organizations {
14
14
  }): Promise<(Organization[] & {
15
15
  cursor?: string | undefined;
16
16
  }) | gracely.Error>;
17
- create(organization: Organization): Promise<Organization | gracely.Error>;
17
+ create(organization: Organization.Creatable): Promise<Organization | gracely.Error>;
18
18
  update(id: string, changeable: Organization.Changeable): Promise<Organization | gracely.Error>;
19
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Client/Organizations/index.ts"],"names":[],"mappings":";;;AAGA,qCAAiC;AACjC,mCAA+B;AAE/B,MAAa,aAAa;IAGI;IAFpB,KAAK,CAAO;IACZ,MAAM,CAAQ;IACvB,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;QAC/C,IAAI,CAAC,KAAK,GAAG,IAAI,aAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACnC,IAAI,CAAC,MAAM,GAAG,IAAI,eAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACtC,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,OAGV;QACA,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAmD,eAAe,EAAE,OAAO,CAAC,CAAA;IACnG,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,YAA0B;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAe,eAAe,EAAE,YAAY,CAAC,CAAA;IACrE,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,UAAmC;QAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAe,iBAAiB,EAAE,EAAE,EAAE,UAAU,CAAC,CAAA;IAC1E,CAAC;CACD;AApBD,sCAoBC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Client/Organizations/index.ts"],"names":[],"mappings":";;;AAGA,qCAAiC;AACjC,mCAA+B;AAE/B,MAAa,aAAa;IAGI;IAFpB,KAAK,CAAO;IACZ,MAAM,CAAQ;IACvB,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;QAC/C,IAAI,CAAC,KAAK,GAAG,IAAI,aAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACnC,IAAI,CAAC,MAAM,GAAG,IAAI,eAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACtC,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,OAGV;QACA,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAmD,eAAe,EAAE,OAAO,CAAC,CAAA;IACnG,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,YAAoC;QAChD,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAe,eAAe,EAAE,YAAY,CAAC,CAAA;IACrE,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,UAAmC;QAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAe,iBAAiB,EAAE,EAAE,EAAE,UAAU,CAAC,CAAA;IAC1E,CAAC;CACD;AApBD,sCAoBC"}
@@ -1,7 +1,7 @@
1
1
  import { Contact } from "./Contact";
2
2
  export interface Changeable {
3
3
  name?: string;
4
- contact?: Contact;
4
+ contact?: Contact.Creatable;
5
5
  }
6
6
  export declare namespace Changeable {
7
7
  const type: import("isly/dist/cjs/object").IslyObject<Changeable, object>;
@@ -7,7 +7,7 @@ var Changeable;
7
7
  (function (Changeable) {
8
8
  Changeable.type = isly_1.isly.object({
9
9
  name: isly_1.isly.string().optional(),
10
- contact: Contact_1.Contact.type.optional(),
10
+ contact: Contact_1.Contact.Creatable.type.optional(),
11
11
  });
12
12
  })(Changeable || (exports.Changeable = Changeable = {}));
13
13
  //# sourceMappingURL=Changeable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Changeable.js","sourceRoot":"","sources":["../../../Organization/Changeable.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,uCAAmC;AAOnC,IAAiB,UAAU,CAK1B;AALD,WAAiB,UAAU;IACb,eAAI,GAAG,WAAI,CAAC,MAAM,CAAa;QAC3C,IAAI,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC9B,OAAO,EAAE,iBAAO,CAAC,IAAI,CAAC,QAAQ,EAAE;KAChC,CAAC,CAAA;AACH,CAAC,EALgB,UAAU,0BAAV,UAAU,QAK1B"}
1
+ {"version":3,"file":"Changeable.js","sourceRoot":"","sources":["../../../Organization/Changeable.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,uCAAmC;AAMnC,IAAiB,UAAU,CAK1B;AALD,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;AACH,CAAC,EALgB,UAAU,0BAAV,UAAU,QAK1B"}
@@ -0,0 +1,13 @@
1
+ import { Addresses } from "./Addresses";
2
+ import { Name } from "./Name";
3
+ import { Phone } from "./Phone";
4
+ export interface Creatable {
5
+ address: Addresses;
6
+ email: string;
7
+ name: Name;
8
+ phone: Phone;
9
+ owners: Name[];
10
+ }
11
+ export declare namespace Creatable {
12
+ const type: import("isly/dist/cjs/object").IslyObject<Creatable, object>;
13
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Creatable = void 0;
4
+ const isly_1 = require("isly");
5
+ const Addresses_1 = require("./Addresses");
6
+ const Name_1 = require("./Name");
7
+ const Phone_1 = require("./Phone");
8
+ var Creatable;
9
+ (function (Creatable) {
10
+ Creatable.type = isly_1.isly.object({
11
+ address: Addresses_1.Addresses.type,
12
+ email: isly_1.isly.string(/^\S+@\S+\.\S+$/),
13
+ name: Name_1.Name.type,
14
+ phone: Phone_1.Phone.type,
15
+ owners: Name_1.Name.type.array({ criteria: "minLength", value: 1 }),
16
+ });
17
+ })(Creatable || (exports.Creatable = Creatable = {}));
18
+ //# sourceMappingURL=Creatable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Creatable.js","sourceRoot":"","sources":["../../../../Organization/Contact/Creatable.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,2CAAuC;AACvC,iCAA6B;AAC7B,mCAA+B;AAS/B,IAAiB,SAAS,CAQzB;AARD,WAAiB,SAAS;IACZ,cAAI,GAAG,WAAI,CAAC,MAAM,CAAY;QAC1C,OAAO,EAAE,qBAAS,CAAC,IAAI;QACvB,KAAK,EAAE,WAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC;QACpC,IAAI,EAAE,WAAI,CAAC,IAAI;QACf,KAAK,EAAE,aAAK,CAAC,IAAI;QACjB,MAAM,EAAE,WAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;KAC5D,CAAC,CAAA;AACH,CAAC,EARgB,SAAS,yBAAT,SAAS,QAQzB"}
@@ -0,0 +1,7 @@
1
+ export interface Name {
2
+ first: string;
3
+ last: string;
4
+ }
5
+ export declare namespace Name {
6
+ const type: import("isly/dist/cjs/object").IslyObject<Name, object>;
7
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Name = void 0;
4
+ const isly_1 = require("isly");
5
+ var Name;
6
+ (function (Name) {
7
+ Name.type = isly_1.isly.object({ first: isly_1.isly.string(), last: isly_1.isly.string() });
8
+ })(Name || (exports.Name = Name = {}));
9
+ //# sourceMappingURL=Name.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Name.js","sourceRoot":"","sources":["../../../../Organization/Contact/Name.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAM3B,IAAiB,IAAI,CAEpB;AAFD,WAAiB,IAAI;IACP,SAAI,GAAG,WAAI,CAAC,MAAM,CAAO,EAAE,KAAK,EAAE,WAAI,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,WAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;AACrF,CAAC,EAFgB,IAAI,oBAAJ,IAAI,QAEpB"}
@@ -0,0 +1,8 @@
1
+ import { isoly } from "isoly";
2
+ export interface Phone {
3
+ number: string;
4
+ code: isoly.CallingCode;
5
+ }
6
+ export declare namespace Phone {
7
+ const type: import("isly/dist/cjs/object").IslyObject<Phone, object>;
8
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Phone = void 0;
4
+ const isoly_1 = require("isoly");
5
+ const isly_1 = require("isly");
6
+ var Phone;
7
+ (function (Phone) {
8
+ Phone.type = isly_1.isly.object({
9
+ number: isly_1.isly.string(/^\d+$/),
10
+ code: isly_1.isly.fromIs("CallingCode", isoly_1.isoly.CallingCode.is),
11
+ });
12
+ })(Phone || (exports.Phone = Phone = {}));
13
+ //# sourceMappingURL=Phone.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Phone.js","sourceRoot":"","sources":["../../../../Organization/Contact/Phone.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,+BAA2B;AAM3B,IAAiB,KAAK,CAKrB;AALD,WAAiB,KAAK;IACR,UAAI,GAAG,WAAI,CAAC,MAAM,CAAQ;QACtC,MAAM,EAAE,WAAI,CAAC,MAAM,CAAC,OAAO,CAAC;QAC5B,IAAI,EAAE,WAAI,CAAC,MAAM,CAAC,aAAa,EAAE,aAAK,CAAC,WAAW,CAAC,EAAE,CAAC;KACtD,CAAC,CAAA;AACH,CAAC,EALgB,KAAK,qBAAL,KAAK,QAKrB"}
@@ -1,22 +1,20 @@
1
- import { isoly } from "isoly";
2
1
  import { Address as ContactAddress } from "./Address";
3
2
  import { Addresses as ContactAddresses } from "./Addresses";
3
+ import { Creatable as ContactCreatable } from "./Creatable";
4
+ import { Name as ContactName } from "./Name";
5
+ import { Phone as ContactPhone } from "./Phone";
4
6
  export interface Contact {
5
7
  address: Contact.Addresses;
6
8
  email: string;
7
- name: {
8
- first: string;
9
- last: string;
10
- };
11
- phone: {
12
- number: string;
13
- code: isoly.CallingCode;
14
- };
9
+ name: Contact.Name;
10
+ phone: Contact.Phone;
11
+ owners?: Contact.Name[];
15
12
  }
16
13
  export declare namespace Contact {
17
- const Addresses: typeof ContactAddresses;
18
- type Addresses = ContactAddresses;
19
- const Address: typeof ContactAddress;
20
- type Address = ContactAddress;
14
+ export import Addresses = ContactAddresses;
15
+ export import Address = ContactAddress;
16
+ export import Name = ContactName;
17
+ export import Phone = ContactPhone;
18
+ export import Creatable = ContactCreatable;
21
19
  const type: import("isly/dist/cjs/object").IslyObject<Contact, object>;
22
20
  }
@@ -1,25 +1,25 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Contact = void 0;
4
- const isoly_1 = require("isoly");
5
4
  const isly_1 = require("isly");
6
5
  const Address_1 = require("./Address");
7
6
  const Addresses_1 = require("./Addresses");
7
+ const Creatable_1 = require("./Creatable");
8
+ const Name_1 = require("./Name");
9
+ const Phone_1 = require("./Phone");
8
10
  var Contact;
9
11
  (function (Contact) {
10
12
  Contact.Addresses = Addresses_1.Addresses;
11
13
  Contact.Address = Address_1.Address;
14
+ Contact.Name = Name_1.Name;
15
+ Contact.Phone = Phone_1.Phone;
16
+ Contact.Creatable = Creatable_1.Creatable;
12
17
  Contact.type = isly_1.isly.object({
13
18
  address: Contact.Addresses.type,
14
19
  email: isly_1.isly.string(/^\S+@\S+\.\S+$/),
15
- name: isly_1.isly.object({
16
- first: isly_1.isly.string(),
17
- last: isly_1.isly.string(),
18
- }),
19
- phone: isly_1.isly.object({
20
- number: isly_1.isly.string(/^\d+$/),
21
- code: isly_1.isly.fromIs("CallingCode", isoly_1.isoly.CallingCode.is),
22
- }),
20
+ name: Contact.Name.type,
21
+ phone: Contact.Phone.type,
22
+ owners: Contact.Name.type.array().optional(),
23
23
  });
24
24
  })(Contact || (exports.Contact = Contact = {}));
25
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Organization/Contact/index.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,+BAA2B;AAC3B,uCAAqD;AACrD,2CAA2D;AAe3D,IAAiB,OAAO,CAiBvB;AAjBD,WAAiB,OAAO;IACV,iBAAS,GAAG,qBAAgB,CAAA;IAE5B,eAAO,GAAG,iBAAc,CAAA;IAExB,YAAI,GAAG,WAAI,CAAC,MAAM,CAAU;QACxC,OAAO,EAAE,QAAA,SAAS,CAAC,IAAI;QACvB,KAAK,EAAE,WAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC;QACpC,IAAI,EAAE,WAAI,CAAC,MAAM,CAAkB;YAClC,KAAK,EAAE,WAAI,CAAC,MAAM,EAAE;YACpB,IAAI,EAAE,WAAI,CAAC,MAAM,EAAE;SACnB,CAAC;QACF,KAAK,EAAE,WAAI,CAAC,MAAM,CAAmB;YACpC,MAAM,EAAE,WAAI,CAAC,MAAM,CAAC,OAAO,CAAC;YAC5B,IAAI,EAAE,WAAI,CAAC,MAAM,CAAC,aAAa,EAAE,aAAK,CAAC,WAAW,CAAC,EAAE,CAAC;SACtD,CAAC;KACF,CAAC,CAAA;AACH,CAAC,EAjBgB,OAAO,uBAAP,OAAO,QAiBvB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Organization/Contact/index.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,uCAAqD;AACrD,2CAA2D;AAC3D,2CAA2D;AAC3D,iCAA4C;AAC5C,mCAA+C;AAS/C,IAAiB,OAAO,CAavB;AAbD,WAAiB,OAAO;IACT,iBAAS,GAAG,qBAAgB,CAAA;IAC5B,eAAO,GAAG,iBAAc,CAAA;IACxB,YAAI,GAAG,WAAW,CAAA;IAClB,aAAK,GAAG,aAAY,CAAA;IACpB,iBAAS,GAAG,qBAAgB,CAAA;IAC7B,YAAI,GAAG,WAAI,CAAC,MAAM,CAAU;QACxC,OAAO,EAAE,QAAA,SAAS,CAAC,IAAI;QACvB,KAAK,EAAE,WAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC;QACpC,IAAI,EAAE,QAAA,IAAI,CAAC,IAAI;QACf,KAAK,EAAE,QAAA,KAAK,CAAC,IAAI;QACjB,MAAM,EAAE,QAAA,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;KACpC,CAAC,CAAA;AACH,CAAC,EAbgB,OAAO,uBAAP,OAAO,QAavB"}
@@ -0,0 +1,12 @@
1
+ import { Rule } from "../Rule";
2
+ import { Contact } from "./Contact";
3
+ export interface Creatable {
4
+ name: string;
5
+ code: string;
6
+ rules?: Rule[];
7
+ contact?: Contact.Creatable;
8
+ groups?: string[];
9
+ }
10
+ export declare namespace Creatable {
11
+ const type: import("isly/dist/cjs/object").IslyObject<Rule.State.Organization.Creatable, object>;
12
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Creatable = void 0;
4
+ const isly_1 = require("isly");
5
+ const type_1 = require("../Rule/type");
6
+ const Contact_1 = require("./Contact");
7
+ var Creatable;
8
+ (function (Creatable) {
9
+ Creatable.type = isly_1.isly.object({
10
+ name: isly_1.isly.string(),
11
+ code: isly_1.isly.string(new RegExp(/^[A-Za-z0-9\-_]+$/)),
12
+ rules: type_1.type.array().optional(),
13
+ contact: Contact_1.Contact.Creatable.type.optional(),
14
+ groups: isly_1.isly.string().array().optional(),
15
+ });
16
+ })(Creatable || (exports.Creatable = Creatable = {}));
17
+ //# sourceMappingURL=Creatable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Creatable.js","sourceRoot":"","sources":["../../../Organization/Creatable.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAE3B,uCAA+C;AAC/C,uCAAmC;AASnC,IAAiB,SAAS,CAQzB;AARD,WAAiB,SAAS;IACZ,cAAI,GAAG,WAAI,CAAC,MAAM,CAAY;QAC1C,IAAI,EAAE,WAAI,CAAC,MAAM,EAAE;QACnB,IAAI,EAAE,WAAI,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAAC;QAClD,KAAK,EAAE,WAAQ,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QAClC,OAAO,EAAE,iBAAO,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE;QAC1C,MAAM,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;KACxC,CAAC,CAAA;AACH,CAAC,EARgB,SAAS,yBAAT,SAAS,QAQzB"}
@@ -2,6 +2,7 @@ import { Realm } from "../Realm";
2
2
  import { Rule } from "../Rule";
3
3
  import { Changeable as OrganizationChangeable } from "./Changeable";
4
4
  import { Contact as OrganizationContact } from "./Contact";
5
+ import { Creatable as OrganizationCreatable } from "./Creatable";
5
6
  export interface Organization {
6
7
  name: string;
7
8
  code: string;
@@ -11,13 +12,8 @@ export interface Organization {
11
12
  groups?: string[];
12
13
  }
13
14
  export declare namespace Organization {
15
+ export import Creatable = OrganizationCreatable;
16
+ export import Changeable = OrganizationChangeable;
17
+ export import Contact = OrganizationContact;
14
18
  const type: import("isly/dist/cjs/object").IslyObject<Rule.State.Organization, object>;
15
- type Changeable = OrganizationChangeable;
16
- const Changeable: typeof OrganizationChangeable;
17
- type Contact = OrganizationContact;
18
- const Contact: typeof OrganizationContact;
19
- namespace Contact {
20
- type Address = OrganizationContact.Address;
21
- type Addresses = OrganizationContact.Addresses;
22
- }
23
19
  }
@@ -6,17 +6,19 @@ const Realm_1 = require("../Realm");
6
6
  const type_1 = require("../Rule/type");
7
7
  const Changeable_1 = require("./Changeable");
8
8
  const Contact_1 = require("./Contact");
9
+ const Creatable_1 = require("./Creatable");
9
10
  var Organization;
10
11
  (function (Organization) {
12
+ Organization.Creatable = Creatable_1.Creatable;
13
+ Organization.Changeable = Changeable_1.Changeable;
14
+ Organization.Contact = Contact_1.Contact;
11
15
  Organization.type = isly_1.isly.object({
12
16
  name: isly_1.isly.string(),
13
17
  code: isly_1.isly.string(new RegExp(/^[A-Za-z0-9\-_]+$/)),
14
18
  realm: Realm_1.Realm.type,
15
19
  rules: type_1.type.array(),
16
- contact: Contact_1.Contact.type.optional(),
20
+ contact: Organization.Contact.type.optional(),
17
21
  groups: isly_1.isly.string().array().optional(),
18
22
  });
19
- Organization.Changeable = Changeable_1.Changeable;
20
- Organization.Contact = Contact_1.Contact;
21
23
  })(Organization || (exports.Organization = Organization = {}));
22
24
  //# 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;AAU1D,IAAiB,YAAY,CAiB5B;AAjBD,WAAiB,YAAY;IACf,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,OAAO,EAAE,iBAAmB,CAAC,IAAI,CAAC,QAAQ,EAAE;QAC5C,MAAM,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;KACxC,CAAC,CAAA;IAEW,uBAAU,GAAG,uBAAsB,CAAA;IAEnC,oBAAO,GAAG,iBAAmB,CAAA;AAK3C,CAAC,EAjBgB,YAAY,4BAAZ,YAAY,QAiB5B"}
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;AAUhE,IAAiB,YAAY,CAY5B;AAZD,WAAiB,YAAY;IACd,sBAAS,GAAG,qBAAqB,CAAA;IACjC,uBAAU,GAAG,uBAAsB,CAAA;IACnC,oBAAO,GAAG,iBAAmB,CAAA;IAC9B,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,OAAO,EAAE,aAAA,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE;QAChC,MAAM,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;KACxC,CAAC,CAAA;AACH,CAAC,EAZgB,YAAY,4BAAZ,YAAY,QAY5B"}
@@ -14,6 +14,6 @@ export declare class Organizations {
14
14
  }): Promise<(Organization[] & {
15
15
  cursor?: string | undefined;
16
16
  }) | gracely.Error>;
17
- create(organization: Organization): Promise<Organization | gracely.Error>;
17
+ create(organization: Organization.Creatable): Promise<Organization | gracely.Error>;
18
18
  update(id: string, changeable: Organization.Changeable): Promise<Organization | gracely.Error>;
19
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Client/Organizations/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,MAAM,OAAO,aAAa;IAGI;IAFpB,KAAK,CAAO;IACZ,MAAM,CAAQ;IACvB,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;QAC/C,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACnC,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACtC,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,OAGV;QACA,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAmD,eAAe,EAAE,OAAO,CAAC,CAAA;IACnG,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,YAA0B;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAe,eAAe,EAAE,YAAY,CAAC,CAAA;IACrE,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,UAAmC;QAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAe,iBAAiB,EAAE,EAAE,EAAE,UAAU,CAAC,CAAA;IAC1E,CAAC;CACD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Client/Organizations/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,MAAM,OAAO,aAAa;IAGI;IAFpB,KAAK,CAAO;IACZ,MAAM,CAAQ;IACvB,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;QAC/C,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACnC,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACtC,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,OAGV;QACA,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAmD,eAAe,EAAE,OAAO,CAAC,CAAA;IACnG,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,YAAoC;QAChD,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAe,eAAe,EAAE,YAAY,CAAC,CAAA;IACrE,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,UAAmC;QAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAe,iBAAiB,EAAE,EAAE,EAAE,UAAU,CAAC,CAAA;IAC1E,CAAC;CACD"}
@@ -1,7 +1,7 @@
1
1
  import { Contact } from "./Contact";
2
2
  export interface Changeable {
3
3
  name?: string;
4
- contact?: Contact;
4
+ contact?: Contact.Creatable;
5
5
  }
6
6
  export declare namespace Changeable {
7
7
  const type: import("isly/dist/cjs/object").IslyObject<Changeable, object>;
@@ -4,7 +4,7 @@ export var Changeable;
4
4
  (function (Changeable) {
5
5
  Changeable.type = isly.object({
6
6
  name: isly.string().optional(),
7
- contact: Contact.type.optional(),
7
+ contact: Contact.Creatable.type.optional(),
8
8
  });
9
9
  })(Changeable || (Changeable = {}));
10
10
  //# sourceMappingURL=Changeable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Changeable.js","sourceRoot":"","sources":["../../../Organization/Changeable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAOnC,MAAM,KAAW,UAAU,CAK1B;AALD,WAAiB,UAAU;IACb,eAAI,GAAG,IAAI,CAAC,MAAM,CAAa;QAC3C,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC9B,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE;KAChC,CAAC,CAAA;AACH,CAAC,EALgB,UAAU,KAAV,UAAU,QAK1B"}
1
+ {"version":3,"file":"Changeable.js","sourceRoot":"","sources":["../../../Organization/Changeable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAMnC,MAAM,KAAW,UAAU,CAK1B;AALD,WAAiB,UAAU;IACb,eAAI,GAAG,IAAI,CAAC,MAAM,CAAa;QAC3C,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC9B,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE;KAC1C,CAAC,CAAA;AACH,CAAC,EALgB,UAAU,KAAV,UAAU,QAK1B"}
@@ -0,0 +1,13 @@
1
+ import { Addresses } from "./Addresses";
2
+ import { Name } from "./Name";
3
+ import { Phone } from "./Phone";
4
+ export interface Creatable {
5
+ address: Addresses;
6
+ email: string;
7
+ name: Name;
8
+ phone: Phone;
9
+ owners: Name[];
10
+ }
11
+ export declare namespace Creatable {
12
+ const type: import("isly/dist/cjs/object").IslyObject<Creatable, object>;
13
+ }
@@ -0,0 +1,15 @@
1
+ import { isly } from "isly";
2
+ import { Addresses } from "./Addresses";
3
+ import { Name } from "./Name";
4
+ import { Phone } from "./Phone";
5
+ export var Creatable;
6
+ (function (Creatable) {
7
+ Creatable.type = isly.object({
8
+ address: Addresses.type,
9
+ email: isly.string(/^\S+@\S+\.\S+$/),
10
+ name: Name.type,
11
+ phone: Phone.type,
12
+ owners: Name.type.array({ criteria: "minLength", value: 1 }),
13
+ });
14
+ })(Creatable || (Creatable = {}));
15
+ //# sourceMappingURL=Creatable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Creatable.js","sourceRoot":"","sources":["../../../../Organization/Contact/Creatable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAS/B,MAAM,KAAW,SAAS,CAQzB;AARD,WAAiB,SAAS;IACZ,cAAI,GAAG,IAAI,CAAC,MAAM,CAAY;QAC1C,OAAO,EAAE,SAAS,CAAC,IAAI;QACvB,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC;QACpC,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,KAAK,EAAE,KAAK,CAAC,IAAI;QACjB,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;KAC5D,CAAC,CAAA;AACH,CAAC,EARgB,SAAS,KAAT,SAAS,QAQzB"}
@@ -0,0 +1,7 @@
1
+ export interface Name {
2
+ first: string;
3
+ last: string;
4
+ }
5
+ export declare namespace Name {
6
+ const type: import("isly/dist/cjs/object").IslyObject<Name, object>;
7
+ }
@@ -0,0 +1,6 @@
1
+ import { isly } from "isly";
2
+ export var Name;
3
+ (function (Name) {
4
+ Name.type = isly.object({ first: isly.string(), last: isly.string() });
5
+ })(Name || (Name = {}));
6
+ //# sourceMappingURL=Name.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Name.js","sourceRoot":"","sources":["../../../../Organization/Contact/Name.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAM3B,MAAM,KAAW,IAAI,CAEpB;AAFD,WAAiB,IAAI;IACP,SAAI,GAAG,IAAI,CAAC,MAAM,CAAO,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;AACrF,CAAC,EAFgB,IAAI,KAAJ,IAAI,QAEpB"}
@@ -0,0 +1,8 @@
1
+ import { isoly } from "isoly";
2
+ export interface Phone {
3
+ number: string;
4
+ code: isoly.CallingCode;
5
+ }
6
+ export declare namespace Phone {
7
+ const type: import("isly/dist/cjs/object").IslyObject<Phone, object>;
8
+ }
@@ -0,0 +1,10 @@
1
+ import { isoly } from "isoly";
2
+ import { isly } from "isly";
3
+ export var Phone;
4
+ (function (Phone) {
5
+ Phone.type = isly.object({
6
+ number: isly.string(/^\d+$/),
7
+ code: isly.fromIs("CallingCode", isoly.CallingCode.is),
8
+ });
9
+ })(Phone || (Phone = {}));
10
+ //# sourceMappingURL=Phone.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Phone.js","sourceRoot":"","sources":["../../../../Organization/Contact/Phone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAM3B,MAAM,KAAW,KAAK,CAKrB;AALD,WAAiB,KAAK;IACR,UAAI,GAAG,IAAI,CAAC,MAAM,CAAQ;QACtC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;QAC5B,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC;KACtD,CAAC,CAAA;AACH,CAAC,EALgB,KAAK,KAAL,KAAK,QAKrB"}
@@ -1,22 +1,20 @@
1
- import { isoly } from "isoly";
2
1
  import { Address as ContactAddress } from "./Address";
3
2
  import { Addresses as ContactAddresses } from "./Addresses";
3
+ import { Creatable as ContactCreatable } from "./Creatable";
4
+ import { Name as ContactName } from "./Name";
5
+ import { Phone as ContactPhone } from "./Phone";
4
6
  export interface Contact {
5
7
  address: Contact.Addresses;
6
8
  email: string;
7
- name: {
8
- first: string;
9
- last: string;
10
- };
11
- phone: {
12
- number: string;
13
- code: isoly.CallingCode;
14
- };
9
+ name: Contact.Name;
10
+ phone: Contact.Phone;
11
+ owners?: Contact.Name[];
15
12
  }
16
13
  export declare namespace Contact {
17
- const Addresses: typeof ContactAddresses;
18
- type Addresses = ContactAddresses;
19
- const Address: typeof ContactAddress;
20
- type Address = ContactAddress;
14
+ export import Addresses = ContactAddresses;
15
+ export import Address = ContactAddress;
16
+ export import Name = ContactName;
17
+ export import Phone = ContactPhone;
18
+ export import Creatable = ContactCreatable;
21
19
  const type: import("isly/dist/cjs/object").IslyObject<Contact, object>;
22
20
  }
@@ -1,22 +1,22 @@
1
- import { isoly } from "isoly";
2
1
  import { isly } from "isly";
3
2
  import { Address as ContactAddress } from "./Address";
4
3
  import { Addresses as ContactAddresses } from "./Addresses";
4
+ import { Creatable as ContactCreatable } from "./Creatable";
5
+ import { Name as ContactName } from "./Name";
6
+ import { Phone as ContactPhone } from "./Phone";
5
7
  export var Contact;
6
8
  (function (Contact) {
7
9
  Contact.Addresses = ContactAddresses;
8
10
  Contact.Address = ContactAddress;
11
+ Contact.Name = ContactName;
12
+ Contact.Phone = ContactPhone;
13
+ Contact.Creatable = ContactCreatable;
9
14
  Contact.type = isly.object({
10
15
  address: Contact.Addresses.type,
11
16
  email: isly.string(/^\S+@\S+\.\S+$/),
12
- name: isly.object({
13
- first: isly.string(),
14
- last: isly.string(),
15
- }),
16
- phone: isly.object({
17
- number: isly.string(/^\d+$/),
18
- code: isly.fromIs("CallingCode", isoly.CallingCode.is),
19
- }),
17
+ name: Contact.Name.type,
18
+ phone: Contact.Phone.type,
19
+ owners: Contact.Name.type.array().optional(),
20
20
  });
21
21
  })(Contact || (Contact = {}));
22
22
  //# sourceMappingURL=index.js.map
@@ -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,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,CAAC,gBAAgB,CAAC;QACpC,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,CAAC,OAAO,CAAC;YAC5B,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
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Organization/Contact/index.ts"],"names":[],"mappings":"AAAA,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;AAC3D,OAAO,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC3D,OAAO,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,QAAQ,CAAA;AAC5C,OAAO,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,SAAS,CAAA;AAS/C,MAAM,KAAW,OAAO,CAavB;AAbD,WAAiB,OAAO;IACT,iBAAS,GAAG,gBAAgB,CAAA;IAC5B,eAAO,GAAG,cAAc,CAAA;IACxB,YAAI,GAAG,WAAW,CAAA;IAClB,aAAK,GAAG,YAAY,CAAA;IACpB,iBAAS,GAAG,gBAAgB,CAAA;IAC7B,YAAI,GAAG,IAAI,CAAC,MAAM,CAAU;QACxC,OAAO,EAAE,QAAA,SAAS,CAAC,IAAI;QACvB,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC;QACpC,IAAI,EAAE,QAAA,IAAI,CAAC,IAAI;QACf,KAAK,EAAE,QAAA,KAAK,CAAC,IAAI;QACjB,MAAM,EAAE,QAAA,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;KACpC,CAAC,CAAA;AACH,CAAC,EAbgB,OAAO,KAAP,OAAO,QAavB"}
@@ -0,0 +1,12 @@
1
+ import { Rule } from "../Rule";
2
+ import { Contact } from "./Contact";
3
+ export interface Creatable {
4
+ name: string;
5
+ code: string;
6
+ rules?: Rule[];
7
+ contact?: Contact.Creatable;
8
+ groups?: string[];
9
+ }
10
+ export declare namespace Creatable {
11
+ const type: import("isly/dist/cjs/object").IslyObject<Rule.State.Organization.Creatable, object>;
12
+ }
@@ -0,0 +1,14 @@
1
+ import { isly } from "isly";
2
+ import { type as ruleType } from "../Rule/type";
3
+ import { Contact } from "./Contact";
4
+ export var Creatable;
5
+ (function (Creatable) {
6
+ Creatable.type = isly.object({
7
+ name: isly.string(),
8
+ code: isly.string(new RegExp(/^[A-Za-z0-9\-_]+$/)),
9
+ rules: ruleType.array().optional(),
10
+ contact: Contact.Creatable.type.optional(),
11
+ groups: isly.string().array().optional(),
12
+ });
13
+ })(Creatable || (Creatable = {}));
14
+ //# sourceMappingURL=Creatable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Creatable.js","sourceRoot":"","sources":["../../../Organization/Creatable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AASnC,MAAM,KAAW,SAAS,CAQzB;AARD,WAAiB,SAAS;IACZ,cAAI,GAAG,IAAI,CAAC,MAAM,CAAY;QAC1C,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;QACnB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAAC;QAClD,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QAClC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE;QAC1C,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;KACxC,CAAC,CAAA;AACH,CAAC,EARgB,SAAS,KAAT,SAAS,QAQzB"}
@@ -2,6 +2,7 @@ import { Realm } from "../Realm";
2
2
  import { Rule } from "../Rule";
3
3
  import { Changeable as OrganizationChangeable } from "./Changeable";
4
4
  import { Contact as OrganizationContact } from "./Contact";
5
+ import { Creatable as OrganizationCreatable } from "./Creatable";
5
6
  export interface Organization {
6
7
  name: string;
7
8
  code: string;
@@ -11,13 +12,8 @@ export interface Organization {
11
12
  groups?: string[];
12
13
  }
13
14
  export declare namespace Organization {
15
+ export import Creatable = OrganizationCreatable;
16
+ export import Changeable = OrganizationChangeable;
17
+ export import Contact = OrganizationContact;
14
18
  const type: import("isly/dist/cjs/object").IslyObject<Rule.State.Organization, object>;
15
- type Changeable = OrganizationChangeable;
16
- const Changeable: typeof OrganizationChangeable;
17
- type Contact = OrganizationContact;
18
- const Contact: typeof OrganizationContact;
19
- namespace Contact {
20
- type Address = OrganizationContact.Address;
21
- type Addresses = OrganizationContact.Addresses;
22
- }
23
19
  }
@@ -3,17 +3,19 @@ import { Realm } from "../Realm";
3
3
  import { type as ruleType } from "../Rule/type";
4
4
  import { Changeable as OrganizationChangeable } from "./Changeable";
5
5
  import { Contact as OrganizationContact } from "./Contact";
6
+ import { Creatable as OrganizationCreatable } from "./Creatable";
6
7
  export var Organization;
7
8
  (function (Organization) {
9
+ Organization.Creatable = OrganizationCreatable;
10
+ Organization.Changeable = OrganizationChangeable;
11
+ Organization.Contact = OrganizationContact;
8
12
  Organization.type = isly.object({
9
13
  name: isly.string(),
10
14
  code: isly.string(new RegExp(/^[A-Za-z0-9\-_]+$/)),
11
15
  realm: Realm.type,
12
16
  rules: ruleType.array(),
13
- contact: OrganizationContact.type.optional(),
17
+ contact: Organization.Contact.type.optional(),
14
18
  groups: isly.string().array().optional(),
15
19
  });
16
- Organization.Changeable = OrganizationChangeable;
17
- Organization.Contact = OrganizationContact;
18
20
  })(Organization || (Organization = {}));
19
21
  //# 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;AAU1D,MAAM,KAAW,YAAY,CAiB5B;AAjBD,WAAiB,YAAY;IACf,iBAAI,GAAG,IAAI,CAAC,MAAM,CAAe;QAC7C,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;QACnB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAAC;QAClD,KAAK,EAAE,KAAK,CAAC,IAAI;QACjB,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE;QACvB,OAAO,EAAE,mBAAmB,CAAC,IAAI,CAAC,QAAQ,EAAE;QAC5C,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;KACxC,CAAC,CAAA;IAEW,uBAAU,GAAG,sBAAsB,CAAA;IAEnC,oBAAO,GAAG,mBAAmB,CAAA;AAK3C,CAAC,EAjBgB,YAAY,KAAZ,YAAY,QAiB5B"}
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;AAUhE,MAAM,KAAW,YAAY,CAY5B;AAZD,WAAiB,YAAY;IACd,sBAAS,GAAG,qBAAqB,CAAA;IACjC,uBAAU,GAAG,sBAAsB,CAAA;IACnC,oBAAO,GAAG,mBAAmB,CAAA;IAC9B,iBAAI,GAAG,IAAI,CAAC,MAAM,CAAe;QAC7C,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;QACnB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAAC;QAClD,KAAK,EAAE,KAAK,CAAC,IAAI;QACjB,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE;QACvB,OAAO,EAAE,aAAA,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE;QAChC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;KACxC,CAAC,CAAA;AACH,CAAC,EAZgB,YAAY,KAAZ,YAAY,QAY5B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/model-banking",
3
- "version": "0.1.531",
3
+ "version": "0.1.533",
4
4
  "description": "Library containing data model types and functions for the Pax2Pay Banking API.",
5
5
  "author": "Pax2Pay Ltd",
6
6
  "license": "MIT",