@pax2pay/model-banking 0.1.29 → 0.1.31
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/Transactions/index.ts +2 -1
- package/Client/index.ts +2 -10
- package/Transaction/index.ts +1 -1
- package/dist/Client/Transactions/index.js.map +1 -1
- package/dist/Client/index.d.ts +2 -8
- package/dist/Client/index.js +2 -10
- package/dist/Client/index.js.map +1 -1
- package/dist/Transaction/index.d.ts +1 -1
- package/package.json +9 -9
|
@@ -29,7 +29,8 @@ export class Transactions extends rest.Collection<gracely.Error> {
|
|
|
29
29
|
.map(([k, v]) => `${k}=${v}`)
|
|
30
30
|
.reduce((prev, curr, i) => `${prev}${i == 0 ? "?" : "&"}${curr}`, "")
|
|
31
31
|
: ""
|
|
32
|
-
const path =
|
|
32
|
+
const path =
|
|
33
|
+
options && options.account ? `/api/account/${options.account}/transaction${query}` : `/api/transaction${query}`
|
|
33
34
|
return this.client.get<Transaction[] & { cursor?: string | undefined }>(
|
|
34
35
|
path,
|
|
35
36
|
options &&
|
package/Client/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as gracely from "gracely"
|
|
2
2
|
import * as isoly from "isoly"
|
|
3
|
+
import { userwidgets } from "@userwidgets/model"
|
|
3
4
|
import * as http from "cloudly-http"
|
|
4
5
|
import * as rest from "cloudly-rest"
|
|
5
6
|
import { Accounts } from "./Accounts"
|
|
@@ -23,16 +24,7 @@ export class Client extends rest.Client<gracely.Error> {
|
|
|
23
24
|
realm?: string
|
|
24
25
|
organization?: string
|
|
25
26
|
entityTags: EntityTags = { application: {}, organization: {}, user: {} }
|
|
26
|
-
readonly userwidgets =
|
|
27
|
-
me: new ClientMe(this.client),
|
|
28
|
-
user: new ClientUser(this.client, this.entityTags),
|
|
29
|
-
application: new ClientApplication(this.client, this.entityTags),
|
|
30
|
-
organization: new ClientOrganization(this.client, this.entityTags),
|
|
31
|
-
set onUnauthorized(callback: (client: rest.Client<never>) => Promise<boolean>) {
|
|
32
|
-
this.client.onUnauthorized = callback
|
|
33
|
-
},
|
|
34
|
-
client: this as Client,
|
|
35
|
-
}
|
|
27
|
+
readonly userwidgets = new userwidgets.ClientCollection(this.client, "/widgets")
|
|
36
28
|
readonly accounts = new Accounts(this.client)
|
|
37
29
|
readonly operations = new Operations(this.client)
|
|
38
30
|
readonly organizations = new Organizations(this.client)
|
package/Transaction/index.ts
CHANGED
|
@@ -13,7 +13,7 @@ export interface Transaction extends TransactionCreatable {
|
|
|
13
13
|
readonly id: cryptly.Identifier
|
|
14
14
|
readonly reference?: string
|
|
15
15
|
readonly posted: isoly.DateTime
|
|
16
|
-
|
|
16
|
+
transacted?: isoly.DateTime
|
|
17
17
|
balance: number
|
|
18
18
|
operations: Operation[]
|
|
19
19
|
status: "created" | "approved" | "rejected" | "processing" | "finalized"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Transactions/index.ts"],"names":[],"mappings":"AAEA,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,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,gBAAgB,OAAO,cAAc,EAAE,WAAW,CAAC,CAAA;IACzF,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,OAUV;QACA,MAAM,aAAa,GAAG,OAAO,IAAI,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,EAAE,EAAE,CAAC,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,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC;iBAC5B,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;iBAC5B,MAAM,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC;YACvE,CAAC,CAAC,EAAE,CAAA;QACL,MAAM,IAAI,GACT,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,gBAAgB,OAAO,CAAC,OAAO,eAAe,KAAK,EAAE,CAAC,CAAC,CAAC,mBAAmB,KAAK,EAAE,CAAA;QAChH,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACrB,IAAI,EACJ,OAAO;YACN,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,CACtB,KAAK,IAAI,MAAM;gBACd,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE;gBAC1F,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CACxB,CAAA;IACF,CAAC;CACD"}
|
package/dist/Client/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as gracely from "gracely";
|
|
2
2
|
import * as isoly from "isoly";
|
|
3
|
+
import { userwidgets } from "@userwidgets/model";
|
|
3
4
|
import * as http from "cloudly-http";
|
|
4
5
|
import * as rest from "cloudly-rest";
|
|
5
6
|
import { Accounts } from "./Accounts";
|
|
@@ -21,14 +22,7 @@ export declare class Client extends rest.Client<gracely.Error> {
|
|
|
21
22
|
realm?: string;
|
|
22
23
|
organization?: string;
|
|
23
24
|
entityTags: EntityTags;
|
|
24
|
-
readonly userwidgets:
|
|
25
|
-
me: ClientMe;
|
|
26
|
-
user: ClientUser;
|
|
27
|
-
application: ClientApplication;
|
|
28
|
-
organization: ClientOrganization;
|
|
29
|
-
onUnauthorized: (client: rest.Client<never>) => Promise<boolean>;
|
|
30
|
-
client: Client;
|
|
31
|
-
};
|
|
25
|
+
readonly userwidgets: userwidgets.ClientCollection;
|
|
32
26
|
readonly accounts: Accounts;
|
|
33
27
|
readonly operations: Operations;
|
|
34
28
|
readonly organizations: Organizations;
|
package/dist/Client/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { userwidgets } from "@userwidgets/model";
|
|
1
2
|
import * as http from "cloudly-http";
|
|
2
3
|
import * as rest from "cloudly-rest";
|
|
3
4
|
import { Accounts } from "./Accounts";
|
|
@@ -14,16 +15,7 @@ export class Client extends rest.Client {
|
|
|
14
15
|
constructor() {
|
|
15
16
|
super(...arguments);
|
|
16
17
|
this.entityTags = { application: {}, organization: {}, user: {} };
|
|
17
|
-
this.userwidgets =
|
|
18
|
-
me: new ClientMe(this.client),
|
|
19
|
-
user: new ClientUser(this.client, this.entityTags),
|
|
20
|
-
application: new ClientApplication(this.client, this.entityTags),
|
|
21
|
-
organization: new ClientOrganization(this.client, this.entityTags),
|
|
22
|
-
set onUnauthorized(callback) {
|
|
23
|
-
this.client.onUnauthorized = callback;
|
|
24
|
-
},
|
|
25
|
-
client: this,
|
|
26
|
-
};
|
|
18
|
+
this.userwidgets = new userwidgets.ClientCollection(this.client, "/widgets");
|
|
27
19
|
this.accounts = new Accounts(this.client);
|
|
28
20
|
this.operations = new Operations(this.client);
|
|
29
21
|
this.organizations = new Organizations(this.client);
|
package/dist/Client/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,cAAc,CAAA;AACpC,OAAO,KAAK,IAAI,MAAM,cAAc,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAChE,OAAO,EAAE,EAAE,IAAI,QAAQ,EAAE,MAAM,MAAM,CAAA;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,YAAY,IAAI,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,QAAQ,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAQnC,MAAM,OAAO,MAAO,SAAQ,IAAI,CAAC,MAAqB;IAAtD;;QAGC,eAAU,GAAe,EAAE,WAAW,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAA;QAC/D,gBAAW,GAAG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,KAAK,IAAI,MAAM,cAAc,CAAA;AACpC,OAAO,KAAK,IAAI,MAAM,cAAc,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAChE,OAAO,EAAE,EAAE,IAAI,QAAQ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AI,IAAI,CAAC,MAAM,CAAgB,MAAM,EAAE,GAAG,EAAE;YACzD,YAAY,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC;SACxG,CAAC,CAAC,CACH,CAAA;QACD,IAAI,IAAI;YACP,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAA;QACxC,OAAO,MAAoB,CAAA;IAC5B,CAAC;CACD;AACD,WAAiB,MAAM;IAET,kBAAW,GAAG,iBAAiB,CAAA;IAE/B,mBAAY,GAAG,kBAAkB,CAAA;IAEjC,SAAE,GAAG,QAAQ,CAAA;IAEb,WAAI,GAAG,UAAU,CAAA;AAE/B,CAAC,EAVgB,MAAM,KAAN,MAAM,QAUtB"}
|
|
@@ -12,7 +12,7 @@ export interface Transaction extends TransactionCreatable {
|
|
|
12
12
|
readonly id: cryptly.Identifier;
|
|
13
13
|
readonly reference?: string;
|
|
14
14
|
readonly posted: isoly.DateTime;
|
|
15
|
-
|
|
15
|
+
transacted?: isoly.DateTime;
|
|
16
16
|
balance: number;
|
|
17
17
|
operations: Operation[];
|
|
18
18
|
status: "created" | "approved" | "rejected" | "processing" | "finalized";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pax2pay/model-banking",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.31",
|
|
4
4
|
"description": "Library containing data model types and functions for the Pax2Pay Banking API.",
|
|
5
5
|
"author": "Pax2Pay Ltd",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"^.+\\.(j|t)sx?$": "ts-jest"
|
|
30
30
|
},
|
|
31
31
|
"transformIgnorePatterns": [
|
|
32
|
-
"<rootDir>/node_modules/(?!(cryptly|authly|isoly|gracely|cloudly-http|cloudly-rest|cloudly-router|cloudly-formdata)/.*)"
|
|
32
|
+
"<rootDir>/node_modules/(?!(cryptly|authly|isoly|gracely|cloudly-http|cloudly-rest|cloudly-router|cloudly-formdata|@userwidgets)/.*)"
|
|
33
33
|
],
|
|
34
34
|
"testEnvironment": "node",
|
|
35
35
|
"testRegex": "((\\.|/)(test|spec))(\\.|\\/.+)(jsx?|tsx?)$",
|
|
@@ -54,11 +54,11 @@
|
|
|
54
54
|
"clean": "rimraf dist node_modules coverage"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@cloudflare/workers-types": "^4.
|
|
57
|
+
"@cloudflare/workers-types": "^4.20230511.0",
|
|
58
58
|
"@types/jest": "^29.5.1",
|
|
59
|
-
"@typescript-eslint/eslint-plugin": "5.59.
|
|
60
|
-
"@typescript-eslint/parser": "5.59.
|
|
61
|
-
"eslint": "^8.
|
|
59
|
+
"@typescript-eslint/eslint-plugin": "5.59.5",
|
|
60
|
+
"@typescript-eslint/parser": "5.59.5",
|
|
61
|
+
"eslint": "^8.40.0",
|
|
62
62
|
"eslint-plugin-prettierx": "github:utily/eslint-plugin-prettierx#utily-20221229",
|
|
63
63
|
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
64
64
|
"jest": "^29.5.0",
|
|
@@ -68,12 +68,12 @@
|
|
|
68
68
|
"typescript": "^5.0.4"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@userwidgets/model": "^0.
|
|
72
|
-
"cloudly-http": "^0.1.
|
|
71
|
+
"@userwidgets/model": "^0.2.4",
|
|
72
|
+
"cloudly-http": "^0.1.5",
|
|
73
73
|
"cloudly-rest": "^0.1.2",
|
|
74
74
|
"cryptly": "^3.0.4",
|
|
75
75
|
"gracely": "^2.0.3",
|
|
76
|
-
"isoly": "^2.0.
|
|
76
|
+
"isoly": "^2.0.18",
|
|
77
77
|
"selectively": "^2.0.4"
|
|
78
78
|
}
|
|
79
79
|
}
|