UNPKG

@dodi-smart/nuki-graphql-api

Version:
110 lines 3.31 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.NotificationService = void 0; class NotificationService { constructor(httpRequest) { this.httpRequest = httpRequest; } /** * Get all notifications attached to your account * @param referenceId The reference ID to the third party system * @returns Notification successful operation * @throws ApiError */ getNotifications(referenceId) { return this.httpRequest.request({ method: 'GET', url: '/notification', query: { 'referenceId': referenceId, }, errors: { 401: `Not authorized`, }, }); } /** * Create a notification configuration * @param requestBody Notification representation * @returns Notification successful operation * @throws ApiError */ createNotification(requestBody) { return this.httpRequest.request({ method: 'PUT', url: '/notification', body: requestBody, mediaType: '*/*', errors: { 400: `Bad Parameter`, 401: `Not authorized`, 403: `Forbidden`, }, }); } /** * Get a notification configuration * @param notificationId The unique notification ID * @returns Notification successful operation * @throws ApiError */ getNotification(notificationId) { return this.httpRequest.request({ method: 'GET', url: '/notification/{notificationId}', path: { 'notificationId': notificationId, }, errors: { 401: `Not authorized`, 403: `Forbidden`, 404: `Not found`, }, }); } /** * Update a notification configuration * @param notificationId The unique notification ID * @param requestBody Notification update representation * @returns Notification successful operation * @throws ApiError */ updateNotification(notificationId, requestBody) { return this.httpRequest.request({ method: 'POST', url: '/notification/{notificationId}', path: { 'notificationId': notificationId, }, body: requestBody, mediaType: '*/*', errors: { 400: `Invalid parameter given`, 401: `Not authorized`, 403: `Forbidden`, }, }); } /** * Delete a notification configuration * @param notificationId The unique notification ID * @returns void * @throws ApiError */ deleteNotification(notificationId) { return this.httpRequest.request({ method: 'DELETE', url: '/notification/{notificationId}', path: { 'notificationId': notificationId, }, errors: { 401: `Not authorized`, 403: `Forbidden`, 405: `Not allowed`, }, }); } } exports.NotificationService = NotificationService; //# sourceMappingURL=NotificationService.js.map