@pax2pay/model-banking 0.1.661 → 0.1.664

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.
Files changed (73) hide show
  1. package/Merchant/Category.ts +2 -0
  2. package/Rail/Address/Bic.ts +27 -0
  3. package/Rail/Address/index.ts +28 -17
  4. package/dist/cjs/Account/Details.d.ts +6 -0
  5. package/dist/cjs/Account/index.d.ts +12 -0
  6. package/dist/cjs/Merchant/Category.d.ts +2 -0
  7. package/dist/cjs/Merchant/Category.js +2 -0
  8. package/dist/cjs/Merchant/Category.js.map +1 -1
  9. package/dist/cjs/Rail/Address/Bic.d.ts +19 -0
  10. package/dist/cjs/Rail/Address/Bic.js +24 -0
  11. package/dist/cjs/Rail/Address/Bic.js.map +1 -0
  12. package/dist/cjs/Rail/Address/index.d.ts +12 -4
  13. package/dist/cjs/Rail/Address/index.js +39 -30
  14. package/dist/cjs/Rail/Address/index.js.map +1 -1
  15. package/dist/cjs/Transaction/Creatable.d.ts +6 -0
  16. package/dist/cjs/Transaction/PreTransaction/Base.d.ts +6 -0
  17. package/dist/cjs/Transaction/PreTransaction/Incoming.d.ts +12 -0
  18. package/dist/cjs/Transaction/PreTransaction/Outgoing.d.ts +6 -0
  19. package/dist/cjs/Transaction/PreTransaction/index.d.ts +18 -0
  20. package/dist/cjs/Transaction/index.d.ts +41 -5
  21. package/dist/cjs/policy/Mcc/Action.d.ts +2 -0
  22. package/dist/cjs/policy/Mcc/Action.js +2 -0
  23. package/dist/cjs/policy/Mcc/Action.js.map +1 -1
  24. package/dist/cjs/policy/Mcc/Creatable.d.ts +17 -0
  25. package/dist/cjs/policy/Mcc/Creatable.js +9 -0
  26. package/dist/cjs/policy/Mcc/Creatable.js.map +1 -1
  27. package/dist/cjs/policy/Mcc/Group.d.ts +3 -0
  28. package/dist/cjs/policy/Mcc/Group.js +9 -0
  29. package/dist/cjs/policy/Mcc/Group.js.map +1 -1
  30. package/dist/cjs/policy/Mcc/Updatable.d.ts +2 -0
  31. package/dist/cjs/policy/Mcc/Updatable.js +2 -0
  32. package/dist/cjs/policy/Mcc/Updatable.js.map +1 -1
  33. package/dist/cjs/policy/Mcc/index.d.ts +2 -0
  34. package/dist/cjs/policy/Mcc/index.js +7 -0
  35. package/dist/cjs/policy/Mcc/index.js.map +1 -1
  36. package/dist/mjs/Account/Details.d.ts +6 -0
  37. package/dist/mjs/Account/index.d.ts +12 -0
  38. package/dist/mjs/Merchant/Category.d.ts +2 -0
  39. package/dist/mjs/Merchant/Category.js +2 -0
  40. package/dist/mjs/Merchant/Category.js.map +1 -1
  41. package/dist/mjs/Rail/Address/Bic.d.ts +19 -0
  42. package/dist/mjs/Rail/Address/Bic.js +21 -0
  43. package/dist/mjs/Rail/Address/Bic.js.map +1 -0
  44. package/dist/mjs/Rail/Address/index.d.ts +12 -4
  45. package/dist/mjs/Rail/Address/index.js +39 -30
  46. package/dist/mjs/Rail/Address/index.js.map +1 -1
  47. package/dist/mjs/Transaction/Creatable.d.ts +6 -0
  48. package/dist/mjs/Transaction/PreTransaction/Base.d.ts +6 -0
  49. package/dist/mjs/Transaction/PreTransaction/Incoming.d.ts +12 -0
  50. package/dist/mjs/Transaction/PreTransaction/Outgoing.d.ts +6 -0
  51. package/dist/mjs/Transaction/PreTransaction/index.d.ts +18 -0
  52. package/dist/mjs/Transaction/index.d.ts +41 -5
  53. package/dist/mjs/policy/Mcc/Action.d.ts +2 -0
  54. package/dist/mjs/policy/Mcc/Action.js +2 -0
  55. package/dist/mjs/policy/Mcc/Action.js.map +1 -1
  56. package/dist/mjs/policy/Mcc/Creatable.d.ts +17 -0
  57. package/dist/mjs/policy/Mcc/Creatable.js +9 -0
  58. package/dist/mjs/policy/Mcc/Creatable.js.map +1 -1
  59. package/dist/mjs/policy/Mcc/Group.d.ts +3 -0
  60. package/dist/mjs/policy/Mcc/Group.js +9 -0
  61. package/dist/mjs/policy/Mcc/Group.js.map +1 -1
  62. package/dist/mjs/policy/Mcc/Updatable.d.ts +2 -0
  63. package/dist/mjs/policy/Mcc/Updatable.js +2 -0
  64. package/dist/mjs/policy/Mcc/Updatable.js.map +1 -1
  65. package/dist/mjs/policy/Mcc/index.d.ts +2 -0
  66. package/dist/mjs/policy/Mcc/index.js +7 -0
  67. package/dist/mjs/policy/Mcc/index.js.map +1 -1
  68. package/package.json +5 -2
  69. package/policy/Mcc/Action.ts +2 -0
  70. package/policy/Mcc/Creatable.ts +9 -0
  71. package/policy/Mcc/Group.ts +9 -0
  72. package/policy/Mcc/Updatable.ts +2 -0
  73. package/policy/Mcc/index.ts +7 -0
