@pax2pay/model-banking 0.1.234 → 0.1.235

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/Card/Stack.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { isly } from "isly"
2
+ import { Realm } from "../Realm"
2
3
 
3
4
  export type Stack = typeof Stack.stacks[number]
4
5
 
@@ -13,4 +14,7 @@ export namespace Stack {
13
14
  export const type = isly.string(stacks)
14
15
  export const is = type.is
15
16
  export const flaw = type.flaw
17
+ export function toRealm(stack: Stack): Realm {
18
+ return stack.split("-")[0] as Realm
19
+ }
16
20
  }
@@ -1,8 +1,10 @@
1
1
  import { isly } from "isly";
2
+ import { Realm } from "../Realm";
2
3
  export type Stack = typeof Stack.stacks[number];
3
4
  export declare namespace Stack {
4
5
  const stacks: readonly ["test-paxgiro", "test-tpl-paxgiro", "testUK-marqeta", "testUK-tpl-marqeta", "uk-mc-tpl-marqeta"];
5
6
  const type: isly.Type<"test-paxgiro" | "test-tpl-paxgiro" | "testUK-marqeta" | "testUK-tpl-marqeta" | "uk-mc-tpl-marqeta">;
6
7
  const is: isly.Type.IsFunction<"test-paxgiro" | "test-tpl-paxgiro" | "testUK-marqeta" | "testUK-tpl-marqeta" | "uk-mc-tpl-marqeta">;
7
8
  const flaw: isly.Type.FlawFunction;
9
+ function toRealm(stack: Stack): Realm;
8
10
  }
@@ -11,5 +11,9 @@ export var Stack;
11
11
  Stack.type = isly.string(Stack.stacks);
12
12
  Stack.is = Stack.type.is;
13
13
  Stack.flaw = Stack.type.flaw;
14
+ function toRealm(stack) {
15
+ return stack.split("-")[0];
16
+ }
17
+ Stack.toRealm = toRealm;
14
18
  })(Stack || (Stack = {}));
15
19
  //# sourceMappingURL=Stack.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Stack.js","sourceRoot":"../","sources":["Card/Stack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAI3B,MAAM,KAAW,KAAK,CAWrB;AAXD,WAAiB,KAAK;IACR,YAAM,GAAG;QACrB,cAAc;QACd,kBAAkB;QAClB,gBAAgB;QAChB,oBAAoB;QACpB,mBAAmB;KACV,CAAA;IACG,UAAI,GAAG,IAAI,CAAC,MAAM,CAAC,MAAA,MAAM,CAAC,CAAA;IAC1B,QAAE,GAAG,MAAA,IAAI,CAAC,EAAE,CAAA;IACZ,UAAI,GAAG,MAAA,IAAI,CAAC,IAAI,CAAA;AAC9B,CAAC,EAXgB,KAAK,KAAL,KAAK,QAWrB"}
1
+ {"version":3,"file":"Stack.js","sourceRoot":"../","sources":["Card/Stack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAK3B,MAAM,KAAW,KAAK,CAcrB;AAdD,WAAiB,KAAK;IACR,YAAM,GAAG;QACrB,cAAc;QACd,kBAAkB;QAClB,gBAAgB;QAChB,oBAAoB;QACpB,mBAAmB;KACV,CAAA;IACG,UAAI,GAAG,IAAI,CAAC,MAAM,CAAC,MAAA,MAAM,CAAC,CAAA;IAC1B,QAAE,GAAG,MAAA,IAAI,CAAC,EAAE,CAAA;IACZ,UAAI,GAAG,MAAA,IAAI,CAAC,IAAI,CAAA;IAC7B,SAAgB,OAAO,CAAC,KAAY;QACnC,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAU,CAAA;IACpC,CAAC;IAFe,aAAO,UAEtB,CAAA;AACF,CAAC,EAdgB,KAAK,KAAL,KAAK,QAcrB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/model-banking",
3
- "version": "0.1.234",
3
+ "version": "0.1.235",
4
4
  "description": "Library containing data model types and functions for the Pax2Pay Banking API.",
5
5
  "author": "Pax2Pay Ltd",
6
6
  "license": "MIT",