@pax2pay/model-banking 0.1.255 → 0.1.256

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 (33) hide show
  1. package/Client/Treasury.ts +2 -2
  2. package/Treasury/Snapshot/Fragment.ts +32 -0
  3. package/Treasury/Snapshot/Warning/Overdraft.ts +16 -0
  4. package/Treasury/Snapshot/Warning/index.ts +7 -0
  5. package/Treasury/Snapshot/index.ts +14 -0
  6. package/Treasury/index.ts +7 -3
  7. package/dist/Client/Treasury.d.ts +1 -1
  8. package/dist/Client/Treasury.js +1 -1
  9. package/dist/Client/Treasury.js.map +1 -1
  10. package/dist/Treasury/Snapshot/Fragment.d.ts +19 -0
  11. package/dist/Treasury/Snapshot/Fragment.js +20 -0
  12. package/dist/Treasury/Snapshot/Fragment.js.map +1 -0
  13. package/dist/Treasury/Snapshot/Warning/Overdraft.d.ts +10 -0
  14. package/dist/Treasury/Snapshot/Warning/Overdraft.js +11 -0
  15. package/dist/Treasury/Snapshot/Warning/Overdraft.js.map +1 -0
  16. package/dist/Treasury/Snapshot/Warning/index.d.ts +5 -0
  17. package/dist/Treasury/Snapshot/Warning/index.js +6 -0
  18. package/dist/Treasury/Snapshot/Warning/index.js.map +1 -0
  19. package/dist/Treasury/Snapshot/index.d.ts +192 -0
  20. package/dist/Treasury/Snapshot/index.js +11 -0
  21. package/dist/Treasury/Snapshot/index.js.map +1 -0
  22. package/dist/Treasury/index.d.ts +7 -3
  23. package/dist/Treasury/index.js +2 -0
  24. package/dist/Treasury/index.js.map +1 -1
  25. package/package.json +1 -1
  26. package/Treasury/Fiat/index.ts +0 -10
  27. package/Treasury/Treasury.ts +0 -5
  28. package/dist/Treasury/Fiat/index.d.ts +0 -9
  29. package/dist/Treasury/Fiat/index.js +0 -2
  30. package/dist/Treasury/Fiat/index.js.map +0 -1
  31. package/dist/Treasury/Treasury.d.ts +0 -7
  32. package/dist/Treasury/Treasury.js +0 -2
  33. package/dist/Treasury/Treasury.js.map +0 -1
