@pax2pay/model-banking 0.1.454 → 0.1.455
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.
|
@@ -4,6 +4,7 @@ import { http } from "cloudly-http"
|
|
|
4
4
|
import * as rest from "cloudly-rest"
|
|
5
5
|
import { Card } from "../../Card"
|
|
6
6
|
import { Operation } from "../../Operation"
|
|
7
|
+
import { Rule } from "../../Rule"
|
|
7
8
|
import { Supplier } from "../../Supplier"
|
|
8
9
|
import { Transaction } from "../../Transaction"
|
|
9
10
|
import { Notes } from "./Notes"
|
|
@@ -44,6 +45,9 @@ export class Transactions extends rest.Collection<gracely.Error> {
|
|
|
44
45
|
async getOperations(transactionId: string): Promise<Operation[] | gracely.Error> {
|
|
45
46
|
return this.client.get<Operation[]>(`/transaction/${transactionId}/operation`)
|
|
46
47
|
}
|
|
48
|
+
async getState(transactionId: string): Promise<Rule.State | gracely.Error> {
|
|
49
|
+
return this.client.get<Rule.State>(`/transaction/${transactionId}/state`)
|
|
50
|
+
}
|
|
47
51
|
async statistics(
|
|
48
52
|
range: isoly.DateRange,
|
|
49
53
|
queries?: { cursor?: string; scheme?: Card.Scheme; supplier?: Supplier; limit?: number }
|
|
@@ -4,6 +4,7 @@ import { http } from "cloudly-http";
|
|
|
4
4
|
import * as rest from "cloudly-rest";
|
|
5
5
|
import { Card } from "../../Card";
|
|
6
6
|
import { Operation } from "../../Operation";
|
|
7
|
+
import { Rule } from "../../Rule";
|
|
7
8
|
import { Supplier } from "../../Supplier";
|
|
8
9
|
import { Transaction } from "../../Transaction";
|
|
9
10
|
import { Notes } from "./Notes";
|
|
@@ -22,6 +23,7 @@ export declare class Transactions extends rest.Collection<gracely.Error> {
|
|
|
22
23
|
}) | gracely.Error>;
|
|
23
24
|
fetch(transaction: string, account?: string): Promise<Transaction | gracely.Error>;
|
|
24
25
|
getOperations(transactionId: string): Promise<Operation[] | gracely.Error>;
|
|
26
|
+
getState(transactionId: string): Promise<Rule.State | gracely.Error>;
|
|
25
27
|
statistics(range: isoly.DateRange, queries?: {
|
|
26
28
|
cursor?: string;
|
|
27
29
|
scheme?: Card.Scheme;
|
|
@@ -26,6 +26,9 @@ export class Transactions extends rest.Collection {
|
|
|
26
26
|
async getOperations(transactionId) {
|
|
27
27
|
return this.client.get(`/transaction/${transactionId}/operation`);
|
|
28
28
|
}
|
|
29
|
+
async getState(transactionId) {
|
|
30
|
+
return this.client.get(`/transaction/${transactionId}/state`);
|
|
31
|
+
}
|
|
29
32
|
async statistics(range, queries) {
|
|
30
33
|
const query = "?" + http.Search.stringify({ ...queries, ...range });
|
|
31
34
|
return this.client.get(`/transaction/statistics${query}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Transactions/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,KAAK,IAAI,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Transactions/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,KAAK,IAAI,MAAM,cAAc,CAAA;AAMpC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,MAAM,OAAO,YAAa,SAAQ,IAAI,CAAC,UAAyB;IAE/D,YAAY,MAAmB;QAC9B,KAAK,CAAC,MAAM,CAAC,CAAA;QAFL,UAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAGvC,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,OAAe,EAAE,WAAkC;QAC/D,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAc,YAAY,OAAO,cAAc,EAAE,WAAW,CAAC,CAAA;IACrF,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,OAMV;QACA,MAAM,KAAK,GAAG,MAAM,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