@pax2pay/model-banking 0.1.300 → 0.1.301
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 +2 -2
- package/Treasury/Account/index.ts +10 -20
- package/Treasury/index.ts +1 -14
- package/dist/Client/Treasury.d.ts +1 -1
- package/dist/Client/Treasury.js.map +1 -1
- package/dist/Treasury/Account/index.d.ts +9 -13
- package/dist/Treasury/Account/index.js +3 -10
- package/dist/Treasury/Account/index.js.map +1 -1
- package/dist/Treasury/index.d.ts +1 -14
- package/dist/Treasury/index.js +1 -9
- package/dist/Treasury/index.js.map +1 -1
- package/package.json +1 -1
package/Client/Treasury.ts
CHANGED
|
@@ -16,7 +16,7 @@ export class Treasury {
|
|
|
16
16
|
async listTransactions(accountId: string): Promise<TreasuryModel.Transaction[] | gracely.Error> {
|
|
17
17
|
return this.client.get<TreasuryModel.Transaction[]>(`/treasury/account/${accountId}/transaction`)
|
|
18
18
|
}
|
|
19
|
-
async listAccounts(): Promise<TreasuryModel.Account[] | gracely.Error> {
|
|
20
|
-
return this.client.get<TreasuryModel.Account[]>(`/treasury/account`)
|
|
19
|
+
async listAccounts(): Promise<TreasuryModel.Account.Listable[] | gracely.Error> {
|
|
20
|
+
return this.client.get<TreasuryModel.Account.Listable[]>(`/treasury/account`)
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -5,6 +5,7 @@ import { Rail } from "../../Rail"
|
|
|
5
5
|
import { Realm } from "../../Realm"
|
|
6
6
|
import { Supplier } from "../../Supplier"
|
|
7
7
|
import { Balance } from "../Balance"
|
|
8
|
+
import { Transaction } from "../Transaction"
|
|
8
9
|
import { Category as AccountCategory } from "./Category"
|
|
9
10
|
import { Conditions as AccountConditions } from "./Conditions"
|
|
10
11
|
import { Creatable as AccountCreatable } from "./Creatable"
|
|
@@ -24,35 +25,24 @@ export interface Account {
|
|
|
24
25
|
rail: Rail.Address[]
|
|
25
26
|
balance: Balance
|
|
26
27
|
}
|
|
27
|
-
|
|
28
28
|
export namespace Account {
|
|
29
29
|
export const type = isly.object<Account>({
|
|
30
30
|
id: isly.string(),
|
|
31
31
|
created: isly.fromIs("Treasury.Account.Created", isoly.DateTime.is),
|
|
32
32
|
name: isly.string(),
|
|
33
|
-
realm:
|
|
34
|
-
supplier:
|
|
33
|
+
realm: Realm.type,
|
|
34
|
+
supplier: Supplier.type,
|
|
35
35
|
reference: isly.string(),
|
|
36
36
|
currencies: isly.fromIs("Treasury.Account.currencies", isoly.Currency.is).array(),
|
|
37
37
|
type: AccountCategory.type,
|
|
38
38
|
conditions: AccountConditions.type,
|
|
39
|
-
rail:
|
|
39
|
+
rail: Rail.Address.type.array(),
|
|
40
40
|
balance: isly.fromIs("Treasury.Account.balance", Balance.is),
|
|
41
41
|
})
|
|
42
|
-
export
|
|
43
|
-
export
|
|
44
|
-
export
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
export type Creatable = AccountCreatable
|
|
49
|
-
export const Creatable = AccountCreatable
|
|
50
|
-
export type Storable = AccountStorable
|
|
51
|
-
export const Storable = AccountStorable
|
|
52
|
-
export type Fetchable = AccountFetchable
|
|
53
|
-
export const Fetchable = AccountFetchable
|
|
54
|
-
export type Category = AccountCategory
|
|
55
|
-
export const Category = AccountCategory
|
|
56
|
-
export type Conditions = AccountConditions
|
|
57
|
-
export const Conditions = AccountConditions
|
|
42
|
+
export type Listable = Account & { transactions: Transaction[] }
|
|
43
|
+
export import Creatable = AccountCreatable
|
|
44
|
+
export import Storable = AccountStorable
|
|
45
|
+
export import Fetchable = AccountFetchable
|
|
46
|
+
export import Category = AccountCategory
|
|
47
|
+
export import Conditions = AccountConditions
|
|
58
48
|
}
|
package/Treasury/index.ts
CHANGED
|
@@ -15,20 +15,7 @@ export namespace Treasury {
|
|
|
15
15
|
}
|
|
16
16
|
export import Transaction = TreasuryTransaction
|
|
17
17
|
export import Snapshot = TreasurySnapshot
|
|
18
|
+
export import Account = TreasuryAccount
|
|
18
19
|
export type Balance = TreasuryBalance
|
|
19
20
|
export const Balance = TreasuryBalance
|
|
20
|
-
export type Account = TreasuryAccount
|
|
21
|
-
export namespace Account {
|
|
22
|
-
export type Creatable = TreasuryAccount.Creatable
|
|
23
|
-
export const Creatable = TreasuryAccount.Creatable
|
|
24
|
-
export type Storable = TreasuryAccount.Storable
|
|
25
|
-
export const Storable = TreasuryAccount.Storable
|
|
26
|
-
export type Fetchable = TreasuryAccount.Fetchable
|
|
27
|
-
export const Fetchable = TreasuryAccount.Fetchable
|
|
28
|
-
export type Conditions = TreasuryAccount.Conditions
|
|
29
|
-
export const Conditions = TreasuryAccount.Conditions
|
|
30
|
-
export type Category = TreasuryAccount.Category
|
|
31
|
-
export const Category = TreasuryAccount.Category
|
|
32
|
-
export const is = TreasuryAccount.is
|
|
33
|
-
}
|
|
34
21
|
}
|
|
@@ -9,5 +9,5 @@ export declare class Treasury {
|
|
|
9
9
|
change(currency: isoly.Currency, changes: Result[]): Promise<gracely.Result>;
|
|
10
10
|
fetch(hour?: isoly.DateTime): Promise<TreasuryModel.Snapshot | gracely.Error>;
|
|
11
11
|
listTransactions(accountId: string): Promise<TreasuryModel.Transaction[] | gracely.Error>;
|
|
12
|
-
listAccounts(): Promise<TreasuryModel.Account[] | gracely.Error>;
|
|
12
|
+
listAccounts(): Promise<TreasuryModel.Account.Listable[] | gracely.Error>;
|
|
13
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Treasury.js","sourceRoot":"../","sources":["Client/Treasury.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAK7B,MAAM,OAAO,QAAQ;IACpB,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,MAAM,CAAC,QAAwB,EAAE,OAAiB;QACvD,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,QAAQ,EAAE,EA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,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;CACD"}
|
|
@@ -5,6 +5,7 @@ import { Rail } from "../../Rail";
|
|
|
5
5
|
import { Realm } from "../../Realm";
|
|
6
6
|
import { Supplier } from "../../Supplier";
|
|
7
7
|
import { Balance } from "../Balance";
|
|
8
|
+
import { Transaction } from "../Transaction";
|
|
8
9
|
import { Category as AccountCategory } from "./Category";
|
|
9
10
|
import { Conditions as AccountConditions } from "./Conditions";
|
|
10
11
|
import { Creatable as AccountCreatable } from "./Creatable";
|
|
@@ -27,17 +28,12 @@ export interface Account {
|
|
|
27
28
|
}
|
|
28
29
|
export declare namespace Account {
|
|
29
30
|
const type: isly.object.ExtendableType<Account>;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const Fetchable: typeof AccountFetchable;
|
|
39
|
-
type Category = AccountCategory;
|
|
40
|
-
const Category: typeof AccountCategory;
|
|
41
|
-
type Conditions = AccountConditions;
|
|
42
|
-
const Conditions: typeof AccountConditions;
|
|
31
|
+
type Listable = Account & {
|
|
32
|
+
transactions: Transaction[];
|
|
33
|
+
};
|
|
34
|
+
export import Creatable = AccountCreatable;
|
|
35
|
+
export import Storable = AccountStorable;
|
|
36
|
+
export import Fetchable = AccountFetchable;
|
|
37
|
+
export import Category = AccountCategory;
|
|
38
|
+
export import Conditions = AccountConditions;
|
|
43
39
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { cryptly } from "cryptly";
|
|
2
1
|
import { isoly } from "isoly";
|
|
3
2
|
import { isly } from "isly";
|
|
4
3
|
import { Rail } from "../../Rail";
|
|
@@ -16,21 +15,15 @@ export var Account;
|
|
|
16
15
|
id: isly.string(),
|
|
17
16
|
created: isly.fromIs("Treasury.Account.Created", isoly.DateTime.is),
|
|
18
17
|
name: isly.string(),
|
|
19
|
-
realm:
|
|
20
|
-
supplier:
|
|
18
|
+
realm: Realm.type,
|
|
19
|
+
supplier: Supplier.type,
|
|
21
20
|
reference: isly.string(),
|
|
22
21
|
currencies: isly.fromIs("Treasury.Account.currencies", isoly.Currency.is).array(),
|
|
23
22
|
type: AccountCategory.type,
|
|
24
23
|
conditions: AccountConditions.type,
|
|
25
|
-
rail:
|
|
24
|
+
rail: Rail.Address.type.array(),
|
|
26
25
|
balance: isly.fromIs("Treasury.Account.balance", Balance.is),
|
|
27
26
|
});
|
|
28
|
-
Account.is = Account.type.is;
|
|
29
|
-
Account.flaw = Account.type.flaw;
|
|
30
|
-
function isIdentifier(value) {
|
|
31
|
-
return cryptly.Identifier.is(value, 8);
|
|
32
|
-
}
|
|
33
|
-
Account.isIdentifier = isIdentifier;
|
|
34
27
|
Account.Creatable = AccountCreatable;
|
|
35
28
|
Account.Storable = AccountStorable;
|
|
36
29
|
Account.Fetchable = AccountFetchable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Treasury/Account/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Treasury/Account/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEpC,OAAO,EAAE,QAAQ,IAAI,eAAe,EAAE,MAAM,YAAY,CAAA;AACxD,OAAO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ED
|
@@ -7,20 +7,7 @@ export declare namespace Treasury {
|
|
|
7
7
|
function key(hour?: isoly.DateTime): isoly.DateTime;
|
|
8
8
|
export import Transaction = TreasuryTransaction;
|
|
9
9
|
export import Snapshot = TreasurySnapshot;
|
|
10
|
+
export import Account = TreasuryAccount;
|
|
10
11
|
type Balance = TreasuryBalance;
|
|
11
12
|
const Balance: typeof TreasuryBalance;
|
|
12
|
-
type Account = TreasuryAccount;
|
|
13
|
-
namespace Account {
|
|
14
|
-
type Creatable = TreasuryAccount.Creatable;
|
|
15
|
-
const Creatable: typeof import("./Account/Creatable").Creatable;
|
|
16
|
-
type Storable = TreasuryAccount.Storable;
|
|
17
|
-
const Storable: typeof import("./Account/Storable").Storable;
|
|
18
|
-
type Fetchable = TreasuryAccount.Fetchable;
|
|
19
|
-
const Fetchable: typeof import("./Account/Fetchable").Fetchable;
|
|
20
|
-
type Conditions = TreasuryAccount.Conditions;
|
|
21
|
-
const Conditions: typeof import("./Account/Conditions").Conditions;
|
|
22
|
-
type Category = TreasuryAccount.Category;
|
|
23
|
-
const Category: typeof import("./Account/Category").Category;
|
|
24
|
-
const is: import("isly/dist/cjs/Type").Type.IsFunction<TreasuryAccount>;
|
|
25
|
-
}
|
|
26
13
|
}
|
package/dist/Treasury/index.js
CHANGED
|
@@ -13,15 +13,7 @@ export var Treasury;
|
|
|
13
13
|
Treasury.key = key;
|
|
14
14
|
Treasury.Transaction = TreasuryTransaction;
|
|
15
15
|
Treasury.Snapshot = TreasurySnapshot;
|
|
16
|
+
Treasury.Account = TreasuryAccount;
|
|
16
17
|
Treasury.Balance = TreasuryBalance;
|
|
17
|
-
let Account;
|
|
18
|
-
(function (Account) {
|
|
19
|
-
Account.Creatable = TreasuryAccount.Creatable;
|
|
20
|
-
Account.Storable = TreasuryAccount.Storable;
|
|
21
|
-
Account.Fetchable = TreasuryAccount.Fetchable;
|
|
22
|
-
Account.Conditions = TreasuryAccount.Conditions;
|
|
23
|
-
Account.Category = TreasuryAccount.Category;
|
|
24
|
-
Account.is = TreasuryAccount.is;
|
|
25
|
-
})(Account = Treasury.Account || (Treasury.Account = {}));
|
|
26
18
|
})(Treasury || (Treasury = {}));
|
|
27
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -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;AACtD,OAAO,EAAE,QAAQ,IAAI,gBAAgB,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,WAAW,IAAI,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAElE,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;AACtD,OAAO,EAAE,QAAQ,IAAI,gBAAgB,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,WAAW,IAAI,mBAAmB,EAAE,MAAM,eAAe,CAAA;AAElE,MAAM,KAAW,QAAQ,CAcxB;AAdD,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,CAA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