@@ -114,6 +114,12 @@ export declare namespace Transaction {
114
114
  account: zod.ZodString;
115
115
  holder: zod.ZodString;
116
116
  institution: zod.ZodOptional<zod.ZodString>;
117
+ }, zod.z.core.$strip>, zod.ZodObject<{
118
+ type: zod.ZodLiteral<"bic">;
119
+ account: zod.ZodString;
120
+ institution: zod.ZodString;
121
+ holder: zod.ZodString;
122
+ transactor: zod.ZodOptional<zod.ZodString>;
117
123
  }, zod.z.core.$strip>]>;
118
124
  currency: zod.ZodEnum<{
119
125
  AED: "AED";
@@ -964,6 +970,12 @@ export declare namespace Transaction {
964
970
  account: zod.ZodString;
965
971
  holder: zod.ZodString;
966
972
  institution: zod.ZodOptional<zod.ZodString>;
973
+ }, zod.z.core.$strip>, zod.ZodObject<{
974
+ type: zod.ZodLiteral<"bic">;
975
+ account: zod.ZodString;
976
+ institution: zod.ZodString;
977
+ holder: zod.ZodString;
978
+ transactor: zod.ZodOptional<zod.ZodString>;
967
979
  }, zod.z.core.$strip>]>;
968
980
  type: zod.ZodOptional<zod.ZodEnum<{
969
981
  card: "card";
@@ -1468,7 +1480,6 @@ export declare namespace Transaction {
1468
1480
  available: zod.ZodNumber;
1469
1481
  reserved: zod.ZodNumber;
1470
1482
  }, zod.z.core.$strip>;
1471
- id: zod.ZodString;
1472
1483
  account: zod.ZodUnion<readonly [zod.ZodObject<{
1473
1484
  type: zod.ZodLiteral<"card">;
1474
1485
  scheme: zod.ZodEnum<{
@@ -1522,7 +1533,14 @@ export declare namespace Transaction {
1522
1533
  account: zod.ZodString;
1523
1534
  holder: zod.ZodString;
1524
1535
  institution: zod.ZodOptional<zod.ZodString>;
1536
+ }, zod.z.core.$strip>, zod.ZodObject<{
1537
+ type: zod.ZodLiteral<"bic">;
1538
+ account: zod.ZodString;
1539
+ institution: zod.ZodString;
1540
+ holder: zod.ZodString;
1541
+ transactor: zod.ZodOptional<zod.ZodString>;
1525
1542
  }, zod.z.core.$strip>]>;
1543
+ id: zod.ZodString;
1526
1544
  status: zod.ZodUnion<readonly [zod.ZodEnum<{
1527
1545
  created: "created";
1528
1546
  review: "review";
@@ -1543,6 +1561,7 @@ export declare namespace Transaction {
1543
1561
  denied: "denied";
1544
1562
  "merchant lock violation": "merchant lock violation";
1545
1563
  }>], null>]>;
1564
+ description: zod.ZodString;
1546
1565
  state: zod.ZodOptional<zod.ZodAny>;
1547
1566
  reference: zod.ZodOptional<zod.ZodObject<{
1548
1567
  supplier: zod.ZodOptional<zod.ZodEnum<{
@@ -1609,9 +1628,14 @@ export declare namespace Transaction {
1609
1628
  account: zod.ZodString;
1610
1629
  holder: zod.ZodString;
1611
1630
  institution: zod.ZodOptional<zod.ZodString>;
1631
+ }, zod.z.core.$strip>, zod.ZodObject<{
1632
+ type: zod.ZodLiteral<"bic">;
1633
+ account: zod.ZodString;
1634
+ institution: zod.ZodString;
1635
+ holder: zod.ZodString;
1636
+ transactor: zod.ZodOptional<zod.ZodString>;
1612
1637
  }, zod.z.core.$strip>]>;
1613
1638
  posted: zod.ZodString;
1614
- description: zod.ZodString;
1615
1639
  by: zod.ZodOptional<zod.ZodString>;
1616
1640
  organization: zod.ZodString;
1617
1641
  accountId: zod.ZodString;
@@ -2684,7 +2708,6 @@ export declare namespace Transaction {
2684
2708
  available: zod.ZodNumber;
2685
2709
  reserved: zod.ZodNumber;
2686
2710
  }, zod.z.core.$strip>;
2687
- id: zod.ZodString;
2688
2711
  account: zod.ZodUnion<readonly [zod.ZodObject<{
2689
2712
  type: zod.ZodLiteral<"card">;
2690
2713
  scheme: zod.ZodEnum<{
@@ -2738,7 +2761,14 @@ export declare namespace Transaction {
2738
2761
  account: zod.ZodString;
2739
2762
  holder: zod.ZodString;
2740
2763
  institution: zod.ZodOptional<zod.ZodString>;
2764
+ }, zod.z.core.$strip>, zod.ZodObject<{
2765
+ type: zod.ZodLiteral<"bic">;
2766
+ account: zod.ZodString;
2767
+ institution: zod.ZodString;
2768
+ holder: zod.ZodString;
2769
+ transactor: zod.ZodOptional<zod.ZodString>;
2741
2770
  }, zod.z.core.$strip>]>;
2771
+ id: zod.ZodString;
2742
2772
  status: zod.ZodUnion<readonly [zod.ZodEnum<{
2743
2773
  created: "created";
2744
2774
  review: "review";
@@ -2759,6 +2789,7 @@ export declare namespace Transaction {
2759
2789
  denied: "denied";
2760
2790
  "merchant lock violation": "merchant lock violation";
2761
2791
  }>], null>]>;
2792
+ description: zod.ZodString;
2762
2793
  reference: zod.ZodOptional<zod.ZodObject<{
2763
2794
  supplier: zod.ZodOptional<zod.ZodEnum<{
2764
2795
  paxgiro: "paxgiro";
@@ -2824,9 +2855,14 @@ export declare namespace Transaction {
2824
2855
  account: zod.ZodString;
2825
2856
  holder: zod.ZodString;
2826
2857
  institution: zod.ZodOptional<zod.ZodString>;
2858
+ }, zod.z.core.$strip>, zod.ZodObject<{
2859
+ type: zod.ZodLiteral<"bic">;
2860
+ account: zod.ZodString;
2861
+ institution: zod.ZodString;
2862
+ holder: zod.ZodString;
2863
+ transactor: zod.ZodOptional<zod.ZodString>;
2827
2864
  }, zod.z.core.$strip>]>;
2828
2865
  posted: zod.ZodString;
2829
- description: zod.ZodString;
2830
2866
  by: zod.ZodOptional<zod.ZodString>;
2831
2867
  organization: zod.ZodString;
2832
2868
  accountId: zod.ZodString;
@@ -3963,6 +3999,7 @@ export declare namespace Transaction {
3963
3999
  denied: "denied";
3964
4000
  "merchant lock violation": "merchant lock violation";
3965
4001
  }>], null>]>;
4002
+ description: zod.ZodString;
3966
4003
  state: zod.ZodOptional<zod.ZodAny>;
3967
4004
  reference: zod.ZodOptional<zod.ZodObject<{
3968
4005
  supplier: zod.ZodOptional<zod.ZodEnum<{
@@ -3977,7 +4014,6 @@ export declare namespace Transaction {
3977
4014
  network: zod.ZodOptional<zod.ZodString>;
3978
4015
  }, zod.z.core.$strip>>;
3979
4016
  posted: zod.ZodString;
3980
- description: zod.ZodString;
3981
4017
  by: zod.ZodOptional<zod.ZodString>;
3982
4018
  organization: zod.ZodString;
3983
4019
  accountId: zod.ZodString;
@@ -1,6 +1,8 @@
1
1
  import { isly } from "isly";
2
+ import { zod } from "../../zod";
2
3
  export type Action = (typeof Action.values)[number];
3
4
  export declare namespace Action {
4
5
  const values: readonly ["allow", "block"];
5
6
  const type: isly.Type<"allow" | "block">;
7
+ const typeZod: zod.ZodType<Action>;
6
8
  }
@@ -2,9 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Action = void 0;
4
4
  const isly_1 = require("isly");
5
+ const zod_1 = require("../../zod");
5
6
  var Action;
6
7
  (function (Action) {
7
8
  Action.values = ["allow", "block"];
8
9
  Action.type = isly_1.isly.string(Action.values);
10
+ Action.typeZod = zod_1.zod.enum(Action.values);
9
11
  })(Action || (exports.Action = Action = {}));
10
12
  //# sourceMappingURL=Action.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Action.js","sourceRoot":"","sources":["../../../../policy/Mcc/Action.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAG3B,IAAiB,MAAM,CAGtB;AAHD,WAAiB,MAAM;IACT,aAAM,GAAG,CAAC,OAAO,EAAE,OAAO,CAAU,CAAA;IACpC,WAAI,GAAG,WAAI,CAAC,MAAM,CAAS,OAAA,MAAM,CAAC,CAAA;AAChD,CAAC,EAHgB,MAAM,sBAAN,MAAM,QAGtB"}
1
+ {"version":3,"file":"Action.js","sourceRoot":"","sources":["../../../../policy/Mcc/Action.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,mCAA+B;AAG/B,IAAiB,MAAM,CAItB;AAJD,WAAiB,MAAM;IACT,aAAM,GAAG,CAAC,OAAO,EAAE,OAAO,CAAU,CAAA;IACpC,WAAI,GAAG,WAAI,CAAC,MAAM,CAAS,OAAA,MAAM,CAAC,CAAA;IAClC,cAAO,GAAwB,SAAG,CAAC,IAAI,CAAC,OAAA,MAAM,CAAC,CAAA;AAC7D,CAAC,EAJgB,MAAM,sBAAN,MAAM,QAItB"}
@@ -1,4 +1,5 @@
1
1
  import { Card } from "../../Card";
2
+ import { zod } from "../../zod";
2
3
  import { Action } from "./Action";
3
4
  import { Group } from "./Group";
4
5
  export interface Creatable {
@@ -11,4 +12,20 @@ export interface Creatable {
11
12
  }
12
13
  export declare namespace Creatable {
13
14
  const type: import("isly/dist/cjs/object").IslyObject<Creatable, object>;
15
+ const typeZod: zod.ZodObject<{
16
+ action: zod.ZodType<"allow" | "block", unknown, zod.z.core.$ZodTypeInternals<"allow" | "block", unknown>>;
17
+ name: zod.ZodString;
18
+ description: zod.ZodOptional<zod.ZodString>;
19
+ organization: zod.ZodOptional<zod.ZodString>;
20
+ stacks: zod.ZodOptional<zod.ZodArray<zod.ZodEnum<{
21
+ "test-paxgiro": "test-paxgiro";
22
+ "test-tpl-paxgiro": "test-tpl-paxgiro";
23
+ "test-diners-clowd9": "test-diners-clowd9";
24
+ "uk-visa-tpl-marqeta": "uk-visa-tpl-marqeta";
25
+ "uk-diners-clowd9": "uk-diners-clowd9";
26
+ "uk-diners-dpg": "uk-diners-dpg";
27
+ "uk-mc-tpl-marqeta": "uk-mc-tpl-marqeta";
28
+ }>>>;
29
+ group: zod.ZodType<Group, unknown, zod.z.core.$ZodTypeInternals<Group, unknown>>;
30
+ }, zod.z.core.$strip>;
14
31
  }
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Creatable = void 0;
4
4
  const isly_1 = require("isly");
5
5
  const Card_1 = require("../../Card");
6
+ const zod_1 = require("../../zod");
6
7
  const Action_1 = require("./Action");
7
8
  const Group_1 = require("./Group");
8
9
  var Creatable;
@@ -15,5 +16,13 @@ var Creatable;
15
16
  stacks: Card_1.Card.Stack.type.array().optional(),
16
17
  group: Group_1.Group.type,
17
18
  });
19
+ Creatable.typeZod = zod_1.zod.object({
20
+ action: Action_1.Action.typeZod,
21
+ name: zod_1.zod.string(),
22
+ description: zod_1.zod.string().optional(),
23
+ organization: zod_1.zod.string().optional(),
24
+ stacks: zod_1.zod.array(Card_1.Card.Stack.typeZod).optional(),
25
+ group: Group_1.Group.typeZod,
26
+ });
18
27
  })(Creatable || (exports.Creatable = Creatable = {}));
19
28
  //# sourceMappingURL=Creatable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Creatable.js","sourceRoot":"","sources":["../../../../policy/Mcc/Creatable.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,qCAAiC;AACjC,qCAAiC;AACjC,mCAA+B;AAU/B,IAAiB,SAAS,CASzB;AATD,WAAiB,SAAS;IACZ,cAAI,GAAG,WAAI,CAAC,MAAM,CAAY;QAC1C,MAAM,EAAE,eAAM,CAAC,IAAI;QACnB,IAAI,EAAE,WAAI,CAAC,MAAM,EAAE;QACnB,WAAW,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACrC,YAAY,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACtC,MAAM,EAAE,WAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QAC1C,KAAK,EAAE,aAAK,CAAC,IAAI;KACjB,CAAC,CAAA;AACH,CAAC,EATgB,SAAS,yBAAT,SAAS,QASzB"}
1
+ {"version":3,"file":"Creatable.js","sourceRoot":"","sources":["../../../../policy/Mcc/Creatable.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,qCAAiC;AACjC,mCAA+B;AAC/B,qCAAiC;AACjC,mCAA+B;AAU/B,IAAiB,SAAS,CAiBzB;AAjBD,WAAiB,SAAS;IACZ,cAAI,GAAG,WAAI,CAAC,MAAM,CAAY;QAC1C,MAAM,EAAE,eAAM,CAAC,IAAI;QACnB,IAAI,EAAE,WAAI,CAAC,MAAM,EAAE;QACnB,WAAW,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACrC,YAAY,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACtC,MAAM,EAAE,WAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QAC1C,KAAK,EAAE,aAAK,CAAC,IAAI;KACjB,CAAC,CAAA;IACW,iBAAO,GAAG,SAAG,CAAC,MAAM,CAAC;QACjC,MAAM,EAAE,eAAM,CAAC,OAAO;QACtB,IAAI,EAAE,SAAG,CAAC,MAAM,EAAE;QAClB,WAAW,EAAE,SAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACpC,YAAY,EAAE,SAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACrC,MAAM,EAAE,SAAG,CAAC,KAAK,CAAC,WAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE;QAChD,KAAK,EAAE,aAAK,CAAC,OAAO;KACpB,CAAkC,CAAA;AACpC,CAAC,EAjBgB,SAAS,yBAAT,SAAS,QAiBzB"}
@@ -1,4 +1,5 @@
1
1
  import { Merchant } from "../../Merchant";
2
+ import { zod } from "../../zod";
2
3
  export interface Group {
3
4
  values: Merchant.Category[];
4
5
  ranges: Group.Range[];
@@ -10,7 +11,9 @@ export declare namespace Group {
10
11
  }
11
12
  namespace Range {
12
13
  const type: import("isly/dist/cjs/object").IslyObject<Range, object>;
14
+ const typeZod: zod.ZodType<Range>;
13
15
  }
14
16
  const type: import("isly/dist/cjs/object").IslyObject<Group, object>;
17
+ const typeZod: zod.ZodType<Group>;
15
18
  function within(set: Group, category: Merchant.Category): boolean;
16
19
  }
@@ -3,13 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Group = void 0;
4
4
  const isly_1 = require("isly");
5
5
  const Merchant_1 = require("../../Merchant");
6
+ const zod_1 = require("../../zod");
6
7
  var Group;
7
8
  (function (Group) {
8
9
  let Range;
9
10
  (function (Range) {
10
11
  Range.type = isly_1.isly.object({ from: Merchant_1.Merchant.Category.type, to: Merchant_1.Merchant.Category.type });
12
+ Range.typeZod = zod_1.zod.object({
13
+ from: Merchant_1.Merchant.Category.typeZod,
14
+ to: Merchant_1.Merchant.Category.typeZod,
15
+ });
11
16
  })(Range = Group.Range || (Group.Range = {}));
12
17
  Group.type = isly_1.isly.object({ values: Merchant_1.Merchant.Category.type.array(), ranges: Range.type.array() });
18
+ Group.typeZod = zod_1.zod.object({
19
+ values: zod_1.zod.array(Merchant_1.Merchant.Category.typeZod),
20
+ ranges: zod_1.zod.array(Range.typeZod),
21
+ });
13
22
  function within(set, category) {
14
23
  return set.values.includes(category) || set.ranges.some(r => r.from <= category && category <= r.to);
15
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Group.js","sourceRoot":"","sources":["../../../../policy/Mcc/Group.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,6CAAyC;AAMzC,IAAiB,KAAK,CAYrB;AAZD,WAAiB,KAAK;IAKrB,IAAiB,KAAK,CAErB;IAFD,WAAiB,KAAK;QACR,UAAI,GAAG,WAAI,CAAC,MAAM,CAAQ,EAAE,IAAI,EAAE,mBAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE,mBAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;IACrG,CAAC,EAFgB,KAAK,GAAL,WAAK,KAAL,WAAK,QAErB;IACY,UAAI,GAAG,WAAI,CAAC,MAAM,CAAQ,EAAE,MAAM,EAAE,mBAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,E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CAAC;QACrD,MAAM,EAAE,SAAG,CAAC,KAAK,CAAC,mBAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC;QAC5C,MAAM,EAAE,SAAG,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC;KAChC,CAAC,CAAA;IACF,SAAgB,MAAM,CAAC,GAAU,EAAE,QAA2B;QAC7D,OAAO,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,QAAQ,IAAI,QAAQ,IAAI,CAAC,CAAC,EAAE,CAAC,CAAA;IACrG,CAAC;IAFe,YAAM,SAErB,CAAA;AACF,CAAC,EApBgB,KAAK,qBAAL,KAAK,QAoBrB"}
@@ -1,7 +1,9 @@
1
+ import { zod } from "../../zod";
1
2
  import { Creatable } from "./Creatable";
2
3
  export interface Updatable extends Creatable {
3
4
  id: string;
4
5
  }
5
6
  export declare namespace Updatable {
6
7
  const type: import("isly/dist/cjs/object").IslyObject<Updatable, Creatable>;
8
+ const typeZod: zod.ZodType<Updatable>;
7
9
  }
@@ -2,9 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Updatable = void 0;
4
4
  const isly_1 = require("isly");
5
+ const zod_1 = require("../../zod");
5
6
  const Creatable_1 = require("./Creatable");
6
7
  var Updatable;
7
8
  (function (Updatable) {
8
9
  Updatable.type = Creatable_1.Creatable.type.extend({ id: isly_1.isly.string() });
10
+ Updatable.typeZod = Creatable_1.Creatable.typeZod.extend({ id: zod_1.zod.string() });
9
11
  })(Updatable || (exports.Updatable = Updatable = {}));
10
12
  //# sourceMappingURL=Updatable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Updatable.js","sourceRoot":"","sources":["../../../../policy/Mcc/Updatable.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,2CAAuC;AAKvC,IAAiB,SAAS,CAEzB;AAFD,WAAiB,SAAS;IACZ,cAAI,GAAG,qBAAS,CAAC,IAAI,CAAC,MAAM,CAAY,EAAE,EAAE,EAAE,WAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;AAC5E,CAAC,EAFgB,SAAS,yBAAT,SAAS,QAEzB"}
1
+ {"version":3,"file":"Updatable.js","sourceRoot":"","sources":["../../../../policy/Mcc/Updatable.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,mCAA+B;AAC/B,2CAAuC;AAKvC,IAAiB,SAAS,CAGzB;AAHD,WAAiB,SAAS;IACZ,cAAI,GAAG,qBAAS,CAAC,IAAI,CAAC,MAAM,CAAY,EAAE,EAAE,EAAE,WAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;IAC9D,iBAAO,GAA2B,qBAAS,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,SAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;AAC9F,CAAC,EAHgB,SAAS,yBAAT,SAAS,QAGzB"}
@@ -2,6 +2,7 @@ import { isoly } from "isoly";
2
2
  import { Card } from "../../Card";
3
3
  import { Merchant } from "../../Merchant";
4
4
  import { Realm } from "../../Realm";
5
+ import { zod } from "../../zod";
5
6
  import { Action as MCCAction } from "./Action";
6
7
  import { Creatable as MccCreatable } from "./Creatable";
7
8
  import { Group as MCCGroup } from "./Group";
@@ -23,6 +24,7 @@ export declare namespace Mcc {
23
24
  organization?: string;
24
25
  };
25
26
  const type: import("isly/dist/cjs/object").IslyObject<Mcc, Creatable>;
27
+ const typeZod: zod.ZodType<Mcc>;
26
28
  function match(policy: Mcc, transaction: TransactionInput): boolean;
27
29
  function resolve(policies: Mcc[], transaction: TransactionInput): Mcc[];
28
30
  function isAllowed(policies: Mcc[], transaction: TransactionInput): boolean | undefined;
@@ -5,6 +5,7 @@ const isoly_1 = require("isoly");
5
5
  const isly_1 = require("isly");
6
6
  const Card_1 = require("../../Card");
7
7
  const Realm_1 = require("../../Realm");
8
+ const zod_1 = require("../../zod");
8
9
  const Action_1 = require("./Action");
9
10
  const Creatable_1 = require("./Creatable");
10
11
  const Group_1 = require("./Group");
@@ -21,6 +22,12 @@ var Mcc;
21
22
  created: isly_1.isly.fromIs("isoly.DateTime", isoly_1.isoly.DateTime.is),
22
23
  updated: isly_1.isly.fromIs("isoly.DateTime", isoly_1.isoly.DateTime.is),
23
24
  });
25
+ Mcc.typeZod = Mcc.Creatable.typeZod.extend({
26
+ id: zod_1.zod.string(),
27
+ realm: Realm_1.Realm.typeZod,
28
+ created: zod_1.zod.string().refine(isoly_1.isoly.DateTime.is),
29
+ updated: zod_1.zod.string().refine(isoly_1.isoly.DateTime.is),
30
+ });
24
31
  function match(policy, transaction) {
25
32
  const stack = transaction.preset ? Card_1.Card.Preset.presets[transaction.preset] : undefined;
26
33
  const stackMatches = !policy.stacks || (!!stack && policy.stacks.includes(stack));
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../policy/Mcc/index.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,+BAA2B;AAC3B,qCAAiC;AAEjC,uCAAmC;AACnC,qCAA8C;AAC9C,2CAAuD;AACvD,mCAA2C;AAC3C,2CAAuD;AAQvD,IAAiB,GAAG,CA8BnB;AA9BD,WAAiB,GAAG;IACL,aAAS,GAAG,qBAAY,CAAA;IACxB,aAAS,GAAG,qBAAY,CAAA;IACxB,UAAM,GAAG,eAAS,CAAA;IAClB,SAAK,GAAG,aAAQ,CAAA;IAEjB,QAAI,GAAG,IAAA,SAAS,CAAC,IAAI,CAAC,MAAM,CAAM;QAC9C,EAAE,EAAE,WAAI,CAAC,MAAM,EAAE;QACjB,KAAK,EAAE,aAAK,CAAC,IAAI;QACjB,OAAO,EAAE,WAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,aAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzD,OAAO,EAAE,WAAI,CAAC,MAAM,CAAC,gBAAg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G,CAAC,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAA;QAClE,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,OAAO,CAAC,CAAA;QACxD,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAA;IAC1F,CAAC;IALe,WAAO,UAKtB,CAAA;IACD,SAAgB,SAAS,CAAC,QAAe,EAAE,WAA6B;QACvE,MAAM,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAA;QAC/C,OAAO,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,OAAO,CAAC,CAAC,CAAC,SAAS,CAAA;IACrD,CAAC;IAHe,aAAS,YAGxB,CAAA;AACF,CAAC,EApCgB,GAAG,mBAAH,GAAG,QAoCnB"}
@@ -251,6 +251,12 @@ export declare namespace Details {
251
251
  account: zod.ZodString;
252
252
  holder: zod.ZodString;
253
253
  institution: zod.ZodOptional<zod.ZodString>;
254
+ }, zod.z.core.$strip>, zod.ZodObject<{
255
+ type: zod.ZodLiteral<"bic">;
256
+ account: zod.ZodString;
257
+ institution: zod.ZodString;
258
+ holder: zod.ZodString;
259
+ transactor: zod.ZodOptional<zod.ZodString>;
254
260
  }, zod.z.core.$strip>]>>;
255
261
  }, zod.z.core.$strip>;
256
262
  interface Creatable {
@@ -284,6 +284,12 @@ export declare namespace Account {
284
284
  account: zod.ZodString;
285
285
  holder: zod.ZodString;
286
286
  institution: zod.ZodOptional<zod.ZodString>;
287
+ }, zod.z.core.$strip>, zod.ZodObject<{
288
+ type: zod.ZodLiteral<"bic">;
289
+ account: zod.ZodString;
290
+ institution: zod.ZodString;
291
+ holder: zod.ZodString;
292
+ transactor: zod.ZodOptional<zod.ZodString>;
287
293
  }, zod.z.core.$strip>]>>;
288
294
  details: zod.ZodOptional<zod.ZodObject<{
289
295
  supplier: zod.ZodEnum<{
@@ -526,6 +532,12 @@ export declare namespace Account {
526
532
  account: zod.ZodString;
527
533
  holder: zod.ZodString;
528
534
  institution: zod.ZodOptional<zod.ZodString>;
535
+ }, zod.z.core.$strip>, zod.ZodObject<{
536
+ type: zod.ZodLiteral<"bic">;
537
+ account: zod.ZodString;
538
+ institution: zod.ZodString;
539
+ holder: zod.ZodString;
540
+ transactor: zod.ZodOptional<zod.ZodString>;
529
541
  }, zod.z.core.$strip>]>>;
530
542
  }, zod.z.core.$strip>>;
531
543
  charges: zod.ZodOptional<zod.ZodObject<{
@@ -1,5 +1,7 @@
1
1
  import { isly } from "isly";
2
+ import { zod } from "../zod";
2
3
  export type Category = string;
3
4
  export declare namespace Category {
4
5
  const type: isly.Type<string>;
6
+ const typeZod: zod.ZodType<Category>;
5
7
  }
@@ -1,6 +1,8 @@
1
1
  import { isly } from "isly";
2
+ import { zod } from "../zod";
2
3
  export var Category;
3
4
  (function (Category) {
4
5
  Category.type = isly.fromIs("Merchant.Category", (value) => typeof value === "string" && /^\d{4}$/.test(value));
6
+ Category.typeZod = zod.string().regex(/^\d{4}$/);
5
7
  })(Category || (Category = {}));
6
8
  //# sourceMappingURL=Category.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Category.js","sourceRoot":"","sources":["../../../Merchant/Category.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAI3B,MAAM,KAAW,QAAQ,CAKxB;AALD,WAAiB,QAAQ;IACX,aAAI,GAAG,IAAI,CAAC,MAAM,CAC9B,mBAAmB,EACnB,CAAC,KAAU,EAAqB,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CACrF,CAAA;AACF,CAAC,EALgB,QAAQ,KAAR,QAAQ,QAKxB"}
1
+ {"version":3,"file":"Category.js","sourceRoot":"","sources":["../../../Merchant/Category.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAI5B,MAAM,KAAW,QAAQ,CAMxB;AAND,WAAiB,QAAQ;IACX,aAAI,GAAG,IAAI,CAAC,MAAM,CAC9B,mBAAmB,EACnB,CAAC,KAAU,EAAqB,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CACrF,CAAA;IACY,gBAAO,GAA0B,GAAG,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAAA;AAC5E,CAAC,EANgB,QAAQ,KAAR,QAAQ,QAMxB"}
@@ -0,0 +1,19 @@
1
+ import { zod } from "../../zod";
2
+ export interface Bic {
3
+ type: "bic";
4
+ account: string;
5
+ institution: string;
6
+ holder: string;
7
+ transactor?: string;
8
+ }
9
+ export declare namespace Bic {
10
+ const currencies: readonly ["USD"];
11
+ const type: import("isly/dist/cjs/object").IslyObject<Bic, object>;
12
+ const typeZod: zod.ZodObject<{
13
+ type: zod.ZodLiteral<"bic">;
14
+ account: zod.ZodString;
15
+ institution: zod.ZodString;
16
+ holder: zod.ZodString;
17
+ transactor: zod.ZodOptional<zod.ZodString>;
18
+ }, zod.z.core.$strip>;
19
+ }
@@ -0,0 +1,21 @@
1
+ import { isly } from "isly";
2
+ import { zod } from "../../zod";
3
+ export var Bic;
4
+ (function (Bic) {
5
+ Bic.currencies = ["USD"];
6
+ Bic.type = isly.object({
7
+ type: isly.string("bic"),
8
+ account: isly.string(),
9
+ institution: isly.string(),
10
+ holder: isly.string(),
11
+ transactor: isly.string().optional(),
12
+ });
13
+ Bic.typeZod = zod.object({
14
+ type: zod.literal("bic"),
15
+ account: zod.string(),
16
+ institution: zod.string(),
17
+ holder: zod.string(),
18
+ transactor: zod.string().optional(),
19
+ });
20
+ })(Bic || (Bic = {}));
21
+ //# sourceMappingURL=Bic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Bic.js","sourceRoot":"","sources":["../../../../Rail/Address/Bic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAA;AAS/B,MAAM,KAAW,GAAG,CAgBnB;AAhBD,WAAiB,GAAG;IACN,cAAU,GAAG,CAAC,KAAK,CAAU,CAAA;IAC7B,QAAI,GAAG,IAAI,CAAC,MAAM,CAAM;QACpC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;QACxB,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE;QACtB,WAAW,EAAE,IAAI,CAAC,MAAM,EAAE;QAC1B,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;QACrB,UAAU,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACpC,CAAC,CAAA;IACW,WAAO,GAAG,GAAG,CAAC,MAAM,CAAC;QACjC,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC;QACxB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE;QACrB,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE;QACzB,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE;QACpB,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACnC,CAAC,CAAA;AACH,CAAC,EAhBgB,GAAG,KAAH,GAAG,QAgBnB"}
@@ -1,21 +1,22 @@
1
1
  import { isly } from "isly";
2
2
  import { Realm } from "../../Realm";
3
3
  import { zod } from "../../zod";
4
+ import { Bic as AddressBic } from "./Bic";
4
5
  import { Card as AddressCard } from "./Card";
5
6
  import { Iban as AddressIban } from "./Iban";
6
7
  import { Internal as AddressInternal } from "./internal";
7
8
  import { PaxGiro as AddressPaxGiro } from "./PaxGiro";
8
9
  import { Route as AddressRoute } from "./Route";
9
10
  import { Scan as AddressScan } from "./Scan";
10
- export type Address = AddressCard | AddressCard.Counterpart | AddressIban | AddressInternal | AddressPaxGiro | AddressScan;
11
+ export type Address = AddressCard | AddressCard.Counterpart | AddressIban | AddressInternal | AddressPaxGiro | AddressScan | AddressBic;
11
12
  export declare namespace Address {
12
13
  const realm: Record<Realm, string[]>;
13
- const values: readonly ["paxgiro", "internal", "iban", "scan", "card", "paxgiro-credit"];
14
+ const values: readonly ["paxgiro", "internal", "iban", "bic", "scan", "card", "paxgiro-credit"];
14
15
  type Type = (typeof values)[number];
15
16
  function compare(addresses: [Address, Address]): boolean;
16
17
  function parse(value: string): Address | undefined;
17
- function stringify(Address: Address): string;
18
- function beautify(Address: Address): string;
18
+ function stringify(address: Address): string;
19
+ function beautify(address: Address): string;
19
20
  const type: isly.Type<Address>;
20
21
  const typeZod: zod.ZodUnion<readonly [zod.ZodObject<{
21
22
  type: zod.ZodLiteral<"card">;
@@ -70,6 +71,12 @@ export declare namespace Address {
70
71
  account: zod.ZodString;
71
72
  holder: zod.ZodString;
72
73
  institution: zod.ZodOptional<zod.ZodString>;
74
+ }, zod.z.core.$strip>, zod.ZodObject<{
75
+ type: zod.ZodLiteral<"bic">;
76
+ account: zod.ZodString;
77
+ institution: zod.ZodString;
78
+ holder: zod.ZodString;
79
+ transactor: zod.ZodOptional<zod.ZodString>;
73
80
  }, zod.z.core.$strip>]>;
74
81
  export import PaxGiro = AddressPaxGiro;
75
82
  export import Iban = AddressIban;
@@ -77,4 +84,5 @@ export declare namespace Address {
77
84
  export import Internal = AddressInternal;
78
85
  export import Card = AddressCard;
79
86
  export import Route = AddressRoute;
87
+ export import Bic = AddressBic;
80
88
  }
@@ -1,5 +1,6 @@
1
1
  import { isly } from "isly";
2
2
  import { zod } from "../../zod";
3
+ import { Bic as AddressBic } from "./Bic";
3
4
  import { Card as AddressCard } from "./Card";
4
5
  import { Iban as AddressIban } from "./Iban";
5
6
  import { Internal as AddressInternal } from "./internal";
@@ -7,17 +8,17 @@ import { PaxGiro as AddressPaxGiro } from "./PaxGiro";
7
8
  import { Route as AddressRoute } from "./Route";
8
9
  import { Scan as AddressScan } from "./Scan";
9
10
  export var Address;
10
- (function (Address_1) {
11
- Address_1.realm = {
12
- test: ["paxgiro", "internal", "iban", "scan", "card", "paxgiro-credit"],
11
+ (function (Address) {
12
+ Address.realm = {
13
+ test: ["paxgiro", "internal", "iban", "bic", "scan", "card", "paxgiro-credit"],
13
14
  uk: ["internal", "iban", "scan", "card"],
14
15
  eea: ["internal", "iban", "scan", "card"],
15
16
  };
16
- Address_1.values = ["paxgiro", "internal", "iban", "scan", "card", "paxgiro-credit"];
17
+ Address.values = ["paxgiro", "internal", "iban", "bic", "scan", "card", "paxgiro-credit"];
17
18
  function compare(addresses) {
18
19
  return Object.entries(addresses[0]).every(([key, value]) => value == addresses[1][key]);
19
20
  }
20
- Address_1.compare = compare;
21
+ Address.compare = compare;
21
22
  function parse(value) {
22
23
  let result;
23
24
  const splitted = value.split("-");
@@ -28,65 +29,73 @@ export var Address;
28
29
  }
29
30
  return result;
30
31
  }
31
- Address_1.parse = parse;
32
- function stringify(Address) {
32
+ Address.parse = parse;
33
+ function stringify(address) {
33
34
  let result;
34
- switch (Address.type) {
35
+ switch (address.type) {
35
36
  case "iban":
36
- result = `iban-${Address.iban}`;
37
+ result = `iban-${address.iban}`;
37
38
  break;
38
39
  case "paxgiro":
39
- result = `pxg-${Address.identifier}`;
40
+ result = `pxg-${address.identifier}`;
40
41
  break;
41
42
  case "internal":
42
- result = `internal-${Address.identifier}`;
43
+ result = `internal-${address.identifier}`;
43
44
  break;
44
45
  case "scan":
45
- result = `scan-${Address.sort}-${Address.account}`;
46
+ result = `scan-${address.sort}-${address.account}`;
46
47
  break;
47
48
  case "card":
48
- result = "id" in Address ? `${Address.type}-${Address.id}` : `${Address.type}-merchant-${Address.merchant.id}`;
49
+ result = "id" in address ? `${address.type}-${address.id}` : `${address.type}-merchant-${address.merchant.id}`;
50
+ break;
51
+ case "bic":
52
+ result = `bic-${address.institution}-${address.account}`;
49
53
  break;
50
54
  }
51
55
  return result;
52
56
  }
53
- Address_1.stringify = stringify;
54
- function beautify(Address) {
57
+ Address.stringify = stringify;
58
+ function beautify(address) {
55
59
  let result;
56
- switch (Address.type) {
60
+ switch (address.type) {
57
61
  case "iban":
58
- result = `${Address.iban}`;
62
+ result = `${address.iban}`;
59
63
  break;
60
64
  case "paxgiro":
61
- result = `${Address.identifier}`;
65
+ result = `${address.identifier}`;
62
66
  break;
63
67
  case "internal":
64
- result = `${Address.identifier}`;
68
+ result = `${address.identifier}`;
65
69
  break;
66
70
  case "scan":
67
- result = `${Address.sort} ${Address.account}`;
71
+ result = `${address.sort} ${address.account}`;
68
72
  break;
69
73
  case "card":
70
- result = "id" in Address ? `${Address.type}-${Address.id}` : `${Address.type}-merchant-${Address.merchant.id}`;
74
+ result = "id" in address ? `${address.type}-${address.id}` : `${address.type}-merchant-${address.merchant.id}`;
75
+ break;
76
+ case "bic":
77
+ result = `${address.institution} ${address.account}`;
71
78
  break;
72
79
  }
73
80
  return result;
74
81
  }
75
- Address_1.beautify = beautify;
76
- Address_1.type = isly.union(AddressCard.type, AddressCard.Counterpart.type, AddressIban.type, AddressInternal.type, AddressPaxGiro.type, AddressScan.type);
77
- Address_1.typeZod = zod.union([
82
+ Address.beautify = beautify;
83
+ Address.type = isly.union(AddressCard.type, AddressCard.Counterpart.type, AddressIban.type, AddressInternal.type, AddressPaxGiro.type, AddressScan.type, AddressBic.type);
84
+ Address.typeZod = zod.union([
78
85
  AddressCard.typeZod,
79
86
  AddressCard.Counterpart.typeZod,
80
87
  AddressIban.typeZod,
81
88
  AddressInternal.typeZod,
82
89
  AddressPaxGiro.typeZod,
83
90
  AddressScan.typeZod,
91
+ AddressBic.typeZod,
84
92
  ]);
85
- Address_1.PaxGiro = AddressPaxGiro;
86
- Address_1.Iban = AddressIban;
87
- Address_1.Scan = AddressScan;
88
- Address_1.Internal = AddressInternal;
89
- Address_1.Card = AddressCard;
90
- Address_1.Route = AddressRoute;
93
+ Address.PaxGiro = AddressPaxGiro;
94
+ Address.Iban = AddressIban;
95
+ Address.Scan = AddressScan;
96
+ Address.Internal = AddressInternal;
97
+ Address.Card = AddressCard;
98
+ Address.Route = AddressRoute;
99
+ Address.Bic = AddressBic;
91
100
  })(Address || (Address = {}));
92
101
  //# sourceMappingURL=index.js.map