@pax2pay/model-banking 0.1.406 → 0.1.407

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/Audit.ts CHANGED
@@ -1,10 +1,20 @@
1
1
  import { gracely } from "gracely"
2
+ import { isoly } from "isoly"
2
3
  import { http } from "cloudly-http"
3
4
  import { Audit as AuditLog } from "../Audit"
4
5
 
5
6
  export class Audit {
6
7
  constructor(private readonly client: http.Client) {}
7
- async list(resource?: AuditLog.Resource): Promise<AuditLog[] | gracely.Error> {
8
- return this.client.get<AuditLog[]>(`/audit${resource ? "/" + resource : ""}`)
8
+ async list(
9
+ options?: {
10
+ resource?: AuditLog.Resource
11
+ limit?: number
12
+ cursor?: string
13
+ } & Partial<isoly.DateRange>
14
+ ): Promise<(AuditLog[] & { cursor?: string | undefined }) | gracely.Error> {
15
+ const queries = options && http.Search.stringify(options)
16
+ return this.client.get<AuditLog[] & { cursor?: string | undefined }>(
17
+ `/audit${options?.resource ? "/" + options?.resource : ""}${queries ? "?" + queries : ""}`
18
+ )
9
19
  }
10
20
  }
@@ -1,8 +1,15 @@
1
1
  import { gracely } from "gracely";
2
+ import { isoly } from "isoly";
2
3
  import { http } from "cloudly-http";
3
4
  import { Audit as AuditLog } from "../Audit";
4
5
  export declare class Audit {
5
6
  private readonly client;
6
7
  constructor(client: http.Client);
7
- list(resource?: AuditLog.Resource): Promise<AuditLog[] | gracely.Error>;
8
+ list(options?: {
9
+ resource?: AuditLog.Resource;
10
+ limit?: number;
11
+ cursor?: string;
12
+ } & Partial<isoly.DateRange>): Promise<(AuditLog[] & {
13
+ cursor?: string | undefined;
14
+ }) | gracely.Error>;
8
15
  }
@@ -1,9 +1,11 @@
1
+ import { http } from "cloudly-http";
1
2
  export class Audit {
2
3
  constructor(client) {
3
4
  this.client = client;
4
5
  }
5
- async list(resource) {
6
- return this.client.get(`/audit${resource ? "/" + resource : ""}`);
6
+ async list(options) {
7
+ const queries = options && http.Search.stringify(options);
8
+ return this.client.get(`/audit${options?.resource ? "/" + options?.resource : ""}${queries ? "?" + queries : ""}`);
7
9
  }
8
10
  }
9
11
  //# sourceMappingURL=Audit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Audit.js","sourceRoot":"../","sources":["Client/Audit.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,KAAK;IACjB,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,IAAI,CAAC,QAA4B;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAa,SAAS,QAAQ,CAAC,CAAC,CAAC,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IAC9E,CAAC;CACD"}
1
+ {"version":3,"file":"Audit.js","sourceRoot":"../","sources":["Client/Audit.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAGnC,MAAM,OAAO,KAAK;IACjB,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,IAAI,CACT,OAI4B;QAE5B,MAAM,OAAO,GAAG,OAAO,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;QACzD,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACrB,SAAS,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,GAAG,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAC1F,CAAA;IACF,CAAC;CACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/model-banking",
3
- "version": "0.1.406",
3
+ "version": "0.1.407",
4
4
  "description": "Library containing data model types and functions for the Pax2Pay Banking API.",
5
5
  "author": "Pax2Pay Ltd",
6
6
  "license": "MIT",