From c058461364b7aa88cb408c80a67f442e2bd6b04e Mon Sep 17 00:00:00 2001 From: Luca Pezzolla Date: Thu, 1 Feb 2024 11:49:00 +0100 Subject: [PATCH] feat(notifications): add global notification preferences --- openapi.yaml | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index cedcc60..e20917f 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -2533,6 +2533,39 @@ paths: isRead: false 500: $ref: '#/components/responses/ErrorResponse' + + /notifications/preferences: + get: + tags: + - Student + summary: Get notification preferences | Ottieni preferenze notifiche + operationId: getNotificationPreferences + responses: + 200: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/NotificationPreferences' + 500: + $ref: '#/components/responses/ErrorResponse' + patch: + tags: + - Student + summary: Update notification preferences | Aggiorna preferenze notifiche + operationId: updateNotificationPreferences + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateNotificationPreferencesRequest' + responses: + 200: + description: Success + 500: + $ref: '#/components/responses/ErrorResponse' + + /notifications/{notificationId}: delete: tags: @@ -4914,6 +4947,53 @@ components: enum: [ it, en ] example: it + NotificationPreferences: + type: object + properties: + data: + type: object + properties: + notices: + type: boolean + example: true + files: + type: boolean + example: true + lectures: + type: boolean + example: true + bookings: + type: boolean + example: true + tickets: + type: boolean + example: true + required: [ notices, files, lectures, bookings, tickets] + required: [ data ] + + UpdateNotificationPreferencesRequest: + type: object + properties: + data: + type: object + properties: + notices: + type: boolean + example: true + files: + type: boolean + example: true + lectures: + type: boolean + example: true + bookings: + type: boolean + example: true + tickets: + type: boolean + example: true + required: [ data ] + LoginRequest: type: object properties: