@pax2pay/model-banking 0.1.214 → 0.1.215

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.
@@ -5,13 +5,13 @@ import { Addresses as ContactAddresses } from "./Addresses"
5
5
 
6
6
  export interface Contact {
7
7
  address: Contact.Addresses
8
- email: `${string}@${string}.${string}`
8
+ email: string
9
9
  name: {
10
10
  first: string
11
11
  last: string
12
12
  }
13
13
  phone: {
14
- number: `${number}`
14
+ number: string
15
15
  code: isoly.CallingCode
16
16
  }
17
17
  }
@@ -23,14 +23,15 @@ export namespace Contact {
23
23
  export type Address = ContactAddress
24
24
  export const type = isly.object<Contact>({
25
25
  address: Addresses.type,
26
- email: isly.string(),
26
+ email: isly.string(/^\S+@\S+\.\S+$/),
27
27
  name: isly.object<Contact["name"]>({
28
28
  first: isly.string(),
29
29
  last: isly.string(),
30
30
  }),
31
31
  phone: isly.object<Contact["phone"]>({
32
- number: isly.string(),
32
+ number: isly.string(/^\d+$/),
33
33
  code: isly.fromIs("CallingCode", isoly.CallingCode.is),
34
34
  }),
35
35
  })
36
+ export const is = type.is
36
37
  }
@@ -4,13 +4,13 @@ import { Address as ContactAddress } from "./Address";
4
4
  import { Addresses as ContactAddresses } from "./Addresses";
5
5
  export interface Contact {
6
6
  address: Contact.Addresses;
7
- email: `${string}@${string}.${string}`;
7
+ email: string;
8
8
  name: {
9
9
  first: string;
10
10
  last: string;
11
11
  };
12
12
  phone: {
13
- number: `${number}`;
13
+ number: string;
14
14
  code: isoly.CallingCode;
15
15
  };
16
16
  }
@@ -20,4 +20,5 @@ export declare namespace Contact {
20
20
  const Address: typeof ContactAddress;
21
21
  type Address = ContactAddress;
22
22
  const type: isly.object.ExtendableType<Contact>;
23
+ const is: isly.Type.IsFunction<Contact>;
23
24
  }
@@ -8,15 +8,16 @@ export var Contact;
8
8
  Contact.Address = ContactAddress;
9
9
  Contact.type = isly.object({
10
10
  address: Contact.Addresses.type,
11
- email: isly.string(),
11
+ email: isly.string(/^\S+@\S+\.\S+$/),
12
12
  name: isly.object({
13
13
  first: isly.string(),
14
14
  last: isly.string(),
15
15
  }),
16
16
  phone: isly.object({
17
- number: isly.string(),
17
+ number: isly.string(/^\d+$/),
18
18
  code: isly.fromIs("CallingCode", isoly.CallingCode.is),
19
19
  }),
20
20
  });
21
+ Contact.is = Contact.type.is;
21
22
  })(Contact || (Contact = {}));
22
23
  //# 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,EAAE;QACpB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAkB;YAClC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE;YACpB,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;SACnB,CAAC;QACF,KAAK,EAAE,IAAI,CAAC,MAAM,CAAmB;YACpC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;YACrB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC;SACtD,CAAC;KACF,CAAC,CAAA;AACH,CAAC,EAjBgB,OAAO,KAAP,OAAO,QAiBvB"}
1
+ {"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,CAkBvB;AAlBD,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;IACW,UAAE,GAAG,QAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EAlBgB,OAAO,KAAP,OAAO,QAkBvB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/model-banking",
3
- "version": "0.1.214",
3
+ "version": "0.1.215",
4
4
  "description": "Library containing data model types and functions for the Pax2Pay Banking API.",
5
5
  "author": "Pax2Pay Ltd",
6
6
  "license": "MIT",