@pax2pay/model-banking 0.1.129 → 0.1.130
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/Treasury/index.ts
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
|
+
import { isoly } from "isoly"
|
|
1
2
|
import { Account as TreasuryAccount } from "./Account"
|
|
2
3
|
import { Balance as TreasuryBalance } from "./Balance"
|
|
3
4
|
import { Fiat as TreasuryFiat } from "./Fiat"
|
|
4
5
|
import { Transaction as TreasuryTransaction } from "./Transaction"
|
|
5
|
-
export { Treasury } from "./Treasury"
|
|
6
6
|
|
|
7
|
+
export { Treasury } from "./Treasury"
|
|
7
8
|
export namespace Treasury {
|
|
9
|
+
export function key(hour?: isoly.DateTime): isoly.DateTime {
|
|
10
|
+
const now = isoly.DateTime.now()
|
|
11
|
+
const latest = isoly.DateTime.getMinute(now) > 15 ? now : isoly.DateTime.previousHour(now)
|
|
12
|
+
return isoly.DateTime.truncate(
|
|
13
|
+
isoly.DateTime.invert(hour && isoly.DateTime.epoch(latest) > isoly.DateTime.epoch(hour) ? hour : latest),
|
|
14
|
+
"hours"
|
|
15
|
+
)
|
|
16
|
+
}
|
|
8
17
|
export type Account = TreasuryAccount
|
|
9
18
|
export type Transaction = TreasuryTransaction
|
|
10
19
|
export type Balance = TreasuryBalance
|
package/dist/Treasury/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { isoly } from "isoly";
|
|
1
2
|
import { Account as TreasuryAccount } from "./Account";
|
|
2
3
|
import { Balance as TreasuryBalance } from "./Balance";
|
|
3
4
|
import { Fiat as TreasuryFiat } from "./Fiat";
|
|
4
5
|
import { Transaction as TreasuryTransaction } from "./Transaction";
|
|
5
6
|
export { Treasury } from "./Treasury";
|
|
6
7
|
export declare namespace Treasury {
|
|
8
|
+
function key(hour?: isoly.DateTime): isoly.DateTime;
|
|
7
9
|
type Account = TreasuryAccount;
|
|
8
10
|
type Transaction = TreasuryTransaction;
|
|
9
11
|
type Balance = TreasuryBalance;
|
package/dist/Treasury/index.js
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
import { isoly } from "isoly";
|
|
1
2
|
import { Account as TreasuryAccount } from "./Account";
|
|
2
3
|
import { Balance as TreasuryBalance } from "./Balance";
|
|
3
4
|
export var Treasury;
|
|
4
5
|
(function (Treasury) {
|
|
6
|
+
function key(hour) {
|
|
7
|
+
const now = isoly.DateTime.now();
|
|
8
|
+
const latest = isoly.DateTime.getMinute(now) > 15 ? now : isoly.DateTime.previousHour(now);
|
|
9
|
+
return isoly.DateTime.truncate(isoly.DateTime.invert(hour && isoly.DateTime.epoch(latest) > isoly.DateTime.epoch(hour) ? hour : latest), "hours");
|
|
10
|
+
}
|
|
11
|
+
Treasury.key = key;
|
|
5
12
|
Treasury.Balance = TreasuryBalance;
|
|
6
13
|
let Account;
|
|
7
14
|
(function (Account) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Treasury/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AAKtD,MAAM,KAAW,QAAQ,
|
|
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,CAuBxB;AAvBD,WAAiB,QAAQ;IACxB,SAAgB,GAAG,CAAC,IAAqB;QACxC,MAAM,GAAG,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAA;QAChC,MAAM,MA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