@pax2pay/model-banking 0.1.56 → 0.1.58

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/Rail/Type.ts CHANGED
@@ -1 +1 @@
1
- export type Type = "paxgiro" | "internal" | "iban" | "scan" | "card" //| "swedish" |
1
+ export type Type = "paxgiro" | "internal" | "iban" | "scan" | "visa" | "mastercard" //| "swedish" |
@@ -2,7 +2,7 @@ import { isoly } from "isoly"
2
2
  import { isly } from "isly"
3
3
  import { Entry as SettlementEntry } from "./Entry"
4
4
 
5
- export type Settlement = Settlement.Succeeded | Settlement.Failed
5
+ export type Settlement = Settlement.Succeeded | Settlement.Failed | Settlement.Ongoing
6
6
 
7
7
  export namespace Settlement {
8
8
  export interface Base {
@@ -22,6 +22,9 @@ export namespace Settlement {
22
22
  status: "failed"
23
23
  reason: string
24
24
  }
25
+ export interface Ongoing extends Base {
26
+ status: "ongoing"
27
+ }
25
28
 
26
29
  export namespace Succeeded {
27
30
  export const type = isly.object<Succeeded>({
@@ -52,7 +55,16 @@ export namespace Settlement {
52
55
  })
53
56
  export const is = type.is
54
57
  }
55
- export const type = isly.union<Settlement, Succeeded, Failed>(Succeeded.type, Failed.type)
58
+ export namespace Ongoing {
59
+ export const type = isly.object<Ongoing>({
60
+ id: isly.string(),
61
+ created: isly.tuple(isly.string(), isly.fromIs("Settlement.created", isoly.DateTime.is)),
62
+ configuration: isly.string(),
63
+ status: isly.string("ongoing"),
64
+ })
65
+ export const is = type.is
66
+ }
67
+ export const type = isly.union<Settlement, Succeeded, Failed, Ongoing>(Succeeded.type, Failed.type, Ongoing.type)
56
68
  export const is = type.is
57
69
  export const flaw = type.flaw
58
70
  export const Entry = SettlementEntry
@@ -1 +1 @@
1
- export type Type = "paxgiro" | "internal" | "iban" | "scan" | "card";
1
+ export type Type = "paxgiro" | "internal" | "iban" | "scan" | "visa" | "mastercard";
@@ -1,7 +1,7 @@
1
1
  import { isoly } from "isoly";
2
2
  import { isly } from "isly";
3
3
  import { Entry as SettlementEntry } from "./Entry";
4
- export type Settlement = Settlement.Succeeded | Settlement.Failed;
4
+ export type Settlement = Settlement.Succeeded | Settlement.Failed | Settlement.Ongoing;
5
5
  export declare namespace Settlement {
6
6
  interface Base {
7
7
  id: string;
@@ -24,6 +24,9 @@ export declare namespace Settlement {
24
24
  status: "failed";
25
25
  reason: string;
26
26
  }
27
+ interface Ongoing extends Base {
28
+ status: "ongoing";
29
+ }
27
30
  namespace Succeeded {
28
31
  const type: isly.object.ExtendableType<Succeeded>;
29
32
  const is: isly.Type.IsFunction<Succeeded>;
@@ -32,6 +35,10 @@ export declare namespace Settlement {
32
35
  const type: isly.object.ExtendableType<Failed>;
33
36
  const is: isly.Type.IsFunction<Failed>;
34
37
  }
38
+ namespace Ongoing {
39
+ const type: isly.object.ExtendableType<Ongoing>;
40
+ const is: isly.Type.IsFunction<Ongoing>;
41
+ }
35
42
  const type: isly.Type<Settlement>;
36
43
  const is: isly.Type.IsFunction<Settlement>;
37
44
  const flaw: isly.Type.FlawFunction;
@@ -34,7 +34,17 @@ export var Settlement;
34
34
  });
35
35
  Failed.is = Failed.type.is;
36
36
  })(Failed = Settlement.Failed || (Settlement.Failed = {}));
37
- Settlement.type = isly.union(Succeeded.type, Failed.type);
37
+ let Ongoing;
38
+ (function (Ongoing) {
39
+ Ongoing.type = isly.object({
40
+ id: isly.string(),
41
+ created: isly.tuple(isly.string(), isly.fromIs("Settlement.created", isoly.DateTime.is)),
42
+ configuration: isly.string(),
43
+ status: isly.string("ongoing"),
44
+ });
45
+ Ongoing.is = Ongoing.type.is;
46
+ })(Ongoing = Settlement.Ongoing || (Settlement.Ongoing = {}));
47
+ Settlement.type = isly.union(Succeeded.type, Failed.type, Ongoing.type);
38
48
  Settlement.is = Settlement.type.is;
39
49
  Settlement.flaw = Settlement.type.flaw;
40
50
  Settlement.Entry = SettlementEntry;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../","sources":["Sett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UAAU,QAiE1B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/model-banking",
3
- "version": "0.1.56",
3
+ "version": "0.1.58",
4
4
  "description": "Library containing data model types and functions for the Pax2Pay Banking API.",
5
5
  "author": "Pax2Pay Ltd",
6
6
  "license": "MIT",