@pax2pay/model-banking 0.1.191 → 0.1.192
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.
|
@@ -36,16 +36,9 @@ export class Transactions extends rest.Collection<gracely.Error> {
|
|
|
36
36
|
.map(([k, v]) => `${k}=${v}`)
|
|
37
37
|
.join("&")
|
|
38
38
|
const path = options?.account ? `/account/${options.account}/transaction` : `/transaction`
|
|
39
|
-
|
|
39
|
+
return await this.client.get<Transaction[] & { cursor?: string | undefined }>(
|
|
40
40
|
path + (query && "?" + query),
|
|
41
41
|
options?.limit ? { limit: options?.limit.toString() } : {}
|
|
42
42
|
)
|
|
43
|
-
let result: (Transaction[] & { cursor?: string | undefined }) | gracely.Error
|
|
44
|
-
if (!gracely.Error.is(listed)) {
|
|
45
|
-
result = listed.list
|
|
46
|
-
result.cursor = listed.cursor
|
|
47
|
-
} else
|
|
48
|
-
result = listed
|
|
49
|
-
return result
|
|
50
43
|
}
|
|
51
44
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { gracely } from "gracely";
|
|
2
1
|
import { http } from "cloudly-http";
|
|
3
2
|
import * as rest from "cloudly-rest";
|
|
4
3
|
import { Notes } from "./Notes";
|
|
@@ -27,15 +26,7 @@ export class Transactions extends rest.Collection {
|
|
|
27
26
|
.map(([k, v]) => `${k}=${v}`)
|
|
28
27
|
.join("&");
|
|
29
28
|
const path = options?.account ? `/account/${options.account}/transaction` : `/transaction`;
|
|
30
|
-
|
|
31
|
-
let result;
|
|
32
|
-
if (!gracely.Error.is(listed)) {
|
|
33
|
-
result = listed.list;
|
|
34
|
-
result.cursor = listed.cursor;
|
|
35
|
-
}
|
|
36
|
-
else
|
|
37
|
-
result = listed;
|
|
38
|
-
return result;
|
|
29
|
+
return await this.client.get(path + (query && "?" + query), options?.limit ? { limit: options?.limit.toString() } : {});
|
|
39
30
|
}
|
|
40
31
|
}
|
|
41
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Transactions/index.ts"],"names":[],"mappings":"
|
|
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;AAEpC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,MAAM,OAAO,YAAa,SAAQ,IAAI,CAAC,UAAyB;IAE/D,YAAY,MAAmB;QAC9B,MAAM,CAAC,WAAW,GAAG,KAAK,EAAC,QAAQ,EAAC,EAAE;YACrC,IAAI,MAAM,GAAG,QAAQ,CAAA;YACrB,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAA;YAChC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;gBACzB,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;YACxG,CAAC;YACD,OAAO,MAAM,CAAA;QACd,CAAC,CAAA;QACD,KAAK,CAAC,MAAM,CAAC,CAAA;QAVL,UAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAWvC,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,CAAC,OAAO,CAAC;YAC5B,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,E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