@pax2pay/model-banking 0.1.0 → 0.1.1

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.
@@ -1,8 +1,6 @@
1
1
  import * as cryptly from "cryptly"
2
2
  import * as isoly from "isoly"
3
3
  import { Rail } from "../../Rail"
4
- import { Realm } from "../../Realm"
5
- import { Supplier } from "../../Supplier"
6
4
  import { Balance } from "../Balance"
7
5
  import { Creatable as AccountCreatable } from "./Creatable"
8
6
 
@@ -17,16 +15,12 @@ export interface Account extends Account.Creatable {
17
15
  export namespace Account {
18
16
  export function is(value: Account | any): value is Account {
19
17
  return (
20
- value &&
21
- typeof value == "object" &&
18
+ Creatable.is({ ...value }) &&
22
19
  cryptly.Identifier.is(value.id, 8) &&
23
20
  isoly.DateTime.is(value.created) &&
24
21
  typeof value.reference == "string" &&
25
- typeof value.name == "string" &&
26
- Realm.is(value.realm) &&
27
- isoly.Currency.is(value.currency) &&
28
- Supplier.is(value.supplier) &&
29
- (value.type == "clientFundAccount" || value.type == "other")
22
+ Array.isArray(value.rail) &&
23
+ value.rail.every(Rail.is)
30
24
  )
31
25
  }
32
26
  export function isIdentifier(value: cryptly.Identifier | any): value is cryptly.Identifier {
@@ -1,21 +1,16 @@
1
1
  import * as cryptly from "cryptly";
2
2
  import * as isoly from "isoly";
3
- import { Realm } from "../../Realm";
4
- import { Supplier } from "../../Supplier";
3
+ import { Rail } from "../../Rail";
5
4
  import { Creatable as AccountCreatable } from "./Creatable";
6
5
  export var Account;
7
6
  (function (Account) {
8
7
  function is(value) {
9
- return (value &&
10
- typeof value == "object" &&
8
+ return (Account.Creatable.is({ ...value }) &&
11
9
  cryptly.Identifier.is(value.id, 8) &&
12
10
  isoly.DateTime.is(value.created) &&
13
11
  typeof value.reference == "string" &&
14
- typeof value.name == "string" &&
15
- Realm.is(value.realm) &&
16
- isoly.Currency.is(value.currency) &&
17
- Supplier.is(value.supplier) &&
18
- (value.type == "clientFundAccount" || value.type == "other"));
12
+ Array.isArray(value.rail) &&
13
+ value.rail.every(Rail.is));
19
14
  }
20
15
  Account.is = is;
21
16
  function isIdentifier(value) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../","sources":["Treasury/Account/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAA;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,OAAO,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAU3D,MAAM,KAAW,OAAO,CAqBvB;AArBD,WAAiB,OAAO;IACvB,SAAgB,EAAE,CAAC,KAAoB;QACtC,OAAO,CACN,KAAK;YACL,OAAO,KAAK,IAAI,QAAQ;YACxB,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;YAClC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;YAChC,OAAO,KAAK,CAAC,SAAS,IAAI,QAAQ;YAClC,OAAO,KAAK,CAAC,IAAI,IAAI,QAAQ;YAC7B,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;YACrB,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC;YACjC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC;YAC3B,CAAC,KAAK,CAAC,IAAI,IAAI,mBAAmB,IAAI,KAAK,CAAC,IAAI,IAAI,OAAO,CAAC,CAC5D,CAAA;IACF,CAAC;IAbe,UAAE,KAajB,CAAA;IACD,SAAgB,YAAY,CAAC,KAA+B;QAC3D,OAAO,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;IACvC,CAAC;IAFe,oBAAY,eAE3B,CAAA;IAGY,iBAAS,GAAG,gBAAgB,CAAA;AAC1C,CAAC,EArBgB,OAAO,KAAP,OAAO,QAqBvB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../","sources":["Treasury/Account/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAA;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEjC,OAAO,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAU3D,MAAM,KAAW,OAAO,CAiBvB;AAjBD,WAAiB,OAAO;IACvB,SAAgB,EAAE,CAAC,KAAoB;QACtC,OAAO,CACN,QAAA,SAAS,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC;YAC1B,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;YAClC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;YAChC,OAAO,KAAK,CAAC,SAAS,IAAI,QAAQ;YAClC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC;YACzB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CACzB,CAAA;IACF,CAAC;IATe,UAAE,KASjB,CAAA;IACD,SAAgB,YAAY,CAAC,KAA+B;QAC3D,OAAO,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;IACvC,CAAC;IAFe,oBAAY,eAE3B,CAAA;IAGY,iBAAS,GAAG,gBAAgB,CAAA;AAC1C,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.0",
3
+ "version": "0.1.1",
4
4
  "description": "Library containing data model types and functions for the Pax2Pay Banking API.",
5
5
  "author": "Pax2Pay Ltd",
6
6
  "license": "MIT",
@@ -54,25 +54,25 @@
54
54
  "clean": "rimraf dist node_modules coverage"
55
55
  },
56
56
  "devDependencies": {
57
- "@types/jest": "^29.4.0",
58
- "@typescript-eslint/eslint-plugin": "5.54.1",
59
- "@typescript-eslint/parser": "5.54.1",
60
- "@cloudflare/workers-types": "^4.20230307.0",
61
- "eslint": "^8.35.0",
57
+ "@types/jest": "^29.5.0",
58
+ "@typescript-eslint/eslint-plugin": "5.57.0",
59
+ "@typescript-eslint/parser": "5.57.0",
60
+ "@cloudflare/workers-types": "^4.20230321.0",
61
+ "eslint": "^8.37.0",
62
62
  "eslint-plugin-prettierx": "github:utily/eslint-plugin-prettierx#utily-20221229",
63
63
  "eslint-plugin-simple-import-sort": "^10.0.0",
64
64
  "jest": "^29.5.0",
65
65
  "prettierx": "github:utily/prettierx#utily-20221229",
66
- "rimraf": "^4.4.0",
66
+ "rimraf": "^4.4.1",
67
67
  "ts-jest": "^29.0.5",
68
- "typescript": "^4.9.5"
68
+ "typescript": "^5.0.2"
69
69
  },
70
70
  "dependencies": {
71
71
  "cloudly-http": "^0.1.3",
72
72
  "cloudly-rest": "^0.1.1",
73
73
  "cryptly": "^3.0.2",
74
74
  "gracely": "^2.0.3",
75
- "isoly": "^2.0.14",
75
+ "isoly": "^2.0.16",
76
76
  "selectively": "^2.0.4"
77
77
  }
78
78
  }