@@ -13,9 +13,9 @@ export class Treasury extends rest.Collection<gracely.Error> {
13
13
  async change(currency: isoly.Currency, changes: Result[]): Promise<gracely.Result> {
14
14
  return this.client.patch(`/treasury/${currency}`, changes)
15
15
  }
16
- async fetch(hour?: isoly.DateTime): Promise<TreasuryModel | gracely.Error> {
16
+ async fetch(hour?: isoly.DateTime): Promise<TreasuryModel.Snapshot | gracely.Error> {
17
17
  const path = hour ? `/${isoly.DateTime.truncate(hour, "hours")}` : ""
18
- return this.client.get<TreasuryModel>(`/treasury${path}`)
18
+ return this.client.get<TreasuryModel.Snapshot>(`/treasury/snapshot/${path}`)
19
19
  }
20
20
  async listTransactions(accountId: string): Promise<TreasuryModel.Transaction[] | gracely.Error> {
21
21
  return this.client.get<TreasuryModel.Transaction[]>(`/treasury/account/${accountId}/transaction`)
@@ -0,0 +1,32 @@
1
+ import { isly } from "isly"
2
+ import { Balances } from "../../Balances"
3
+ import { Account } from "../Account"
4
+ import { Warning } from "./Warning"
5
+
6
+ export interface Fragment {
7
+ warnings: Warning[]
8
+ emoney: Balances.Balance
9
+ fiat: {
10
+ safe: number
11
+ unsafe: number
12
+ total: number // emoney issuable total amount
13
+ other: number
14
+ buffer: number
15
+ accounts: Account[]
16
+ }
17
+ }
18
+
19
+ export namespace Fragment {
20
+ export const type = isly.object<Fragment>({
21
+ warnings: Warning.type.array(),
22
+ emoney: Balances.Balance.type,
23
+ fiat: isly.object({
24
+ safe: isly.number(),
25
+ unsafe: isly.number(),
26
+ total: isly.number(),
27
+ other: isly.number(),
28
+ buffer: isly.number(),
29
+ accounts: Account.type.array(),
30
+ }),
31
+ })
32
+ }
@@ -0,0 +1,16 @@
1
+ import { isly } from "isly"
2
+ import { Balances } from "../../../Balances"
3
+
4
+ export interface Overdraft {
5
+ type: "overdraft"
6
+ account: string
7
+ balance: Balances.Balance
8
+ }
9
+
10
+ export namespace Overdraft {
11
+ export const type = isly.object<Overdraft>({
12
+ type: isly.string("overdraft"),
13
+ account: isly.string(),
14
+ balance: Balances.Balance.type,
15
+ })
16
+ }
@@ -0,0 +1,7 @@
1
+ import { Overdraft } from "./Overdraft"
2
+
3
+ export type Warning = Overdraft
4
+
5
+ export namespace Warning {
6
+ export const type = Overdraft.type
7
+ }
@@ -0,0 +1,14 @@
1
+ import { isoly } from "isoly"
2
+ import { isly } from "isly"
3
+ import { Fragment as SnapshotFragment } from "./Fragment"
4
+ import { Warning as SnapshotWarning } from "./Warning"
5
+
6
+ export type Snapshot = Partial<Record<isoly.Currency, Snapshot.Fragment>>
7
+
8
+ export namespace Snapshot {
9
+ export type Fragment = SnapshotFragment
10
+ export const Fragment = SnapshotFragment
11
+ export type Warning = SnapshotWarning
12
+ export const Warning = SnapshotWarning
13
+ export const type = isly.record(isly.fromIs("Currency", isoly.Currency.is), Fragment.type)
14
+ }
package/Treasury/index.ts CHANGED
@@ -1,10 +1,9 @@
1
1
  import { isoly } from "isoly"
2
2
  import { Account as TreasuryAccount } from "./Account"
3
3
  import { Balance as TreasuryBalance } from "./Balance"
4
- import { Fiat as TreasuryFiat } from "./Fiat"
4
+ import { Snapshot as TreasurySnapshot } from "./Snapshot"
5
5
  import { Transaction as TreasuryTransaction } from "./Transaction"
6
6
 
7
- export { Treasury } from "./Treasury"
8
7
  export namespace Treasury {
9
8
  export function key(hour?: isoly.DateTime): isoly.DateTime {
10
9
  const now = isoly.DateTime.now()
@@ -17,8 +16,13 @@ export namespace Treasury {
17
16
  export type Account = TreasuryAccount
18
17
  export type Transaction = TreasuryTransaction
19
18
  export type Balance = TreasuryBalance
20
- export type Fiat = TreasuryFiat
21
19
  export const Balance = TreasuryBalance
20
+ export type Snapshot = TreasurySnapshot
21
+ export const Snapshot = TreasurySnapshot
22
+ export namespace Snapshot {
23
+ export type Fragment = TreasurySnapshot.Fragment
24
+ export type Warning = TreasurySnapshot.Warning
25
+ }
22
26
  export namespace Account {
23
27
  export type Creatable = TreasuryAccount.Creatable
24
28
  export const Creatable = TreasuryAccount.Creatable
@@ -7,6 +7,6 @@ import { Result } from "../Treasury/Balance";
7
7
  export declare class Treasury extends rest.Collection<gracely.Error> {
8
8
  constructor(client: http.Client);
9
9
  change(currency: isoly.Currency, changes: Result[]): Promise<gracely.Result>;
10
- fetch(hour?: isoly.DateTime): Promise<TreasuryModel | gracely.Error>;
10
+ fetch(hour?: isoly.DateTime): Promise<TreasuryModel.Snapshot | gracely.Error>;
11
11
  listTransactions(accountId: string): Promise<TreasuryModel.Transaction[] | gracely.Error>;
12
12
  }
@@ -9,7 +9,7 @@ export class Treasury extends rest.Collection {
9
9
  }
10
10
  async fetch(hour) {
11
11
  const path = hour ? `/${isoly.DateTime.truncate(hour, "hours")}` : "";
12
- return this.client.get(`/treasury${path}`);
12
+ return this.client.get(`/treasury/snapshot/${path}`);
13
13
  }
14
14
  async listTransactions(accountId) {
15
15
  return this.client.get(`/treasury/account/${accountId}/transaction`);
@@ -1 +1 @@
1
- {"version":3,"file":"Treasury.js","sourceRoot":"../","sources":["Client/Treasury.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAE7B,OAAO,KAAK,IAAI,MAAM,cAAc,CAAA;AAIpC,MAAM,OAAO,QAAS,SAAQ,IAAI,CAAC,UAAyB;IAC3D,YAAY,MAAmB;QAC9B,KAAK,CAAC,MAAM,CAAC,CAAA;IACd,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAwB,EAAE,OAAiB;QACvD,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAA;IAC3D,CAAC;IACD,KAAK,CAAC,KAAK,CAAC,IAAqB;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;QACrE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAgB,YAAY,IAAI,EAAE,CAAC,CAAA;IAC1D,CAAC;IACD,KAAK,CAAC,gBAAgB,CAAC,SAAiB;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAA8B,qBAAqB,SAAS,cAAc,CAAC,CAAA;IAClG,CAAC;CACD"}
1
+ {"version":3,"file":"Treasury.js","sourceRoot":"../","sources":["Client/Treasury.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAE7B,OAAO,KAAK,IAAI,MAAM,cAAc,CAAA;AAIpC,MAAM,OAAO,QAAS,SAAQ,IAAI,CAAC,UAAyB;IAC3D,YAAY,MAAmB;QAC9B,KAAK,CAAC,MAAM,CAAC,CAAA;IACd,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,QAAwB,EAAE,OAAiB;QACvD,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAA;IAC3D,CAAC;IACD,KAAK,CAAC,KAAK,CAAC,IAAqB;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;QACrE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAyB,sBAAsB,IAAI,EAAE,CAAC,CAAA;IAC7E,CAAC;IACD,KAAK,CAAC,gBAAgB,CAAC,SAAiB;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAA8B,qBAAqB,SAAS,cAAc,CAAC,CAAA;IAClG,CAAC;CACD"}
@@ -0,0 +1,19 @@
1
+ import { isly } from "isly";
2
+ import { Balances } from "../../Balances";
3
+ import { Account } from "../Account";
4
+ import { Warning } from "./Warning";
5
+ export interface Fragment {
6
+ warnings: Warning[];
7
+ emoney: Balances.Balance;
8
+ fiat: {
9
+ safe: number;
10
+ unsafe: number;
11
+ total: number;
12
+ other: number;
13
+ buffer: number;
14
+ accounts: Account[];
15
+ };
16
+ }
17
+ export declare namespace Fragment {
18
+ const type: isly.object.ExtendableType<Fragment>;
19
+ }
@@ -0,0 +1,20 @@
1
+ import { isly } from "isly";
2
+ import { Balances } from "../../Balances";
3
+ import { Account } from "../Account";
4
+ import { Warning } from "./Warning";
5
+ export var Fragment;
6
+ (function (Fragment) {
7
+ Fragment.type = isly.object({
8
+ warnings: Warning.type.array(),
9
+ emoney: Balances.Balance.type,
10
+ fiat: isly.object({
11
+ safe: isly.number(),
12
+ unsafe: isly.number(),
13
+ total: isly.number(),
14
+ other: isly.number(),
15
+ buffer: isly.number(),
16
+ accounts: Account.type.array(),
17
+ }),
18
+ });
19
+ })(Fragment || (Fragment = {}));
20
+ //# sourceMappingURL=Fragment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Fragment.js","sourceRoot":"../","sources":["Treasury/Snapshot/Fragment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAenC,MAAM,KAAW,QAAQ,CAaxB;AAbD,WAAiB,QAAQ;IACX,aAAI,GAAG,IAAI,CAAC,MAAM,CAAW;QACzC,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE;QAC9B,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI;QAC7B,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;YACjB,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;YACnB,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;YACrB,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE;YACpB,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE;YACpB,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;YACrB,QAAQ,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE;SAC9B,CAAC;KACF,CAAC,CAAA;AACH,CAAC,EAbgB,QAAQ,KAAR,QAAQ,QAaxB"}
@@ -0,0 +1,10 @@
1
+ import { isly } from "isly";
2
+ import { Balances } from "../../../Balances";
3
+ export interface Overdraft {
4
+ type: "overdraft";
5
+ account: string;
6
+ balance: Balances.Balance;
7
+ }
8
+ export declare namespace Overdraft {
9
+ const type: isly.object.ExtendableType<Overdraft>;
10
+ }
@@ -0,0 +1,11 @@
1
+ import { isly } from "isly";
2
+ import { Balances } from "../../../Balances";
3
+ export var Overdraft;
4
+ (function (Overdraft) {
5
+ Overdraft.type = isly.object({
6
+ type: isly.string("overdraft"),
7
+ account: isly.string(),
8
+ balance: Balances.Balance.type,
9
+ });
10
+ })(Overdraft || (Overdraft = {}));
11
+ //# sourceMappingURL=Overdraft.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Overdraft.js","sourceRoot":"../","sources":["Treasury/Snapshot/Warning/Overdraft.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAQ5C,MAAM,KAAW,SAAS,CAMzB;AAND,WAAiB,SAAS;IACZ,cAAI,GAAG,IAAI,CAAC,MAAM,CAAY;QAC1C,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;QAC9B,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE;QACtB,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI;KAC9B,CAAC,CAAA;AACH,CAAC,EANgB,SAAS,KAAT,SAAS,QAMzB"}
@@ -0,0 +1,5 @@
1
+ import { Overdraft } from "./Overdraft";
2
+ export type Warning = Overdraft;
3
+ export declare namespace Warning {
4
+ const type: import("isly/dist/cjs/object").object.ExtendableType<Overdraft>;
5
+ }
@@ -0,0 +1,6 @@
1
+ import { Overdraft } from "./Overdraft";
2
+ export var Warning;
3
+ (function (Warning) {
4
+ Warning.type = Overdraft.type;
5
+ })(Warning || (Warning = {}));
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"../","sources":["Treasury/Snapshot/Warning/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAIvC,MAAM,KAAW,OAAO,CAEvB;AAFD,WAAiB,OAAO;IACV,YAAI,GAAG,SAAS,CAAC,IAAI,CAAA;AACnC,CAAC,EAFgB,OAAO,KAAP,OAAO,QAEvB"}
@@ -0,0 +1,192 @@
1
+ import { isoly } from "isoly";
2
+ import { isly } from "isly";
3
+ import { Fragment as SnapshotFragment } from "./Fragment";
4
+ import { Warning as SnapshotWarning } from "./Warning";
5
+ export type Snapshot = Partial<Record<isoly.Currency, Snapshot.Fragment>>;
6
+ export declare namespace Snapshot {
7
+ type Fragment = SnapshotFragment;
8
+ const Fragment: typeof SnapshotFragment;
9
+ type Warning = SnapshotWarning;
10
+ const Warning: typeof SnapshotWarning;
11
+ const type: isly.Type<{
12
+ BTN: any;
13
+ CHE: any;
14
+ MKD: any;
15
+ AED: any;
16
+ AFN: any;
17
+ ALL: any;
18
+ AMD: any;
19
+ ANG: any;
20
+ AOA: any;
21
+ ARS: any;
22
+ AUD: any;
23
+ AWG: any;
24
+ AZN: any;
25
+ BAM: any;
26
+ BBD: any;
27
+ BDT: any;
28
+ BGN: any;
29
+ BHD: any;
30
+ BIF: any;
31
+ BMD: any;
32
+ BND: any;
33
+ BOB: any;
34
+ BOV: any;
35
+ BRL: any;
36
+ BSD: any;
37
+ BWP: any;
38
+ BYN: any;
39
+ BZD: any;
40
+ CAD: any;
41
+ CDF: any;
42
+ CHF: any;
43
+ CHW: any;
44
+ CLF: any;
45
+ CLP: any;
46
+ CNY: any;
47
+ COP: any;
48
+ COU: any;
49
+ CRC: any;
50
+ CUC: any;
51
+ CUP: any;
52
+ CVE: any;
53
+ CZK: any;
54
+ DJF: any;
55
+ DKK: any;
56
+ DOP: any;
57
+ DZD: any;
58
+ EGP: any;
59
+ ERN: any;
60
+ ETB: any;
61
+ EUR: any;
62
+ FJD: any;
63
+ FKP: any;
64
+ GBP: any;
65
+ GEL: any;
66
+ GHS: any;
67
+ GIP: any;
68
+ GMD: any;
69
+ GNF: any;
70
+ GTQ: any;
71
+ GYD: any;
72
+ HKD: any;
73
+ HNL: any;
74
+ HRK: any;
75
+ HTG: any;
76
+ HUF: any;
77
+ IDR: any;
78
+ ILS: any;
79
+ INR: any;
80
+ IQD: any;
81
+ IRR: any;
82
+ ISK: any;
83
+ JMD: any;
84
+ JOD: any;
85
+ JPY: any;
86
+ KES: any;
87
+ KGS: any;
88
+ KHR: any;
89
+ KMF: any;
90
+ KPW: any;
91
+ KRW: any;
92
+ KWD: any;
93
+ KYD: any;
94
+ KZT: any;
95
+ LAK: any;
96
+ LBP: any;
97
+ LKR: any;
98
+ LRD: any;
99
+ LSL: any;
100
+ LYD: any;
101
+ MAD: any;
102
+ MDL: any;
103
+ MGA: any;
104
+ MMK: any;
105
+ MNT: any;
106
+ MOP: any;
107
+ MRU: any;
108
+ MUR: any;
109
+ MVR: any;
110
+ MWK: any;
111
+ MXN: any;
112
+ MXV: any;
113
+ MYR: any;
114
+ MZN: any;
115
+ NAD: any;
116
+ NGN: any;
117
+ NIO: any;
118
+ NOK: any;
119
+ NPR: any;
120
+ NZD: any;
121
+ OMR: any;
122
+ PAB: any;
123
+ PEN: any;
124
+ PGK: any;
125
+ PHP: any;
126
+ PKR: any;
127
+ PLN: any;
128
+ PYG: any;
129
+ QAR: any;
130
+ RON: any;
131
+ RSD: any;
132
+ RUB: any;
133
+ RWF: any;
134
+ SAR: any;
135
+ SBD: any;
136
+ SCR: any;
137
+ SDG: any;
138
+ SEK: any;
139
+ SGD: any;
140
+ SHP: any;
141
+ SLL: any;
142
+ SOS: any;
143
+ SRD: any;
144
+ SSP: any;
145
+ STN: any;
146
+ SVC: any;
147
+ SYP: any;
148
+ SZL: any;
149
+ THB: any;
150
+ TJS: any;
151
+ TMT: any;
152
+ TND: any;
153
+ TOP: any;
154
+ TRY: any;
155
+ TTD: any;
156
+ TWD: any;
157
+ TZS: any;
158
+ UAH: any;
159
+ UGX: any;
160
+ USD: any;
161
+ USN: any;
162
+ UYI: any;
163
+ UYU: any;
164
+ UYW: any;
165
+ UZS: any;
166
+ VES: any;
167
+ VND: any;
168
+ VUV: any;
169
+ WST: any;
170
+ XAF: any;
171
+ XAG: any;
172
+ XAU: any;
173
+ XBA: any;
174
+ XBB: any;
175
+ XBC: any;
176
+ XBD: any;
177
+ XCD: any;
178
+ XDR: any;
179
+ XOF: any;
180
+ XPD: any;
181
+ XPF: any;
182
+ XPT: any;
183
+ XSU: any;
184
+ XTS: any;
185
+ XUA: any;
186
+ XXX: any;
187
+ YER: any;
188
+ ZAR: any;
189
+ ZMW: any;
190
+ ZWL: any;
191
+ }>;
192
+ }
@@ -0,0 +1,11 @@
1
+ import { isoly } from "isoly";
2
+ import { isly } from "isly";
3
+ import { Fragment as SnapshotFragment } from "./Fragment";
4
+ import { Warning as SnapshotWarning } from "./Warning";
5
+ export var Snapshot;
6
+ (function (Snapshot) {
7
+ Snapshot.Fragment = SnapshotFragment;
8
+ Snapshot.Warning = SnapshotWarning;
9
+ Snapshot.type = isly.record(isly.fromIs("Currency", isoly.Currency.is), Snapshot.Fragment.type);
10
+ })(Snapshot || (Snapshot = {}));
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"../","sources":["Treasury/Snapshot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,QAAQ,IAAI,gBAAgB,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AAItD,MAAM,KAAW,QAAQ,CAMxB;AAND,WAAiB,QAAQ;IAEX,iBAAQ,GAAG,gBAAgB,CAAA;IAE3B,gBAAO,GAAG,eAAe,CAAA;IACzB,aAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,SAAA,QAAQ,CAAC,IAAI,CAAC,CAAA;AAC3F,CAAC,EANgB,QAAQ,KAAR,QAAQ,QAMxB"}
@@ -1,16 +1,20 @@
1
1
  import { isoly } from "isoly";
2
2
  import { Account as TreasuryAccount } from "./Account";
3
3
  import { Balance as TreasuryBalance } from "./Balance";
4
- import { Fiat as TreasuryFiat } from "./Fiat";
4
+ import { Snapshot as TreasurySnapshot } from "./Snapshot";
5
5
  import { Transaction as TreasuryTransaction } from "./Transaction";
6
- export { Treasury } from "./Treasury";
7
6
  export declare namespace Treasury {
8
7
  function key(hour?: isoly.DateTime): isoly.DateTime;
9
8
  type Account = TreasuryAccount;
10
9
  type Transaction = TreasuryTransaction;
11
10
  type Balance = TreasuryBalance;
12
- type Fiat = TreasuryFiat;
13
11
  const Balance: typeof TreasuryBalance;
12
+ type Snapshot = TreasurySnapshot;
13
+ const Snapshot: typeof TreasurySnapshot;
14
+ namespace Snapshot {
15
+ type Fragment = TreasurySnapshot.Fragment;
16
+ type Warning = TreasurySnapshot.Warning;
17
+ }
14
18
  namespace Account {
15
19
  type Creatable = TreasuryAccount.Creatable;
16
20
  const Creatable: typeof import("./Account/Creatable").Creatable;
@@ -1,6 +1,7 @@
1
1
  import { isoly } from "isoly";
2
2
  import { Account as TreasuryAccount } from "./Account";
3
3
  import { Balance as TreasuryBalance } from "./Balance";
4
+ import { Snapshot as TreasurySnapshot } from "./Snapshot";
4
5
  export var Treasury;
5
6
  (function (Treasury) {
6
7
  function key(hour) {
@@ -10,6 +11,7 @@ export var Treasury;
10
11
  }
11
12
  Treasury.key = key;
12
13
  Treasury.Balance = TreasuryBalance;
14
+ Treasury.Snapshot = TreasurySnapshot;
13
15
  let Account;
14
16
  (function (Account) {
15
17
  Account.Creatable = TreasuryAccount.Creatable;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../","sources":["Treasury/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AAKtD,MAAM,KAAW,QAAQ,CA2BxB;AA3BD,WAAiB,QAAQ;IACxB,SAAgB,GAAG,CAAC,IAAqB;QACxC,MAAM,GAAG,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAA;QAChC,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;QAC1F,OAAO,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAC7B,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,EACxG,OAAO,CACP,CAAA;IACF,CAAC;IAPe,YAAG,MAOlB,CAAA;IAKY,gBAAO,GAAG,eAAe,CAAA;IACtC,IAAiB,OAAO,CAYvB;IAZD,WAAiB,OAAO;QAEV,iBAAS,GAAG,eAAe,CAAC,SAAS,CAAA;QAErC,gBAAQ,GAAG,eAAe,CAAC,QAAQ,CAAA;QAEnC,iBAAS,GAAG,eAAe,CAAC,SAAS,CAAA;QAErC,kBAAU,GAAG,eAAe,CAAC,UAAU,CAAA;QAEvC,gBAAQ,GAAG,eAAe,CAAC,QAAQ,CAAA;QACnC,UAAE,GAAG,eAAe,CAAC,EAAE,CAAA;IACrC,CAAC,EAZgB,OAAO,GAAP,gBAAO,KAAP,gBAAO,QAYvB;AACF,CAAC,EA3BgB,QAAQ,KAAR,QAAQ,QA2BxB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../","sources":["Treasury/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,QAAQ,IAAI,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAGzD,MAAM,KAAW,QAAQ,CAgCxB;AAhCD,WAAiB,QAAQ;IACxB,SAAgB,GAAG,CAAC,IAAqB;QACxC,MAAM,GAAG,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAA;QAChC,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;QAC1F,OAAO,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAC7B,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,EACxG,OAAO,CACP,CAAA;IACF,CAAC;IAPe,YAAG,MAOlB,CAAA;IAIY,gBAAO,GAAG,eAAe,CAAA;IAEzB,iBAAQ,GAAG,gBAAgB,CAAA;IAKxC,IAAiB,OAAO,CAYvB;IAZD,WAAiB,OAAO;QAEV,iBAAS,GAAG,eAAe,CAAC,SAAS,CAAA;QAErC,gBAAQ,GAAG,eAAe,CAAC,QAAQ,CAAA;QAEnC,iBAAS,GAAG,eAAe,CAAC,SAAS,CAAA;QAErC,kBAAU,GAAG,eAAe,CAAC,UAAU,CAAA;QAEvC,gBAAQ,GAAG,eAAe,CAAC,QAAQ,CAAA;QACnC,UAAE,GAAG,eAAe,CAAC,EAAE,CAAA;IACrC,CAAC,EAZgB,OAAO,GAAP,gBAAO,KAAP,gBAAO,QAYvB;AACF,CAAC,EAhCgB,QAAQ,KAAR,QAAQ,QAgCxB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/model-banking",
3
- "version": "0.1.255",
3
+ "version": "0.1.256",
4
4
  "description": "Library containing data model types and functions for the Pax2Pay Banking API.",
5
5
  "author": "Pax2Pay Ltd",
6
6
  "license": "MIT",
@@ -1,10 +0,0 @@
1
- import { Account } from "../Account"
2
-
3
- export interface Fiat {
4
- safe: number
5
- unsafe: number
6
- total: number // emoney issuable total amount
7
- other: number
8
- buffer: number
9
- accounts: Account[]
10
- }
@@ -1,5 +0,0 @@
1
- import { isoly } from "isoly"
2
- import { Balances } from "../Balances"
3
- import { Fiat } from "./Fiat"
4
-
5
- export type Treasury = Partial<Record<isoly.Currency, { emoney: Balances.Balance; fiat: Fiat }>>
@@ -1,9 +0,0 @@
1
- import { Account } from "../Account";
2
- export interface Fiat {
3
- safe: number;
4
- unsafe: number;
5
- total: number;
6
- other: number;
7
- buffer: number;
8
- accounts: Account[];
9
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../","sources":["Treasury/Fiat/index.ts"],"names":[],"mappings":""}
@@ -1,7 +0,0 @@
1
- import { isoly } from "isoly";
2
- import { Balances } from "../Balances";
3
- import { Fiat } from "./Fiat";
4
- export type Treasury = Partial<Record<isoly.Currency, {
5
- emoney: Balances.Balance;
6
- fiat: Fiat;
7
- }>>;
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=Treasury.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Treasury.js","sourceRoot":"../","sources":["Treasury/Treasury.ts"],"names":[],"mappings":""}