@pax2pay/model-banking 0.1.92 → 0.1.93

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.
@@ -0,0 +1,23 @@
1
+ import { isoly } from "isoly"
2
+ import { isly } from "isly"
3
+
4
+ export interface GB {
5
+ countryCode: "GB"
6
+ city: string
7
+ zipCode: string
8
+ street: string
9
+ building: string
10
+ }
11
+
12
+ export namespace GB {
13
+ export const name = isoly.CountryCode.Name.en.from("GB")
14
+ export const type = isly.object<GB>({
15
+ countryCode: isly.string("GB"),
16
+ city: isly.string(),
17
+ street: isly.string(),
18
+ building: isly.string(),
19
+ zipCode: isly.string(),
20
+ })
21
+ export const is = type.is
22
+ export const flaw = type.flaw
23
+ }
@@ -0,0 +1,24 @@
1
+ import { isoly } from "isoly"
2
+ import { isly } from "isly"
3
+
4
+ export interface Default {
5
+ countryCode: isoly.CountryCode.Alpha2
6
+ state?: string
7
+ county?: string
8
+ city: string
9
+ zipCode: string
10
+ street: string
11
+ }
12
+
13
+ export namespace Default {
14
+ export const type = isly.object<Default>({
15
+ countryCode: isly.string("GB"),
16
+ state: isly.string().optional(),
17
+ county: isly.string().optional(),
18
+ city: isly.string(),
19
+ street: isly.string(),
20
+ zipCode: isly.string(),
21
+ })
22
+ export const is = type.is
23
+ export const flaw = type.flaw
24
+ }
@@ -0,0 +1,18 @@
1
+ import { isly } from "isly"
2
+
3
+ export interface SE {
4
+ countryCode: "SE"
5
+ zipCode: string
6
+ city: string
7
+ street: string
8
+ }
9
+ export namespace SE {
10
+ export const type = isly.object<SE>({
11
+ countryCode: isly.string("SE"),
12
+ zipCode: isly.string(),
13
+ city: isly.string(),
14
+ street: isly.string(),
15
+ })
16
+ export const is = type.is
17
+ export const flaw = type.flaw
18
+ }
@@ -0,0 +1,12 @@
1
+ import { isly } from "isly"
2
+ import { GB } from "./GB"
3
+ import { Default } from "./General"
4
+ import { SE } from "./SE"
5
+
6
+ export type Address = GB | SE | Default
7
+
8
+ export namespace Address {
9
+ export const type = isly.union<Address, GB, Default>(GB.type, Default.type)
10
+ export const is = type.is
11
+ export const flaw = type.flaw
12
+ }
@@ -0,0 +1,17 @@
1
+ import { isly } from "isly"
2
+ import { Address } from "./Address"
3
+
4
+ export interface Addresses {
5
+ primary: Address
6
+ billing?: Address
7
+ delivery?: Address
8
+ visit?: Address
9
+ }
10
+ export namespace Addresses {
11
+ export const type = isly.object<Addresses>({
12
+ primary: Address.type,
13
+ billing: Address.type.optional(),
14
+ delivery: Address.type.optional(),
15
+ visit: Address.type.optional(),
16
+ })
17
+ }
@@ -1,11 +1,10 @@
1
1
  import { isoly } from "isoly"
2
2
  import { isly } from "isly"
3
+ import { Address as ContactAddress } from "./Address"
4
+ import { Addresses as ContactAddresses } from "./Addresses"
3
5
 
