@pax2pay/model-banking 0.1.65 → 0.1.67
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/Settlements.ts +10 -3
- package/Client/Treasury.ts +4 -0
- package/dist/Client/Settlements.d.ts +5 -2
- package/dist/Client/Settlements.js +9 -3
- package/dist/Client/Settlements.js.map +1 -1
- package/dist/Client/Treasury.d.ts +2 -0
- package/dist/Client/Treasury.js +3 -0
- package/dist/Client/Treasury.js.map +1 -1
- package/package.json +1 -1
package/Client/Settlements.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { gracely } from "gracely"
|
|
2
|
+
import { isoly } from "isoly"
|
|
2
3
|
import { http } from "cloudly-http"
|
|
3
4
|
import * as rest from "cloudly-rest"
|
|
4
5
|
import { Settlement } from "../Settlement"
|
|
@@ -8,13 +9,19 @@ export class Settlements extends rest.Collection<gracely.Error> {
|
|
|
8
9
|
super(client)
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
async
|
|
12
|
-
return this.client.
|
|
12
|
+
async create(configuration: string): Promise<Settlement | gracely.Error> {
|
|
13
|
+
return this.client.post<Settlement>(`/card/settlement`, { configuration: configuration })
|
|
14
|
+
}
|
|
15
|
+
async fetch(id: string, created: isoly.DateTime): Promise<Settlement | gracely.Error> {
|
|
16
|
+
return this.client.get<Settlement>(`/card/settlement/${id}?created=${created}`)
|
|
13
17
|
}
|
|
14
18
|
async list(): Promise<Settlement.Summary[] | gracely.Error> {
|
|
15
19
|
return this.client.get<Settlement.Summary[] & { cursor?: string | undefined }>(`/card/settlement`)
|
|
16
20
|
}
|
|
17
|
-
async
|
|
21
|
+
async remove(settlement: string): Promise<Settlement | gracely.Error> {
|
|
22
|
+
return this.client.delete<Settlement>(`/card/settlement/${settlement}`)
|
|
23
|
+
}
|
|
24
|
+
async update(settlement: string): Promise<Settlement | gracely.Error> {
|
|
18
25
|
return this.client.patch<Settlement>(`/card/settlement/${settlement}`, {})
|
|
19
26
|
}
|
|
20
27
|
}
|
package/Client/Treasury.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { gracely } from "gracely"
|
|
|
2
2
|
import { isoly } from "isoly"
|
|
3
3
|
import { http } from "cloudly-http"
|
|
4
4
|
import * as rest from "cloudly-rest"
|
|
5
|
+
import { Transaction } from "../Transaction"
|
|
5
6
|
import { Treasury as TreasuryModel } from "../Treasury"
|
|
6
7
|
import { Result } from "../Treasury/Balance"
|
|
7
8
|
|
|
@@ -17,4 +18,7 @@ export class Treasury extends rest.Collection<gracely.Error> {
|
|
|
17
18
|
const path = hour ? `?time=${hour}` : ""
|
|
18
19
|
return this.client.get<TreasuryModel>(`/fiat/treasury${path}`)
|
|
19
20
|
}
|
|
21
|
+
async listTransactions(accountId: string): Promise<Transaction[] | gracely.Error> {
|
|
22
|
+
return this.client.get<Transaction[]>(`/treasury/account/${accountId}/transaction`)
|
|
23
|
+
}
|
|
20
24
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { gracely } from "gracely";
|
|
2
|
+
import { isoly } from "isoly";
|
|
2
3
|
import { http } from "cloudly-http";
|
|
3
4
|
import * as rest from "cloudly-rest";
|
|
4
5
|
import { Settlement } from "../Settlement";
|
|
5
6
|
export declare class Settlements extends rest.Collection<gracely.Error> {
|
|
6
7
|
constructor(client: http.Client);
|
|
7
|
-
|
|
8
|
+
create(configuration: string): Promise<Settlement | gracely.Error>;
|
|
9
|
+
fetch(id: string, created: isoly.DateTime): Promise<Settlement | gracely.Error>;
|
|
8
10
|
list(): Promise<Settlement.Summary[] | gracely.Error>;
|
|
9
|
-
|
|
11
|
+
remove(settlement: string): Promise<Settlement | gracely.Error>;
|
|
12
|
+
update(settlement: string): Promise<Settlement | gracely.Error>;
|
|
10
13
|
}
|
|
@@ -3,13 +3,19 @@ export class Settlements extends rest.Collection {
|
|
|
3
3
|
constructor(client) {
|
|
4
4
|
super(client);
|
|
5
5
|
}
|
|
6
|
-
async
|
|
7
|
-
return this.client.
|
|
6
|
+
async create(configuration) {
|
|
7
|
+
return this.client.post(`/card/settlement`, { configuration: configuration });
|
|
8
|
+
}
|
|
9
|
+
async fetch(id, created) {
|
|
10
|
+
return this.client.get(`/card/settlement/${id}?created=${created}`);
|
|
8
11
|
}
|
|
9
12
|
async list() {
|
|
10
13
|
return this.client.get(`/card/settlement`);
|
|
11
14
|
}
|
|
12
|
-
async
|
|
15
|
+
async remove(settlement) {
|
|
16
|
+
return this.client.delete(`/card/settlement/${settlement}`);
|
|
17
|
+
}
|
|
18
|
+
async update(settlement) {
|
|
13
19
|
return this.client.patch(`/card/settlement/${settlement}`, {});
|
|
14
20
|
}
|
|
15
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Settlements.js","sourceRoot":"../","sources":["Client/Settlements.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Settlements.js","sourceRoot":"../","sources":["Client/Settlements.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,IAAI,MAAM,cAAc,CAAA;AAGpC,MAAM,OAAO,WAAY,SAAQ,IAAI,CAAC,UAAyB;IAC9D,YAAY,MAAmB;QAC9B,KAAK,CAAC,MAAM,CAAC,CAAA;IACd,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,aAAqB;QACjC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAa,kBAAkB,EAAE,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC,CAAA;IAC1F,CAAC;IACD,KAAK,CAAC,KAAK,CAAC,EAAU,EAAE,OAAuB;QAC9C,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAa,oBAAoB,EAAE,YAAY,OAAO,EAAE,CAAC,CAAA;IAChF,CAAC;IACD,KAAK,CAAC,IAAI;QACT,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAyD,kBAAkB,CAAC,CAAA;IACnG,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,UAAkB;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAa,oBAAoB,UAAU,EAAE,CAAC,CAAA;IACxE,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,UAAkB;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAa,oBAAoB,UAAU,EAAE,EAAE,EAAE,CAAC,CAAA;IAC3E,CAAC;CACD"}
|
|
@@ -2,10 +2,12 @@ import { gracely } from "gracely";
|
|
|
2
2
|
import { isoly } from "isoly";
|
|
3
3
|
import { http } from "cloudly-http";
|
|
4
4
|
import * as rest from "cloudly-rest";
|
|
5
|
+
import { Transaction } from "../Transaction";
|
|
5
6
|
import { Treasury as TreasuryModel } from "../Treasury";
|
|
6
7
|
import { Result } from "../Treasury/Balance";
|
|
7
8
|
export declare class Treasury extends rest.Collection<gracely.Error> {
|
|
8
9
|
constructor(client: http.Client);
|
|
9
10
|
change(currency: isoly.Currency, changes: Result[]): Promise<gracely.Result>;
|
|
10
11
|
fetch(hour?: isoly.DateTime): Promise<TreasuryModel | gracely.Error>;
|
|
12
|
+
listTransactions(accountId: string): Promise<Transaction[] | gracely.Error>;
|
|
11
13
|
}
|
package/dist/Client/Treasury.js
CHANGED
|
@@ -10,5 +10,8 @@ export class Treasury extends rest.Collection {
|
|
|
10
10
|
const path = hour ? `?time=${hour}` : "";
|
|
11
11
|
return this.client.get(`/fiat/treasury${path}`);
|
|
12
12
|
}
|
|
13
|
+
async listTransactions(accountId) {
|
|
14
|
+
return this.client.get(`/treasury/account/${accountId}/transaction`);
|
|
15
|
+
}
|
|
13
16
|
}
|
|
14
17
|
//# sourceMappingURL=Treasury.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Treasury.js","sourceRoot":"../","sources":["Client/Treasury.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,IAAI,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"Treasury.js","sourceRoot":"../","sources":["Client/Treasury.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,IAAI,MAAM,cAAc,CAAA;AAKpC,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,kBAAkB,QAAQ,OAAO,EAAE,OAAO,CAAC,CAAA;IACrE,CAAC;IACD,KAAK,CAAC,KAAK,CAAC,IAAqB;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;QACxC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAgB,iBAAiB,IAAI,EAAE,CAAC,CAAA;IAC/D,CAAC;IACD,KAAK,CAAC,gBAAgB,CAAC,SAAiB;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAgB,qBAAqB,SAAS,cAAc,CAAC,CAAA;IACpF,CAAC;CACD"}
|