attlaz-client 1.16.7 → 1.16.8

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.
@@ -1,7 +1,8 @@
1
1
  import { Endpoint } from './Endpoint.js';
2
2
  import { CollectionResult } from '../Model/Result/CollectionResult.js';
3
3
  import { InboxMessage } from '../Model/Inbox/InboxMessage.js';
4
+ import { CursorPagination } from '../Model/Pagination/CursorPagination.js';
4
5
  export declare class InboxEndpoint extends Endpoint {
5
- getAll(unacknowledgedOnly?: boolean): Promise<CollectionResult<InboxMessage>>;
6
+ getAll(pagination?: CursorPagination | null, unacknowledgedOnly?: boolean): Promise<CollectionResult<InboxMessage>>;
6
7
  save(message: InboxMessage): Promise<InboxMessage>;
7
8
  }
@@ -1,8 +1,12 @@
1
1
  import { Endpoint } from './Endpoint.js';
2
2
  import { InboxMessage } from '../Model/Inbox/InboxMessage.js';
3
+ import { QueryString } from '../Http/Data/QueryString.js';
3
4
  export class InboxEndpoint extends Endpoint {
4
- async getAll(unacknowledgedOnly = false) {
5
- const result = await this.requestCollection('/inbox_messages?unacknowledgedOnly=' + unacknowledgedOnly, InboxMessage.parse);
5
+ async getAll(pagination = null, unacknowledgedOnly = false) {
6
+ const queryString = new QueryString('inbox_messages');
7
+ queryString.set('unacknowledgedOnly', unacknowledgedOnly);
8
+ queryString.addPagination(pagination);
9
+ const result = await this.requestCollection(queryString, InboxMessage.parse);
6
10
  return result;
7
11
  }
8
12
  async save(message) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.16.7",
3
+ "version": "1.16.8",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",
@@ -47,13 +47,13 @@
47
47
  "devDependencies": {
48
48
  "@types/jest": "^29.5.2",
49
49
  "@types/node": "^22.1.0",
50
- "@typescript-eslint/eslint-plugin": "^7.1.0",
51
- "@typescript-eslint/parser": "^7.1.0",
50
+ "@typescript-eslint/eslint-plugin": "^8.12.2",
51
+ "@typescript-eslint/parser": "^8.12.2",
52
52
  "dotenv": "^16.3.1",
53
53
  "eslint": "^8.42.0",
54
54
  "eslint-config-airbnb-base": "^15.0.0",
55
55
  "eslint-plugin-import": "^2.27.5",
56
- "eslint-plugin-jsdoc": "^48.2.0",
56
+ "eslint-plugin-jsdoc": "^50.4.3",
57
57
  "eslint-plugin-prefer-arrow": "^1.2.3",
58
58
  "eslint-plugin-promise": "^7.0.0",
59
59
  "jest": "^29.5.0",
@@ -62,7 +62,7 @@
62
62
  "rollup-plugin-node-resolve": "^5.2.0",
63
63
  "rollup-plugin-typescript": "^1.0.1",
64
64
  "ts-jest": "^29.1.0",
65
- "typescript": "^5.1.3"
65
+ "typescript": "^5.5.4"
66
66
  },
67
67
  "directories": {
68
68
  "test": "test"