4
6
  export interface Contact {
5
- address: string
6
- city: string
7
- zip: string
8
- country: isoly.CountryCode.Alpha2
7
+ address: Contact.Addresses
9
8
  email: `${string}@${string}.${string}`
10
9
  name: {
11
10
  first: string
@@ -18,11 +17,12 @@ export interface Contact {
18
17
  }
19
18
 
20
19
  export namespace Contact {
20
+ export const Addresses = ContactAddresses
21
+ export type Addresses = ContactAddresses
22
+ export const Address = ContactAddress
23
+ export type Address = ContactAddress
21
24
  export const type = isly.object<Contact>({
22
- address: isly.string(),
23
- city: isly.string(),
24
- zip: isly.string(),
25
- country: isly.fromIs("CountryCode.Alpha2", isoly.CountryCode.Alpha2.is),
25
+ address: Addresses.type,
26
26
  email: isly.string(),
27
27
  name: isly.object<Contact["name"]>({
28
28
  first: isly.string(),
@@ -0,0 +1,14 @@
1
+ import { isly } from "isly";
2
+ export interface GB {
3
+ countryCode: "GB";
4
+ city: string;
5
+ zipCode: string;
6
+ street: string;
7
+ building: string;
8
+ }
9
+ export declare namespace GB {
10
+ const name: string;
11
+ const type: isly.object.ExtendableType<GB>;
12
+ const is: isly.Type.IsFunction<GB>;
13
+ const flaw: isly.Type.FlawFunction;
14
+ }
@@ -0,0 +1,16 @@
1
+ import { isoly } from "isoly";
2
+ import { isly } from "isly";
3
+ export var GB;
4
+ (function (GB) {
5
+ GB.name = isoly.CountryCode.Name.en.from("GB");
6
+ GB.type = isly.object({
7
+ countryCode: isly.string("GB"),
8
+ city: isly.string(),
9
+ street: isly.string(),
10
+ building: isly.string(),
11
+ zipCode: isly.string(),
12
+ });
13
+ GB.is = GB.type.is;
14
+ GB.flaw = GB.type.flaw;
15
+ })(GB || (GB = {}));
16
+ //# sourceMappingURL=GB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GB.js","sourceRoot":"../","sources":["Organization/Contact/Address/GB.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAU3B,MAAM,KAAW,EAAE,CAWlB;AAXD,WAAiB,EAAE;IACL,OAAI,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC3C,OAAI,GAAG,IAAI,CAAC,MAAM,CAAK;QACnC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;QAC9B,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;QACnB,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;QACrB,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE;QACvB,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE;KACtB,CAAC,CAAA;IACW,KAAE,GAAG,GAAA,IAAI,CAAC,EAAE,CAAA;IACZ,OAAI,GAAG,GAAA,IAAI,CAAC,IAAI,CAAA;AAC9B,CAAC,EAXgB,EAAE,KAAF,EAAE,QAWlB"}
@@ -0,0 +1,15 @@
1
+ import { isoly } from "isoly";
2
+ import { isly } from "isly";
3
+ export interface Default {
4
+ countryCode: isoly.CountryCode.Alpha2;
5
+ state?: string;
6
+ county?: string;
7
+ city: string;
8
+ zipCode: string;
9
+ street: string;
10
+ }
11
+ export declare namespace Default {
12
+ const type: isly.object.ExtendableType<Default>;
13
+ const is: isly.Type.IsFunction<Default>;
14
+ const flaw: isly.Type.FlawFunction;
15
+ }
@@ -0,0 +1,15 @@
1
+ import { isly } from "isly";
2
+ export var Default;
3
+ (function (Default) {
4
+ Default.type = isly.object({
5
+ countryCode: isly.string("GB"),
6
+ state: isly.string().optional(),
7
+ county: isly.string().optional(),
8
+ city: isly.string(),
9
+ street: isly.string(),
10
+ zipCode: isly.string(),
11
+ });
12
+ Default.is = Default.type.is;
13
+ Default.flaw = Default.type.flaw;
14
+ })(Default || (Default = {}));
15
+ //# sourceMappingURL=General.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"General.js","sourceRoot":"../","sources":["Organization/Contact/Address/General.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAW3B,MAAM,KAAW,OAAO,CAWvB;AAXD,WAAiB,OAAO;IACV,YAAI,GAAG,IAAI,CAAC,MAAM,CAAU;QACxC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;QAC9B,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC/B,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAChC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;QACnB,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;QACrB,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE;KACtB,CAAC,CAAA;IACW,UAAE,GAAG,QAAA,IAAI,CAAC,EAAE,CAAA;IACZ,YAAI,GAAG,QAAA,IAAI,CAAC,IAAI,CAAA;AAC9B,CAAC,EAXgB,OAAO,KAAP,OAAO,QAWvB"}
@@ -0,0 +1,12 @@
1
+ import { isly } from "isly";
2
+ export interface SE {
3
+ countryCode: "SE";
4
+ zipCode: string;
5
+ city: string;
6
+ street: string;
7
+ }
8
+ export declare namespace SE {
9
+ const type: isly.object.ExtendableType<SE>;
10
+ const is: isly.Type.IsFunction<SE>;
11
+ const flaw: isly.Type.FlawFunction;
12
+ }
@@ -0,0 +1,13 @@
1
+ import { isly } from "isly";
2
+ export var SE;
3
+ (function (SE) {
4
+ SE.type = isly.object({
5
+ countryCode: isly.string("SE"),
6
+ zipCode: isly.string(),
7
+ city: isly.string(),
8
+ street: isly.string(),
9
+ });
10
+ SE.is = SE.type.is;
11
+ SE.flaw = SE.type.flaw;
12
+ })(SE || (SE = {}));
13
+ //# sourceMappingURL=SE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SE.js","sourceRoot":"../","sources":["Organization/Contact/Address/SE.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAQ3B,MAAM,KAAW,EAAE,CASlB;AATD,WAAiB,EAAE;IACL,OAAI,GAAG,IAAI,CAAC,MAAM,CAAK;QACnC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;QAC9B,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE;QACtB,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;QACnB,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;KACrB,CAAC,CAAA;IACW,KAAE,GAAG,GAAA,IAAI,CAAC,EAAE,CAAA;IACZ,OAAI,GAAG,GAAA,IAAI,CAAC,IAAI,CAAA;AAC9B,CAAC,EATgB,EAAE,KAAF,EAAE,QASlB"}
@@ -0,0 +1,10 @@
1
+ import { isly } from "isly";
2
+ import { GB } from "./GB";
3
+ import { Default } from "./General";
4
+ import { SE } from "./SE";
5
+ export type Address = GB | SE | Default;
6
+ export declare namespace Address {
7
+ const type: isly.Type<Address>;
8
+ const is: isly.Type.IsFunction<Address>;
9
+ const flaw: isly.Type.FlawFunction;
10
+ }
@@ -0,0 +1,10 @@
1
+ import { isly } from "isly";
2
+ import { GB } from "./GB";
3
+ import { Default } from "./General";
4
+ export var Address;
5
+ (function (Address) {
6
+ Address.type = isly.union(GB.type, Default.type);
7
+ Address.is = Address.type.is;
8
+ Address.flaw = Address.type.flaw;
9
+ })(Address || (Address = {}));
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"../","sources":["Organization/Contact/Address/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAA;AACzB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAKnC,MAAM,KAAW,OAAO,CAIvB;AAJD,WAAiB,OAAO;IACV,YAAI,GAAG,IAAI,CAAC,KAAK,CAAuB,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9D,UAAE,GAAG,QAAA,IAAI,CAAC,EAAE,CAAA;IACZ,YAAI,GAAG,QAAA,IAAI,CAAC,IAAI,CAAA;AAC9B,CAAC,EAJgB,OAAO,KAAP,OAAO,QAIvB"}
@@ -0,0 +1,11 @@
1
+ import { isly } from "isly";
2
+ import { Address } from "./Address";
3
+ export interface Addresses {
4
+ primary: Address;
5
+ billing?: Address;
6
+ delivery?: Address;
7
+ visit?: Address;
8
+ }
9
+ export declare namespace Addresses {
10
+ const type: isly.object.ExtendableType<Addresses>;
11
+ }
@@ -0,0 +1,12 @@
1
+ import { isly } from "isly";
2
+ import { Address } from "./Address";
3
+ export var Addresses;
4
+ (function (Addresses) {
5
+ Addresses.type = isly.object({
6
+ primary: Address.type,
7
+ billing: Address.type.optional(),
8
+ delivery: Address.type.optional(),
9
+ visit: Address.type.optional(),
10
+ });
11
+ })(Addresses || (Addresses = {}));
12
+ //# sourceMappingURL=Addresses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Addresses.js","sourceRoot":"../","sources":["Organization/Contact/Addresses.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAQnC,MAAM,KAAW,SAAS,CAOzB;AAPD,WAAiB,SAAS;IACZ,cAAI,GAAG,IAAI,CAAC,MAAM,CAAY;QAC1C,OAAO,EAAE,OAAO,CAAC,IAAI;QACrB,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE;QAChC,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE;QACjC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE;KAC9B,CAAC,CAAA;AACH,CAAC,EAPgB,SAAS,KAAT,SAAS,QAOzB"}
@@ -1,10 +1,9 @@
1
1
  import { isoly } from "isoly";
2
2
  import { isly } from "isly";
3
+ import { Address as ContactAddress } from "./Address";
4
+ import { Addresses as ContactAddresses } from "./Addresses";
3
5
  export interface Contact {
4
- address: string;
5
- city: string;
6
- zip: string;
7
- country: isoly.CountryCode.Alpha2;
6
+ address: Contact.Addresses;
8
7
  email: `${string}@${string}.${string}`;
9
8
  name: {
10
9
  first: string;
@@ -16,5 +15,9 @@ export interface Contact {
16
15
  };
17
16
  }
18
17
  export declare namespace Contact {
18
+ const Addresses: typeof ContactAddresses;
19
+ type Addresses = ContactAddresses;
20
+ const Address: typeof ContactAddress;
21
+ type Address = ContactAddress;
19
22
  const type: isly.object.ExtendableType<Contact>;
20
23
  }
@@ -1,12 +1,13 @@
1
1
  import { isoly } from "isoly";
2
2
  import { isly } from "isly";
3
+ import { Address as ContactAddress } from "./Address";
4
+ import { Addresses as ContactAddresses } from "./Addresses";
3
5
  export var Contact;
4
6
  (function (Contact) {
7
+ Contact.Addresses = ContactAddresses;
8
+ Contact.Address = ContactAddress;
5
9
  Contact.type = isly.object({
6
- address: isly.string(),
7
- city: isly.string(),
8
- zip: isly.string(),
9
- country: isly.fromIs("CountryCode.Alpha2", isoly.CountryCode.Alpha2.is),
10
+ address: Contact.Addresses.type,
10
11
  email: isly.string(),
11
12
  name: isly.object({
12
13
  first: isly.string(),
@@ -18,4 +19,4 @@ export var Contact;
18
19
  }),
19
20
  });
20
21
  })(Contact || (Contact = {}));
21
- //# sourceMappingURL=Contact.js.map
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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,EAAE;QACpB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAkB;YAClC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE;YACpB,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;SACnB,CAAC;QACF,KAAK,EAAE,IAAI,CAAC,MAAM,CAAmB;YACpC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;YACrB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC;SACtD,CAAC;KACF,CAAC,CAAA;AACH,CAAC,EAjBgB,OAAO,KAAP,OAAO,QAiBvB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/model-banking",
3
- "version": "0.1.92",
3
+ "version": "0.1.93",
4
4
  "description": "Library containing data model types and functions for the Pax2Pay Banking API.",
5
5
  "author": "Pax2Pay Ltd",
6
6
  "license": "MIT",
@@ -1 +0,0 @@
1
- {"version":3,"file":"Contact.js","sourceRoot":"../","sources":["Organization/Contact.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAkB3B,MAAM,KAAW,OAAO,CAgBvB;AAhBD,WAAiB,OAAO;IACV,YAAI,GAAG,IAAI,CAAC,MAAM,CAAU;QACxC,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE;QACtB,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;QACnB,GAAG,EAAE,IAAI,CAAC,MAAM,EAAE;QAClB,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,oBAAoB,EAAE,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC;QACvE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE;QACpB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAkB;YAClC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE;YACpB,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;SACnB,CAAC;QACF,KAAK,EAAE,IAAI,CAAC,MAAM,CAAmB;YACpC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;YACrB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC;SACtD,CAAC;KACF,CAAC,CAAA;AACH,CAAC,EAhBgB,OAAO,KAAP,OAAO,QAgBvB"}