@pax2pay/model-banking 0.1.609 → 0.1.611
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/Client/Treasury.ts +10 -0
- package/Treasury/Snapshot/index.ts +3 -0
- package/dist/cjs/Client/Treasury.d.ts +3 -0
- package/dist/cjs/Client/Treasury.js +3 -0
- package/dist/cjs/Client/Treasury.js.map +1 -1
- package/dist/cjs/Treasury/Snapshot/index.d.ts +2 -0
- package/dist/cjs/Treasury/Snapshot/index.js +2 -0
- package/dist/cjs/Treasury/Snapshot/index.js.map +1 -1
- package/dist/mjs/Client/Treasury.d.ts +3 -0
- package/dist/mjs/Client/Treasury.js +3 -0
- package/dist/mjs/Client/Treasury.js.map +1 -1
- package/dist/mjs/Treasury/Snapshot/index.d.ts +2 -0
- package/dist/mjs/Treasury/Snapshot/index.js +2 -0
- package/dist/mjs/Treasury/Snapshot/index.js.map +1 -1
- package/package.json +1 -1
package/Client/Treasury.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { gracely } from "gracely"
|
|
2
2
|
import { isoly } from "isoly"
|
|
3
3
|
import { http } from "cloudly-http"
|
|
4
|
+
import { Supplier } from "../Supplier"
|
|
5
|
+
import { Transaction } from "../Transaction"
|
|
4
6
|
import { Treasury as TreasuryModel } from "../Treasury"
|
|
5
7
|
|
|
6
8
|
export class Treasury {
|
|
@@ -16,6 +18,14 @@ export class Treasury {
|
|
|
16
18
|
async listAccounts(): Promise<TreasuryModel.Account.Listable[] | gracely.Error> {
|
|
17
19
|
return this.client.get<TreasuryModel.Account.Listable[]>(`/treasury/account`)
|
|
18
20
|
}
|
|
21
|
+
async notify(
|
|
22
|
+
hour: isoly.DateTime,
|
|
23
|
+
supplier: Supplier,
|
|
24
|
+
currency: isoly.Currency,
|
|
25
|
+
note: Transaction.Note.Creatable
|
|
26
|
+
): Promise<Transaction.Note[] | gracely.Error> {
|
|
27
|
+
return this.client.post<Transaction.Note[]>(`/treasury/snapshot/${hour}/${supplier}/${currency}/note`, note)
|
|
28
|
+
}
|
|
19
29
|
async report(start: isoly.Date, end: isoly.Date, supplier: string): Promise<string | gracely.Error> {
|
|
20
30
|
return this.client.get<string>(`/treasury/${supplier}/report?start=${start}&end=${end}`)
|
|
21
31
|
}
|
|
@@ -2,6 +2,7 @@ import { isoly } from "isoly"
|
|
|
2
2
|
import { isly } from "isly"
|
|
3
3
|
import { Balance } from "../../Balance"
|
|
4
4
|
import { Supplier } from "../../Supplier"
|
|
5
|
+
import { Transaction } from "../../Transaction"
|
|
5
6
|
import { Warning } from "../../Warning"
|
|
6
7
|
import { Account as SnapshotAccount } from "./Account"
|
|
7
8
|
import { Emoney as SnapshotEmoney } from "./Emoney"
|
|
@@ -21,6 +22,7 @@ export interface Snapshot {
|
|
|
21
22
|
buffer: number
|
|
22
23
|
accounts: Snapshot.Account[]
|
|
23
24
|
}
|
|
25
|
+
notes: Transaction.Note[]
|
|
24
26
|
}
|
|
25
27
|
export namespace Snapshot {
|
|
26
28
|
export import funding = snapshotFunding
|
|
@@ -45,5 +47,6 @@ export namespace Snapshot {
|
|
|
45
47
|
buffer: isly.number(),
|
|
46
48
|
accounts: Account.type.array(),
|
|
47
49
|
}),
|
|
50
|
+
notes: Transaction.Note.type.array(),
|
|
48
51
|
})
|
|
49
52
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { gracely } from "gracely";
|
|
2
2
|
import { isoly } from "isoly";
|
|
3
3
|
import { http } from "cloudly-http";
|
|
4
|
+
import { Supplier } from "../Supplier";
|
|
5
|
+
import { Transaction } from "../Transaction";
|
|
4
6
|
import { Treasury as TreasuryModel } from "../Treasury";
|
|
5
7
|
export declare class Treasury {
|
|
6
8
|
private readonly client;
|
|
@@ -8,5 +10,6 @@ export declare class Treasury {
|
|
|
8
10
|
fetch(hour?: isoly.DateTime): Promise<TreasuryModel.Snapshot[] | gracely.Error>;
|
|
9
11
|
listTransactions(accountId: string): Promise<TreasuryModel.Transaction[] | gracely.Error>;
|
|
10
12
|
listAccounts(): Promise<TreasuryModel.Account.Listable[] | gracely.Error>;
|
|
13
|
+
notify(hour: isoly.DateTime, supplier: Supplier, currency: isoly.Currency, note: Transaction.Note.Creatable): Promise<Transaction.Note[] | gracely.Error>;
|
|
11
14
|
report(start: isoly.Date, end: isoly.Date, supplier: string): Promise<string | gracely.Error>;
|
|
12
15
|
}
|
|
@@ -16,6 +16,9 @@ class Treasury {
|
|
|
16
16
|
async listAccounts() {
|
|
17
17
|
return this.client.get(`/treasury/account`);
|
|
18
18
|
}
|
|
19
|
+
async notify(hour, supplier, currency, note) {
|
|
20
|
+
return this.client.post(`/treasury/snapshot/${hour}/${supplier}/${currency}/note`, note);
|
|
21
|
+
}
|
|
19
22
|
async report(start, end, supplier) {
|
|
20
23
|
return this.client.get(`/treasury/${supplier}/report?start=${start}&end=${end}`);
|
|
21
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Treasury.js","sourceRoot":"","sources":["../../../Client/Treasury.ts"],"names":[],"mappings":";;;AACA,iCAA6B;
|
|
1
|
+
{"version":3,"file":"Treasury.js","sourceRoot":"","sources":["../../../Client/Treasury.ts"],"names":[],"mappings":";;;AACA,iCAA6B;AAM7B,MAAa,QAAQ;IACS;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,KAAK,CAAC,IAAqB;QAChC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACrB,wBAAwB,IAAI,CAAC,CAAC,CAAC,IAAI,aAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAClF,CAAA;IACF,CAAC;IACD,KAAK,CAAC,gBAAgB,CAAC,SAAiB;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAA8B,qBAAqB,SAAS,cAAc,CAAC,CAAA;IAClG,CAAC;IACD,KAAK,CAAC,YAAY;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAmC,mBAAmB,CAAC,CAAA;IAC9E,CAAC;IACD,KAAK,CAAC,MAAM,CACX,IAAoB,EACpB,QAAkB,EAClB,QAAwB,EACxB,IAAgC;QAEhC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAqB,sBAAsB,IAAI,IAAI,QAAQ,IAAI,QAAQ,OAAO,EAAE,IAAI,CAAC,CAAA;IAC7G,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,KAAiB,EAAE,GAAe,EAAE,QAAgB;QAChE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAS,aAAa,QAAQ,iBAAiB,KAAK,QAAQ,GAAG,EAAE,CAAC,CAAA;IACzF,CAAC;CACD;AAxBD,4BAwBC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { isoly } from "isoly";
|
|
2
2
|
import { Balance } from "../../Balance";
|
|
3
3
|
import { Supplier } from "../../Supplier";
|
|
4
|
+
import { Transaction } from "../../Transaction";
|
|
4
5
|
import { Warning } from "../../Warning";
|
|
5
6
|
import { Account as SnapshotAccount } from "./Account";
|
|
6
7
|
import { Emoney as SnapshotEmoney } from "./Emoney";
|
|
@@ -21,6 +22,7 @@ export interface Snapshot {
|
|
|
21
22
|
buffer: number;
|
|
22
23
|
accounts: Snapshot.Account[];
|
|
23
24
|
};
|
|
25
|
+
notes: Transaction.Note[];
|
|
24
26
|
}
|
|
25
27
|
export declare namespace Snapshot {
|
|
26
28
|
export import funding = snapshotFunding;
|
|
@@ -5,6 +5,7 @@ const isoly_1 = require("isoly");
|
|
|
5
5
|
const isly_1 = require("isly");
|
|
6
6
|
const Balance_1 = require("../../Balance");
|
|
7
7
|
const Supplier_1 = require("../../Supplier");
|
|
8
|
+
const Transaction_1 = require("../../Transaction");
|
|
8
9
|
const Warning_1 = require("../../Warning");
|
|
9
10
|
const Account_1 = require("./Account");
|
|
10
11
|
const funding_1 = require("./funding");
|
|
@@ -31,6 +32,7 @@ var Snapshot;
|
|
|
31
32
|
buffer: isly_1.isly.number(),
|
|
32
33
|
accounts: Snapshot.Account.type.array(),
|
|
33
34
|
}),
|
|
35
|
+
notes: Transaction_1.Transaction.Note.type.array(),
|
|
34
36
|
});
|
|
35
37
|
})(Snapshot || (exports.Snapshot = Snapshot = {}));
|
|
36
38
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Treasury/Snapshot/index.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,+BAA2B;AAC3B,2CAAuC;AACvC,6CAAyC;AACzC,2CAAuC;AACvC,uCAAsD;AAGtD,uCAAsD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Treasury/Snapshot/index.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,+BAA2B;AAC3B,2CAAuC;AACvC,6CAAyC;AACzC,mDAA+C;AAC/C,2CAAuC;AACvC,uCAAsD;AAGtD,uCAAsD;AAiBtD,IAAiB,QAAQ,CAyBxB;AAzBD,WAAiB,QAAQ;IACV,gBAAO,GAAG,iBAAe,CAAA;IAGzB,gBAAO,GAAG,iBAAe,CAAA;IACvC,SAAgB,QAAQ,CAAC,QAAkB;QAC1C,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAA;QACpC,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,CAAA;QAC1C,OAAO,QAAQ,IAAI,MAAM,CAAA;IAC1B,CAAC;IAJe,iBAAQ,WAIvB,CAAA;IACY,aAAI,GAAG,WAAI,CAAC,MAAM,CAAW;QACzC,QAAQ,EAAE,iBAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE;QACvC,MAAM,EAAE,iBAAO,CAAC,QAAQ;QACxB,QAAQ,EAAE,WAAI,CAAC,MAAM,CAAC,UAAU,EAAE,aAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;QACpD,QAAQ,EAAE,mBAAQ,CAAC,IAAI;QACvB,IAAI,EAAE,WAAI,CAAC,MAAM,CAAC;YACjB,IAAI,EAAE,WAAI,CAAC,MAAM,EAAE;YACnB,MAAM,EAAE,WAAI,CAAC,MAAM,EAAE;YACrB,KAAK,EAAE,WAAI,CAAC,MAAM,EAAE;YACpB,KAAK,EAAE,WAAI,CAAC,MAAM,EAAE;YACpB,MAAM,EAAE,WAAI,CAAC,MAAM,EAAE;YACrB,QAAQ,EAAE,SAAA,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE;SAC9B,CAAC;QACF,KAAK,EAAE,yBAAW,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;KACpC,CAAC,CAAA;AACH,CAAC,EAzBgB,QAAQ,wBAAR,QAAQ,QAyBxB"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { gracely } from "gracely";
|
|
2
2
|
import { isoly } from "isoly";
|
|
3
3
|
import { http } from "cloudly-http";
|
|
4
|
+
import { Supplier } from "../Supplier";
|
|
5
|
+
import { Transaction } from "../Transaction";
|
|
4
6
|
import { Treasury as TreasuryModel } from "../Treasury";
|
|
5
7
|
export declare class Treasury {
|
|
6
8
|
private readonly client;
|
|
@@ -8,5 +10,6 @@ export declare class Treasury {
|
|
|
8
10
|
fetch(hour?: isoly.DateTime): Promise<TreasuryModel.Snapshot[] | gracely.Error>;
|
|
9
11
|
listTransactions(accountId: string): Promise<TreasuryModel.Transaction[] | gracely.Error>;
|
|
10
12
|
listAccounts(): Promise<TreasuryModel.Account.Listable[] | gracely.Error>;
|
|
13
|
+
notify(hour: isoly.DateTime, supplier: Supplier, currency: isoly.Currency, note: Transaction.Note.Creatable): Promise<Transaction.Note[] | gracely.Error>;
|
|
11
14
|
report(start: isoly.Date, end: isoly.Date, supplier: string): Promise<string | gracely.Error>;
|
|
12
15
|
}
|
|
@@ -13,6 +13,9 @@ export class Treasury {
|
|
|
13
13
|
async listAccounts() {
|
|
14
14
|
return this.client.get(`/treasury/account`);
|
|
15
15
|
}
|
|
16
|
+
async notify(hour, supplier, currency, note) {
|
|
17
|
+
return this.client.post(`/treasury/snapshot/${hour}/${supplier}/${currency}/note`, note);
|
|
18
|
+
}
|
|
16
19
|
async report(start, end, supplier) {
|
|
17
20
|
return this.client.get(`/treasury/${supplier}/report?start=${start}&end=${end}`);
|
|
18
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Treasury.js","sourceRoot":"","sources":["../../../Client/Treasury.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Treasury.js","sourceRoot":"","sources":["../../../Client/Treasury.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAM7B,MAAM,OAAO,QAAQ;IACS;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,KAAK,CAAC,IAAqB;QAChC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACrB,wBAAwB,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAClF,CAAA;IACF,CAAC;IACD,KAAK,CAAC,gBAAgB,CAAC,SAAiB;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAA8B,qBAAqB,SAAS,cAAc,CAAC,CAAA;IAClG,CAAC;IACD,KAAK,CAAC,YAAY;QACjB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAmC,mBAAmB,CAAC,CAAA;IAC9E,CAAC;IACD,KAAK,CAAC,MAAM,CACX,IAAoB,EACpB,QAAkB,EAClB,QAAwB,EACxB,IAAgC;QAEhC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAqB,sBAAsB,IAAI,IAAI,QAAQ,IAAI,QAAQ,OAAO,EAAE,IAAI,CAAC,CAAA;IAC7G,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,KAAiB,EAAE,GAAe,EAAE,QAAgB;QAChE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAS,aAAa,QAAQ,iBAAiB,KAAK,QAAQ,GAAG,EAAE,CAAC,CAAA;IACzF,CAAC;CACD"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { isoly } from "isoly";
|
|
2
2
|
import { Balance } from "../../Balance";
|
|
3
3
|
import { Supplier } from "../../Supplier";
|
|
4
|
+
import { Transaction } from "../../Transaction";
|
|
4
5
|
import { Warning } from "../../Warning";
|
|
5
6
|
import { Account as SnapshotAccount } from "./Account";
|
|
6
7
|
import { Emoney as SnapshotEmoney } from "./Emoney";
|
|
@@ -21,6 +22,7 @@ export interface Snapshot {
|
|
|
21
22
|
buffer: number;
|
|
22
23
|
accounts: Snapshot.Account[];
|
|
23
24
|
};
|
|
25
|
+
notes: Transaction.Note[];
|
|
24
26
|
}
|
|
25
27
|
export declare namespace Snapshot {
|
|
26
28
|
export import funding = snapshotFunding;
|
|
@@ -2,6 +2,7 @@ import { isoly } from "isoly";
|
|
|
2
2
|
import { isly } from "isly";
|
|
3
3
|
import { Balance } from "../../Balance";
|
|
4
4
|
import { Supplier } from "../../Supplier";
|
|
5
|
+
import { Transaction } from "../../Transaction";
|
|
5
6
|
import { Warning } from "../../Warning";
|
|
6
7
|
import { Account as SnapshotAccount } from "./Account";
|
|
7
8
|
import { funding as snapshotFunding } from "./funding";
|
|
@@ -28,6 +29,7 @@ export var Snapshot;
|
|
|
28
29
|
buffer: isly.number(),
|
|
29
30
|
accounts: Snapshot.Account.type.array(),
|
|
30
31
|
}),
|
|
32
|
+
notes: Transaction.Note.type.array(),
|
|
31
33
|
});
|
|
32
34
|
})(Snapshot || (Snapshot = {}));
|
|
33
35
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +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,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AAGtD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;
|
|
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,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AAGtD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AAiBtD,MAAM,KAAW,QAAQ,CAyBxB;AAzBD,WAAiB,QAAQ;IACV,gBAAO,GAAG,eAAe,CAAA;IAGzB,gBAAO,GAAG,eAAe,CAAA;IACvC,SAAgB,QAAQ,CAAC,QAAkB;QAC1C,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAA;QACpC,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,CAAA;QAC1C,OAAO,QAAQ,IAAI,MAAM,CAAA;IAC1B,CAAC;IAJe,iBAAQ,WAIvB,CAAA;IACY,aAAI,GAAG,IAAI,CAAC,MAAM,CAAW;QACzC,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE;QACvC,MAAM,EAAE,OAAO,CAAC,QAAQ;QACxB,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;QACpD,QAAQ,EAAE,QAAQ,CAAC,IAAI;QACvB,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,SAAA,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE;SAC9B,CAAC;QACF,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;KACpC,CAAC,CAAA;AACH,CAAC,EAzBgB,QAAQ,KAAR,QAAQ,QAyBxB"}
|