@pax2pay/model-banking 0.1.108 → 0.1.110
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/Merchant/index.ts +8 -2
- package/Settlement/index.ts +21 -13
- package/dist/Merchant/index.d.ts +4 -1
- package/dist/Merchant/index.js +4 -1
- package/dist/Merchant/index.js.map +1 -1
- package/dist/Settlement/index.d.ts +9 -6
- package/dist/Settlement/index.js +5 -4
- package/dist/Settlement/index.js.map +1 -1
- package/package.json +1 -1
package/Merchant/index.ts
CHANGED
|
@@ -5,16 +5,22 @@ export interface Merchant {
|
|
|
5
5
|
name: string
|
|
6
6
|
id: string
|
|
7
7
|
category: string
|
|
8
|
-
country: isoly.CountryCode.Alpha2
|
|
9
8
|
address: string
|
|
9
|
+
city: string
|
|
10
|
+
zip: string
|
|
11
|
+
state?: string
|
|
12
|
+
country: isoly.CountryCode.Alpha2
|
|
10
13
|
}
|
|
11
14
|
export namespace Merchant {
|
|
12
15
|
export const type = isly.object<Merchant>({
|
|
13
16
|
name: isly.string(),
|
|
14
17
|
id: isly.string(),
|
|
15
18
|
category: isly.string(),
|
|
16
|
-
country: isly.string(),
|
|
17
19
|
address: isly.string(),
|
|
20
|
+
city: isly.string(),
|
|
21
|
+
zip: isly.string(),
|
|
22
|
+
state: isly.string().optional(),
|
|
23
|
+
country: isly.string(),
|
|
18
24
|
})
|
|
19
25
|
export const is = type.is
|
|
20
26
|
export const flaw = type.flaw
|
package/Settlement/index.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Entry as SettlementEntry } from "./Entry"
|
|
|
4
4
|
|
|
5
5
|
export type Settlement = Settlement.Succeeded | Settlement.Failed | Settlement.Ongoing
|
|
6
6
|
export namespace Settlement {
|
|
7
|
-
export type Summary = Omit<Settlement.Succeeded, "entries"> | Settlement.Failed | Settlement.Ongoing
|
|
7
|
+
export type Summary = Omit<Settlement.Succeeded, "entries"> | Settlement.Failed | Omit<Settlement.Ongoing, "entries">
|
|
8
8
|
export interface Base {
|
|
9
9
|
id: string
|
|
10
10
|
created: [string, isoly.DateTime]
|
|
@@ -13,11 +13,11 @@ export namespace Settlement {
|
|
|
13
13
|
status: string
|
|
14
14
|
}
|
|
15
15
|
export interface Succeeded extends Base {
|
|
16
|
-
|
|
16
|
+
status: "succeeded"
|
|
17
17
|
amount: Partial<Record<isoly.Currency, number>>
|
|
18
18
|
fee: Partial<Record<isoly.Currency, number>>
|
|
19
19
|
entries: SettlementEntry[]
|
|
20
|
-
|
|
20
|
+
settled: { user: string; created: isoly.DateTime; transactions: Record<string, [isoly.Currency, number]> }
|
|
21
21
|
}
|
|
22
22
|
export interface Failed extends Base {
|
|
23
23
|
status: "failed"
|
|
@@ -25,6 +25,9 @@ export namespace Settlement {
|
|
|
25
25
|
}
|
|
26
26
|
export interface Ongoing extends Base {
|
|
27
27
|
status: "ongoing"
|
|
28
|
+
amount: Partial<Record<isoly.Currency, number>>
|
|
29
|
+
fee: Partial<Record<isoly.Currency, number>>
|
|
30
|
+
entries: SettlementEntry[]
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
export namespace Succeeded {
|
|
@@ -33,16 +36,18 @@ export namespace Settlement {
|
|
|
33
36
|
created: isly.tuple(isly.string(), isly.fromIs("Settlement.created", isoly.DateTime.is)),
|
|
34
37
|
regarding: isly.fromIs("Settlement.regarding", isoly.Date.is),
|
|
35
38
|
configuration: isly.string(),
|
|
36
|
-
settled: isly
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
settled: isly.object<{
|
|
40
|
+
user: string
|
|
41
|
+
created: isoly.DateTime
|
|
42
|
+
transactions: Record<string, [isoly.Currency, number]>
|
|
43
|
+
}>({
|
|
44
|
+
user: isly.string(),
|
|
45
|
+
created: isly.fromIs("Settlement.settled.created", isoly.DateTime.is),
|
|
46
|
+
transactions: isly.record(
|
|
47
|
+
isly.string(),
|
|
48
|
+
isly.tuple(isly.fromIs("Settlement.settled.transactions.currency", isoly.Currency.is), isly.number())
|
|
49
|
+
),
|
|
50
|
+
}),
|
|
46
51
|
amount: isly.record(isly.fromIs("Settlement.entries.amount", isoly.Currency.is), isly.number()),
|
|
47
52
|
fee: isly.record(isly.fromIs("Settlement.entries.fee", isoly.Currency.is), isly.number()),
|
|
48
53
|
entries: SettlementEntry.type.array(),
|
|
@@ -67,6 +72,9 @@ export namespace Settlement {
|
|
|
67
72
|
created: isly.tuple(isly.string(), isly.fromIs("Settlement.created", isoly.DateTime.is)),
|
|
68
73
|
regarding: isly.fromIs("Settlement.regarding", isoly.Date.is),
|
|
69
74
|
configuration: isly.string(),
|
|
75
|
+
amount: isly.record(isly.fromIs("Settlement.entries.amount", isoly.Currency.is), isly.number()),
|
|
76
|
+
fee: isly.record(isly.fromIs("Settlement.entries.fee", isoly.Currency.is), isly.number()),
|
|
77
|
+
entries: SettlementEntry.type.array(),
|
|
70
78
|
status: isly.string("ongoing"),
|
|
71
79
|
})
|
|
72
80
|
export const is = type.is
|
package/dist/Merchant/index.d.ts
CHANGED
|
@@ -4,8 +4,11 @@ export interface Merchant {
|
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
category: string;
|
|
7
|
-
country: isoly.CountryCode.Alpha2;
|
|
8
7
|
address: string;
|
|
8
|
+
city: string;
|
|
9
|
+
zip: string;
|
|
10
|
+
state?: string;
|
|
11
|
+
country: isoly.CountryCode.Alpha2;
|
|
9
12
|
}
|
|
10
13
|
export declare namespace Merchant {
|
|
11
14
|
const type: isly.object.ExtendableType<Merchant>;
|
package/dist/Merchant/index.js
CHANGED
|
@@ -5,8 +5,11 @@ export var Merchant;
|
|
|
5
5
|
name: isly.string(),
|
|
6
6
|
id: isly.string(),
|
|
7
7
|
category: isly.string(),
|
|
8
|
-
country: isly.string(),
|
|
9
8
|
address: isly.string(),
|
|
9
|
+
city: isly.string(),
|
|
10
|
+
zip: isly.string(),
|
|
11
|
+
state: isly.string().optional(),
|
|
12
|
+
country: isly.string(),
|
|
10
13
|
});
|
|
11
14
|
Merchant.is = Merchant.type.is;
|
|
12
15
|
Merchant.flaw = Merchant.type.flaw;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Merchant/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Merchant/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAY3B,MAAM,KAAW,QAAQ,CAaxB;AAbD,WAAiB,QAAQ;IACX,aAAI,GAAG,IAAI,CAAC,MAAM,CAAW;QACzC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;QACnB,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE;QACjB,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE;QACvB,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE;QACtB,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;QACnB,GAAG,EAAE,IAAI,CAAC,MAAM,EAAE;QAClB,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC/B,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE;KACtB,CAAC,CAAA;IACW,WAAE,GAAG,SAAA,IAAI,CAAC,EAAE,CAAA;IACZ,aAAI,GAAG,SAAA,IAAI,CAAC,IAAI,CAAA;AAC9B,CAAC,EAbgB,QAAQ,KAAR,QAAQ,QAaxB"}
|
|
@@ -3,7 +3,7 @@ import { isly } from "isly";
|
|
|
3
3
|
import { Entry as SettlementEntry } from "./Entry";
|
|
4
4
|
export type Settlement = Settlement.Succeeded | Settlement.Failed | Settlement.Ongoing;
|
|
5
5
|
export declare namespace Settlement {
|
|
6
|
-
type Summary = Omit<Settlement.Succeeded, "entries"> | Settlement.Failed | Settlement.Ongoing
|
|
6
|
+
type Summary = Omit<Settlement.Succeeded, "entries"> | Settlement.Failed | Omit<Settlement.Ongoing, "entries">;
|
|
7
7
|
interface Base {
|
|
8
8
|
id: string;
|
|
9
9
|
created: [string, isoly.DateTime];
|
|
@@ -12,15 +12,15 @@ export declare namespace Settlement {
|
|
|
12
12
|
status: string;
|
|
13
13
|
}
|
|
14
14
|
interface Succeeded extends Base {
|
|
15
|
-
|
|
15
|
+
status: "succeeded";
|
|
16
|
+
amount: Partial<Record<isoly.Currency, number>>;
|
|
17
|
+
fee: Partial<Record<isoly.Currency, number>>;
|
|
18
|
+
entries: SettlementEntry[];
|
|
19
|
+
settled: {
|
|
16
20
|
user: string;
|
|
17
21
|
created: isoly.DateTime;
|
|
18
22
|
transactions: Record<string, [isoly.Currency, number]>;
|
|
19
23
|
};
|
|
20
|
-
amount: Partial<Record<isoly.Currency, number>>;
|
|
21
|
-
fee: Partial<Record<isoly.Currency, number>>;
|
|
22
|
-
entries: SettlementEntry[];
|
|
23
|
-
status: "succeeded";
|
|
24
24
|
}
|
|
25
25
|
interface Failed extends Base {
|
|
26
26
|
status: "failed";
|
|
@@ -28,6 +28,9 @@ export declare namespace Settlement {
|
|
|
28
28
|
}
|
|
29
29
|
interface Ongoing extends Base {
|
|
30
30
|
status: "ongoing";
|
|
31
|
+
amount: Partial<Record<isoly.Currency, number>>;
|
|
32
|
+
fee: Partial<Record<isoly.Currency, number>>;
|
|
33
|
+
entries: SettlementEntry[];
|
|
31
34
|
}
|
|
32
35
|
namespace Succeeded {
|
|
33
36
|
const type: isly.object.ExtendableType<Succeeded>;
|
package/dist/Settlement/index.js
CHANGED
|
@@ -10,13 +10,11 @@ export var Settlement;
|
|
|
10
10
|
created: isly.tuple(isly.string(), isly.fromIs("Settlement.created", isoly.DateTime.is)),
|
|
11
11
|
regarding: isly.fromIs("Settlement.regarding", isoly.Date.is),
|
|
12
12
|
configuration: isly.string(),
|
|
13
|
-
settled: isly
|
|
14
|
-
.object({
|
|
13
|
+
settled: isly.object({
|
|
15
14
|
user: isly.string(),
|
|
16
15
|
created: isly.fromIs("Settlement.settled.created", isoly.DateTime.is),
|
|
17
16
|
transactions: isly.record(isly.string(), isly.tuple(isly.fromIs("Settlement.settled.transactions.currency", isoly.Currency.is), isly.number())),
|
|
18
|
-
})
|
|
19
|
-
.optional(),
|
|
17
|
+
}),
|
|
20
18
|
amount: isly.record(isly.fromIs("Settlement.entries.amount", isoly.Currency.is), isly.number()),
|
|
21
19
|
fee: isly.record(isly.fromIs("Settlement.entries.fee", isoly.Currency.is), isly.number()),
|
|
22
20
|
entries: SettlementEntry.type.array(),
|
|
@@ -43,6 +41,9 @@ export var Settlement;
|
|
|
43
41
|
created: isly.tuple(isly.string(), isly.fromIs("Settlement.created", isoly.DateTime.is)),
|
|
44
42
|
regarding: isly.fromIs("Settlement.regarding", isoly.Date.is),
|
|
45
43
|
configuration: isly.string(),
|
|
44
|
+
amount: isly.record(isly.fromIs("Settlement.entries.amount", isoly.Currency.is), isly.number()),
|
|
45
|
+
fee: isly.record(isly.fromIs("Settlement.entries.fee", isoly.Currency.is), isly.number()),
|
|
46
|
+
entries: SettlementEntry.type.array(),
|
|
46
47
|
status: isly.string("ongoing"),
|
|
47
48
|
});
|
|
48
49
|
Ongoing.is = Ongoing.type.is;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Settlement/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,KAAK,IAAI,eAAe,EAAE,MAAM,SAAS,CAAA;AAGlD,MAAM,KAAW,UAAU,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Settlement/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAA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