@pax2pay/model-banking 0.1.139 → 0.1.140

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.
@@ -0,0 +1,16 @@
1
+ import { gracely } from "gracely"
2
+ import { http } from "cloudly-http"
3
+ import * as rest from "cloudly-rest"
4
+ import { Rule } from "../Rule"
5
+
6
+ export class Rules extends rest.Collection<gracely.Error> {
7
+ constructor(client: http.Client) {
8
+ super(client)
9
+ }
10
+ async replace(rule: Rule[]): Promise<Rule[] | gracely.Error> {
11
+ return this.client.put<Rule[]>(`/rule`, rule)
12
+ }
13
+ async list(): Promise<Rule[] | gracely.Error> {
14
+ return this.client.get<Rule[]>(`/rule`)
15
+ }
16
+ }
package/Client/index.ts CHANGED
@@ -6,6 +6,7 @@ import { Accounts } from "./Accounts"
6
6
  import { Cards } from "./Cards"
7
7
  import { Operations } from "./Operations"
8
8
  import { Organizations } from "./Organizations"
9
+ import { Rules } from "./Rules"
9
10
  import { Settlements } from "./Settlements"
10
11
  import { Transactions } from "./Transactions"
11
12
  import { Treasury } from "./Treasury"
@@ -14,15 +15,16 @@ import { Version } from "./Version"
14
15
  export class Client extends rest.Client<gracely.Error> {
15
16
  realm?: string
16
17
  organization?: string
17
- readonly userwidgets = new userwidgets.ClientCollection(this.client, { pathPrefix: "/widgets" })
18
18
  readonly accounts = new Accounts(this.client)
19
+ readonly cards = new Cards(this.client)
19
20
  readonly operations = new Operations(this.client)
20
21
  readonly organizations = new Organizations(this.client)
22
+ readonly rules = new Rules(this.client)
23
+ readonly settlements = new Settlements(this.client)
21
24
  readonly transactions = new Transactions(this.client)
22
25
  readonly treasury = new Treasury(this.client)
26
+ readonly userwidgets = new userwidgets.ClientCollection(this.client, { pathPrefix: "/widgets" })
23
27
  readonly version = new Version(this.client)
24
- readonly cards = new Cards(this.client)
25
- readonly settlements = new Settlements(this.client)
26
28
 
27
29
  static create<T = Record<string, any>>(server: string, key: string, load?: (client: http.Client) => T): Client & T {
28
30
  let httpClient: http.Client<gracely.Error>
@@ -0,0 +1,9 @@
1
+ import { gracely } from "gracely";
2
+ import { http } from "cloudly-http";
3
+ import * as rest from "cloudly-rest";
4
+ import { Rule } from "../Rule";
5
+ export declare class Rules extends rest.Collection<gracely.Error> {
6
+ constructor(client: http.Client);
7
+ replace(rule: Rule[]): Promise<Rule[] | gracely.Error>;
8
+ list(): Promise<Rule[] | gracely.Error>;
9
+ }
@@ -0,0 +1,13 @@
1
+ import * as rest from "cloudly-rest";
2
+ export class Rules extends rest.Collection {
3
+ constructor(client) {
4
+ super(client);
5
+ }
6
+ async replace(rule) {
7
+ return this.client.put(`/rule`, rule);
8
+ }
9
+ async list() {
10
+ return this.client.get(`/rule`);
11
+ }
12
+ }
13
+ //# sourceMappingURL=Rules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Rules.js","sourceRoot":"../","sources":["Client/Rules.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,cAAc,CAAA;AAGpC,MAAM,OAAO,KAAM,SAAQ,IAAI,CAAC,UAAyB;IACxD,YAAY,MAAmB;QAC9B,KAAK,CAAC,MAAM,CAAC,CAAA;IACd,CAAC;IACD,KAAK,CAAC,OAAO,CAAC,IAAY;QACzB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAS,OAAO,EAAE,IAAI,CAAC,CAAA;IAC9C,CAAC;IACD,KAAK,CAAC,IAAI;QACT,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAS,OAAO,CAAC,CAAA;IACxC,CAAC;CACD"}
@@ -6,6 +6,7 @@ import { Accounts } from "./Accounts";
6
6
  import { Cards } from "./Cards";
7
7
  import { Operations } from "./Operations";
8
8
  import { Organizations } from "./Organizations";
9
+ import { Rules } from "./Rules";
9
10
  import { Settlements } from "./Settlements";
10
11
  import { Transactions } from "./Transactions";
11
12
  import { Treasury } from "./Treasury";
@@ -13,15 +14,16 @@ import { Version } from "./Version";
13
14
  export declare class Client extends rest.Client<gracely.Error> {
14
15
  realm?: string;
15
16
  organization?: string;
16
- readonly userwidgets: userwidgets.ClientCollection;
17
17
  readonly accounts: Accounts;
18
+ readonly cards: Cards;
18
19
  readonly operations: Operations;
19
20
  readonly organizations: Organizations;
21
+ readonly rules: Rules;
22
+ readonly settlements: Settlements;
20
23
  readonly transactions: Transactions;
21
24
  readonly treasury: Treasury;
25
+ readonly userwidgets: userwidgets.ClientCollection;
22
26
  readonly version: Version;
23
- readonly cards: Cards;
24
- readonly settlements: Settlements;
25
27
  static create<T = Record<string, any>>(server: string, key: string, load?: (client: http.Client) => T): Client & T;
26
28
  }
27
29
  export declare namespace Client {
@@ -5,6 +5,7 @@ import { Accounts } from "./Accounts";
5
5
  import { Cards } from "./Cards";
6
6
  import { Operations } from "./Operations";
7
7
  import { Organizations } from "./Organizations";
8
+ import { Rules } from "./Rules";
8
9
  import { Settlements } from "./Settlements";
9
10
  import { Transactions } from "./Transactions";
10
11
  import { Treasury } from "./Treasury";
@@ -12,15 +13,16 @@ import { Version } from "./Version";
12
13
  export class Client extends rest.Client {
13
14
  constructor() {
14
15
  super(...arguments);
15
- this.userwidgets = new userwidgets.ClientCollection(this.client, { pathPrefix: "/widgets" });
16
16
  this.accounts = new Accounts(this.client);
17
+ this.cards = new Cards(this.client);
17
18
  this.operations = new Operations(this.client);
18
19
  this.organizations = new Organizations(this.client);
20
+ this.rules = new Rules(this.client);
21
+ this.settlements = new Settlements(this.client);
19
22
  this.transactions = new Transactions(this.client);
20
23
  this.treasury = new Treasury(this.client);
24
+ this.userwidgets = new userwidgets.ClientCollection(this.client, { pathPrefix: "/widgets" });
21
25
  this.version = new Version(this.client);
22
- this.cards = new Cards(this.client);
23
- this.settlements = new Settlements(this.client);
24
26
  }
25
27
  static create(server, key, load) {
26
28
  let httpClient;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAo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CAAC,CAAC,CAAA;QACxC,OAAO,MAAoB,CAAA;IAC5B,CAAC;CACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/model-banking",
3
- "version": "0.1.139",
3
+ "version": "0.1.140",
4
4
  "description": "Library containing data model types and functions for the Pax2Pay Banking API.",
5
5
  "author": "Pax2Pay Ltd",
6
6
  "license": "MIT",