diff --git a/src/openapi/customers/notifications-crud.yaml b/src/openapi/customers/notifications-crud.yaml index c54cc8f..ab12647 100644 --- a/src/openapi/customers/notifications-crud.yaml +++ b/src/openapi/customers/notifications-crud.yaml @@ -60,8 +60,8 @@ paths: value: notificationSubscriptions: - notificationSubscriptionId: 5bedce29-af0c-4f3c-b182-2caa8a1f9377 - notifcationCategory: - notifcationCategoryId: 1 + notificationCategory: + notificationCategoryId: 1 name: Mijn Reizen customerProfileId: 1337 subscriptionActivities: @@ -73,16 +73,9 @@ paths: user: "1001337" timestamp: "2025-10-02T14:00:00Z" isActive: false - _links: - edit: - href: /notificationsubscriptions/5bedce29-af0c-4f3c-b182-2caa8a1f9377 - method: PATCH - delete: - href: /notificationsubscriptions/5bedce29-af0c-4f3c-b182-2caa8a1f9377 - method: DELETE - notificationSubscriptionId: 39e8d8e6-5c85-49b6-ba4b-62e47fa4f7fd - notifcationCategory: - notifcationCategoryId: 2 + notificationCategory: + notificationCategoryId: 2 name: Mijn Passen customerProfileId: 1338 subscriptionActivities: @@ -94,13 +87,6 @@ paths: user: "1001338" timestamp: "2025-10-02T14:00:00Z" isActive: true - _links: - edit: - href: /notificationsubscriptions/39e8d8e6-5c85-49b6-ba4b-62e47fa4f7fd - method: PATCH - delete: - href: /notificationsubscriptions/39e8d8e6-5c85-49b6-ba4b-62e47fa4f7fd - method: DELETE href: null "400": description: Bad request @@ -143,12 +129,12 @@ paths: examples: fullNotificationSubscriptionRequest: value: - notifcationCategoryId: 1 + notificationCategoryId: 1 customerProfileId: 1337 - subscriptionActivities: - - user: "1001337" - timestamp: "2025-10-02T14:00:00Z" - isActive: true, + subscriptionActivity: + user: "1001337" + timestamp: "2025-10-02T14:00:00Z" + isActive: true, responses: "201": description: Notification subscription created successfully @@ -157,18 +143,9 @@ paths: schema: $ref: "#/components/schemas/PostNotificationSubscriptionResponse" examples: - fullNotificationSubscriptionResponse: + notificationSubscriptionResponse: value: notificationSubscriptionId: 5bedce29-af0c-4f3c-b182-2caa8a1f9377 - notifcationCategory: - notifcationCategoryId: 1 - name: Mijn Reizen - customerProfileId: 1337 - subscriptionActivities: - - subscriptionActivityId: 90353a1d-c5bd-44c2-aa75-57873b8071c8 - user: "1001337" - timestamp: "2025-10-02T14:00:00Z" - isActive: true "400": description: Bad request content: @@ -276,36 +253,231 @@ paths: examples: addSubscriptionActivityResponse: value: - notificationSubscriptionId: 5bedce29-af0c-4f3c-b182-2caa8a1f9377 - eventTypeChannel: - eventTypeChannelId: 22a9ab1cb-b1a3-482e-bae3-9a517a8cfb4f - eventType: - eventTypeId: 15 - eventOrigin: - eventOriginId: 1 - name: GBO - description: Events originated at GBO - name: Travel - subname: Missing CKO - prettyName: Checkout gemist - optInRequired: true - channel: - channelId: 1 - name: push - isDefault: true - isMandatory: false - customerProfileId: 1337 - ovpayTokenId: 42 - # deviceId: 7122a988-a00a-417d-a5b4-da2d91354976 - subscriptionActivities: - - subscriptionActivityId: 30b32657-1ba1-44e0-8868-4db807695387 - user: "1001337" - timestamp: "2025-10-08T15:00:00Z" - isActive: true - - subscriptionActivityId: 90353a1d-c5bd-44c2-aa75-57873b8071c8 - user: "1001338" - timestamp: "2025-10-02T14:00:00Z" - isActive: false + subscriptionActivityId: 30b32657-1ba1-44e0-8868-4db807695387 + "400": + description: Bad request + content: + application/json: + schema: + type: object + $ref: "#/components/schemas/400Response" + "401": + description: Unauthorized + content: + application/json: + schema: + type: object + $ref: "#/components/schemas/401Response" + "404": + description: Not found + content: + application/json: + schema: + type: object + $ref: "#/components/schemas/404Response" + "500": + description: Internal server error + content: + application/json: + schema: + type: object + $ref: "#/components/schemas/500Response" + /notificationcategories: + get: + tags: + - Notification Categories + summary: Get all notification categories. + parameters: + - name: expand + in: query + schema: + type: string + enum: [none, eventType, eventTypeChannel] + default: none + description: "Expand nested attributes. Possible values: `none`, `eventType`, and `eventTypeChannel`." + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/GetNotificationCategoriesResponse" + examples: + getNotifactionCategories?expand=none: + summary: Return all the notification categories without nested attributes (expand=none) + value: + notificationCategories: + - notificationCategoryId: 1 + name: Nieuwsbrief + - notificationCategoryId: 2 + name: Mijn Reizen + - notificationCategoryId: 3 + name: Mijn Passen + getNotifactionCategories?expand=eventType: + summary: Return all the notification categories with nested event types (expand=eventType) + value: + notificationCategories: + - notificationCategoryId: 1 + name: Nieuwsbrief + eventTypes: + - eventTypeId: 1 + eventOrigin: + eventOriginId: 6 + name: Maileon + name: HTM nieuwsbrief + subName: "" + prettyName: HTM nieuwsbrief + optinRequired: false + - notificationCategoryId: 2 + name: Mijn Reizen + eventTypes: + - eventTypeId: 2 + eventOrigin: + eventOriginId: 1 + name: GBO + name: ALERTS, TRAVEL_SCHEME + subName: CI + prettyName: Check In + optinRequired: false + - eventTypeId: 3 + eventOrigin: + eventOriginId: 1 + name: GBO + name: ALERTS, PAD + subName: null + prettyName: Profielgegevens op de pas + optinRequired: false + - notificationCategoryId: 3 + name: Mijn Passen + eventTypes: + - eventTypeId: 4 + eventOrigin: + eventOriginId: 1 + name: GBO + name: ALERTS, CARD + subName: null + prettyName: Mijn passen + optinRequired: false + - eventTypeId: 5 + eventOrigin: + eventOriginId: 1 + name: GBO + name: ALERTS, PAD + subName: null + prettyName: Profielgegevens op de pas + optinRequired: false + getNotifactionCategories?expand=eventTypeChannel: + summary: Return all the notification categories with all nested attributes (expand=eventTypeChannel) + value: + notificationCategories: + - notificationCategoryId: 1 + name: Nieuwsbrief + eventTypes: + - eventTypeId: 1 + eventOrigin: + eventOriginId: 6 + name: Maileon + name: HTM nieuwsbrief + subName: "" + prettyName: HTM nieuwsbrief + optinRequired: false + eventTypeChannels: + - eventTypeChannelId: 447a1116-6cd7-4645-8c3d-43237b6186cd + channel: + channelId: 2 + name: email + isDefault: true + isMandatory: false + - notificationCategoryId: 2 + name: Mijn Reizen + eventTypes: + - eventTypeId: 2 + eventOrigin: + eventOriginId: 1 + name: GBO + name: ALERTS, TRAVEL_SCHEME + subName: CI + prettyName: Check In + optinRequired: false + eventTypeChannels: + - eventTypeChannelId: ccc8c025-06b5-4928-a632-23e1c55cd173 + channel: + channelId: 1 + name: push + isDefault: true + isMandatory: false + - eventTypeChannelId: da2deb4c-ce77-4b5f-aecc-ddebfd14349d + channel: + channelId: 2 + name: email + isDefault: false + isMandatory: false + - eventTypeId: 3 + eventOrigin: + eventOriginId: 1 + name: GBO + name: ALERTS, PAD + subName: null + prettyName: Profielgegevens op de pas + optinRequired: false + eventTypeChannels: + - eventTypeChannelId: 8e7df8f1-7e50-482f-8301-d399e75fd432 + channel: + channelId: 1 + name: push + isDefault: true + isMandatory: false + - eventTypeChannelId: 72960a92-1855-469f-9cfd-5d72f57106f2 + channel: + channelId: 2 + name: email + isDefault: false + isMandatory: false + - notificationCategoryId: 3 + name: Mijn Passen + eventTypes: + - eventTypeId: 4 + eventOrigin: + eventOriginId: 1 + name: GBO + name: ALERTS, CARD + subName: null + prettyName: Mijn passen + optinRequired: false + eventTypeChannels: + - eventTypeChannelId: be07c7bb-714b-4637-acf5-a67025ad8e60 + channel: + channelId: 1 + name: push + isDefault: true + isMandatory: false + - eventTypeChannelId: 0c797b5a-ed34-494b-8c64-0a832830d392 + channel: + channelId: 2 + name: email + isDefault: false + isMandatory: false + - eventTypeId: 5 + eventOrigin: + eventOriginId: 1 + name: GBO + name: ALERTS, PAD + subName: null + prettyName: Profielgegevens op de pas + optinRequired: false + eventTypeChannels: + - eventTypeChannelId: b910368f-c045-4e8e-b01d-bcbc78708bac + channel: + channelId: 1 + name: push + isDefault: true + isMandatory: false + - eventTypeChannelId: 93e773da-ba3b-48da-9a0e-ee478eaa752f + channel: + channelId: 2 + name: email + isDefault: false + isMandatory: false "400": description: Bad request content: @@ -337,8 +509,9 @@ paths: /eventorigins: get: summary: Get all event origins + deprecated: true tags: - - References + - References (not for MVP) parameters: - name: name in: query @@ -403,8 +576,9 @@ paths: /channels: get: summary: Get all channels + deprecated: true tags: - - References + - References (not for MVP) parameters: - name: name in: query @@ -459,72 +633,12 @@ paths: schema: type: object $ref: "#/components/schemas/500Response" - /notificationcategories: - get: - summary: Get all notification categories - tags: - - References - parameters: - - name: name - in: query - required: false - schema: - type: string - description: Filter by notification category name (case-insensitive, partial match) - responses: - "200": - description: A list of notification categories - content: - application/json: - schema: - $ref: "#/components/schemas/GetNotificationCategoriesResponse" - examples: - notificationCategoriesResponse: - value: - notificationCategories: - - notifcationCategoryId: 1 - name: Mijn Reizen - - notifcationCategoryId: 2 - name: Mijn Passen - - notifcationCategoryId: 3 - name: Service Alerts - - notifcationCategoryId: 4 - name: Service Berichten - - notifcationCategoryId: 5 - name: Mijn Betalingen - "400": - description: Bad request - content: - application/json: - schema: - type: object - $ref: "#/components/schemas/400Response" - "401": - description: Unauthorized - content: - application/json: - schema: - type: object - $ref: "#/components/schemas/401Response" - "404": - description: Not found - content: - application/json: - schema: - type: object - $ref: "#/components/schemas/404Response" - "500": - description: Internal server error - content: - application/json: - schema: - type: object - $ref: "#/components/schemas/500Response" /eventtypes: get: summary: Get all event types + deprecated: true tags: - - References + - References (not for MVP) parameters: - name: name in: query @@ -601,8 +715,9 @@ paths: /eventtypecategories: get: summary: Get all event type categories + deprecated: true tags: - - References + - References (not for MVP) parameters: - name: name in: query @@ -632,7 +747,7 @@ paths: prettyName: Checkout gemist optInRequired: true notificationCategory: - notifcationCategoryId: 1 + notificationCategoryId: 1 name: Mijn Reizen - eventType: eventTypeId: 16 @@ -645,7 +760,7 @@ paths: prettyName: Checkin gemist optInRequired: true notificationCategory: - notifcationCategoryId: 1 + notificationCategoryId: 1 name: Mijn Reizen "400": description: Bad request @@ -678,8 +793,9 @@ paths: /eventtypechannels: get: summary: Get all event type channels + deprecated: true tags: - - References + - References (not for MVP) parameters: - name: name in: query @@ -779,7 +895,7 @@ components: type: string format: uuid example: 5bedce29-af0c-4f3c-b182-2caa8a1f9377 - notifcationCategory: + notificationCategory: $ref: "#/components/schemas/NotificationCategory" customerProfileId: type: integer @@ -810,41 +926,44 @@ components: - isActive required: - notificationSubscriptionId - - notifcationCategory + - notificationCategory - customerProfileId PostNotificationSubscriptionRequest: type: object properties: - notifcationCategoryId: + notificationCategoryId: type: integer example: 1 customerProfileId: type: integer example: 1337 - subscriptionActivities: - type: array - items: - type: object - properties: - user: - type: string - example: "1001337" - timestamp: - type: string - format: date-time - example: "2025-10-02T15:00:00Z" - isActive: - type: boolean - example: true - required: - - user - - timestamp - - isActive + subscriptionActivity: + type: object + properties: + user: + type: string + example: "1001337" + timestamp: + type: string + format: date-time + example: "2025-10-02T15:00:00Z" + isActive: + type: boolean + example: true + required: + - user + - timestamp + - isActive required: - - notifcationCategoryId + - notificationCategoryId - customerProfileId PostNotificationSubscriptionResponse: - $ref: "#/components/schemas/NotificationSubscription" + type: object + properties: + notificationSubscriptionId: + type: string + format: uuid + example: 5bedce29-af0c-4f3c-b182-2caa8a1f9377 PostSubscriptionActivityRequest: type: object properties: @@ -863,7 +982,12 @@ components: - timestamp - isActive PostSubscriptionActivityResponse: - $ref: "#/components/schemas/NotificationSubscription" + type: object + properties: + subscriptionActivityId: + type: string + format: uuid + example: 30b32657-1ba1-44e0-8868-4db807695387 GetEventOriginsResponse: type: object properties: @@ -954,6 +1078,10 @@ components: optInRequired: type: boolean example: true + eventTypeChannels: + type: array + items: + $ref: "#/components/schemas/EventTypeChannel" required: - eventTypeId - eventOrigin @@ -990,14 +1118,18 @@ components: NotificationCategory: type: object properties: - notifcationCategoryId: + notificationCategoryId: type: integer example: 1 name: type: string example: Mijn Reizen + eventTypes: + type: array + items: + $ref: "#/components/schemas/EventType" required: - - notifcationCategoryId + - notificationCategoryId - name 400Response: type: object @@ -1013,7 +1145,7 @@ components: description: type: string example: >- - 'Bad Request: Input parameters missing! Please fill in at least 1 + Bad Request: Input parameters missing! Please fill in at least 1 valid input parameter. 401Response: type: object