@pax2pay/model-banking 0.1.213 → 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.
package/Identifier.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { cryptly } from "cryptly"
2
2
  import { isoly } from "isoly"
3
+ import { isly } from "isly"
3
4
 
5
+ export type Identifier = cryptly.Identifier
4
6
  export namespace Identifier {
5
7
  export function generate(
6
8
  date: isoly.DateTime = isoly.DateTime.now(),
@@ -16,4 +18,7 @@ export namespace Identifier {
16
18
  const decoded = cryptly.Base64.decode(identifier, ordering)
17
19
  return isoly.DateTime.create(Number(new BigUint64Array(decoded.slice(decoded.length - 8).buffer)), "milliseconds")
18
20
  }
21
+ export const type = isly.fromIs("Identifier", cryptly.Identifier.is)
22
+ export const is = type.is
23
+ export const flaw = type.flaw
19
24
  }
@@ -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
  }
@@ -1,6 +1,11 @@
1
1
  import { cryptly } from "cryptly";
2
2
  import { isoly } from "isoly";
3
+ import { isly } from "isly";
4
+ export type Identifier = cryptly.Identifier;
3
5
  export declare namespace Identifier {
4
6
  function generate(date?: isoly.DateTime, length?: cryptly.Identifier.Length, ordering?: "ordered" | "reversed"): string;
5
7
  function timeOf(identifier: cryptly.Identifier, ordering?: "ordered" | "reversed"): isoly.DateTime;
8
+ const type: isly.Type<string>;
9
+ const is: isly.Type.IsFunction<string>;
10
+ const flaw: isly.Type.FlawFunction;
6
11
  }
@@ -1,5 +1,6 @@
1
1
  import { cryptly } from "cryptly";
2
2
  import { isoly } from "isoly";
3
+ import { isly } from "isly";
3
4
  export var Identifier;
4
5
  (function (Identifier) {
5
6
  function generate(date = isoly.DateTime.now(), length = 16, ordering = "reversed") {
@@ -11,5 +12,8 @@ export var Identifier;
11
12
  return isoly.DateTime.create(Number(new BigUint64Array(decoded.slice(decoded.length - 8).buffer)), "milliseconds");
12
13
  }
13
14
  Identifier.timeOf = timeOf;
15
+ Identifier.type = isly.fromIs("Identifier", cryptly.Identifier.is);
16
+ Identifier.is = Identifier.type.is;
17
+ Identifier.flaw = Identifier.type.flaw;
14
18
  })(Identifier || (Identifier = {}));
15
19
  //# sourceMappingURL=Identifier.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Identifier.js","sourceRoot":"../","sources":["Identifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAE7B,MAAM,KAAW,UAAU,CAe1B;AAfD,WAAiB,UAAU;IAC1B,SAAgB,QAAQ,CACvB,OAAuB,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,EAC3C,SAAoC,EAAE,EACtC,WAAmC,UAAU;QAE7C,OAAO,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC,CAAA;IACjG,CAAC;IANe,mBAAQ,WAMvB,CAAA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OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,cAAc,CAAC,CAAA;IACnH,CAAC;IANe,iBAAM,SAMrB,CAAA;IACY,eAAI,GAAG,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,CAAA;IACvD,aAAE,GAAG,WAAA,IAAI,CAAC,EAAE,CAAA;IACZ,eAAI,GAAG,WAAA,IAAI,CAAC,IAAI,CAAA;AAC9B,CAAC,EAlBgB,UAAU,KAAV,UAAU,QAkB1B"}
@@ -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.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AAG,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.213",
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",