attlaz-client 1.11.0 → 1.11.1
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.
|
@@ -3,5 +3,5 @@ import { CollectionResult } from '../Model/Result/CollectionResult.js';
|
|
|
3
3
|
import { InboxMessage } from '../Model/Inbox/InboxMessage';
|
|
4
4
|
export declare class InboxEndpoint extends Endpoint {
|
|
5
5
|
getAll(unacknowledgedOnly?: boolean): Promise<CollectionResult<InboxMessage>>;
|
|
6
|
-
save(
|
|
6
|
+
save(message: InboxMessage): Promise<InboxMessage>;
|
|
7
7
|
}
|
|
@@ -5,8 +5,8 @@ export class InboxEndpoint extends Endpoint {
|
|
|
5
5
|
const result = await this.requestCollection('/inbox_messages?unacknowledgedOnly=' + unacknowledgedOnly, InboxMessage.parse);
|
|
6
6
|
return result;
|
|
7
7
|
}
|
|
8
|
-
async save(
|
|
9
|
-
const result = await this.requestObject('/inbox_messages',
|
|
8
|
+
async save(message) {
|
|
9
|
+
const result = await this.requestObject('/inbox_messages', message, InboxMessage.parse, 'POST');
|
|
10
10
|
const savedNotification = result.getData();
|
|
11
11
|
if (savedNotification === null) {
|
|
12
12
|
throw new Error('Unable to save inbox message: wrong response from API');
|