From 3622d7d58343d144b4012884c131b3b80ebe0bce Mon Sep 17 00:00:00 2001 From: Stephanie Buadu <47737608+acn-sbuad@users.noreply.github.com> Date: Fri, 16 Feb 2024 12:53:54 +0100 Subject: [PATCH] added servers to notificaitons (#1412) --- .../architecture/notifications/_index.en.md | 7 +- static/swagger/altinn-notifications-v1.json | 1550 +++++++++-------- 2 files changed, 834 insertions(+), 723 deletions(-) diff --git a/content/notifications/architecture/notifications/_index.en.md b/content/notifications/architecture/notifications/_index.en.md index 66985506fe7..35ef23f84ca 100644 --- a/content/notifications/architecture/notifications/_index.en.md +++ b/content/notifications/architecture/notifications/_index.en.md @@ -21,10 +21,13 @@ The following API controllers are defined: - [SmsNotificationsController](https://github.com/Altinn/altinn-notifications/blob/main/src/Altinn.Notifications/Controllers/SmsNotificationsController.cs): API for retrieving sms notifications related to a single order +### Internal API +The API controllers listed below are exclusively for use within in the Altinn organization: +- [Metrics controller](https://github.com/Altinn/altinn-notifications/blob/main/src/Altinn.Notifications/Controllers/MetricsController.cs) + API for retrieving metrics over the use of the service -### Notifications internal API +### Private API The API controllers listed below are exclusively for use within the Notification solution: - - [Trigger controller](https://github.com/Altinn/altinn-notifications/blob/main/src/Altinn.Notifications/Controllers/TriggerController.cs): Functionality to trigger the start of order and notifications processing flows. diff --git a/static/swagger/altinn-notifications-v1.json b/static/swagger/altinn-notifications-v1.json index ba6f43ba998..69032f636e2 100644 --- a/static/swagger/altinn-notifications-v1.json +++ b/static/swagger/altinn-notifications-v1.json @@ -1,746 +1,854 @@ { "openapi": "3.0.1", "info": { - "title": "Altinn.Notifications", - "version": "1.0" + "title": "Altinn.Notifications", + "version": "1.0" }, + "servers": [ + { + "url": "https://platform.tt02.altinn.no/notifications/api/v1", + "description": "TT02" + }, + { + "url": "https://platform.altinn.no/notifications/api/v1", + "description": "Production" + } + ], "paths": { - "/orders/email": { - "post": { - "tags": [ - "EmailNotificationOrders" - ], - "summary": "Add an email notification order.", - "description": "The API will accept the request after som basic validation of the request.\r\nThe system will also attempt to verify that it will be possible to fulfill the order.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmailNotificationOrderRequestExt" + "/orders/email": { + "post": { + "tags": [ + "EmailNotificationOrders" + ], + "summary": "Add an email notification order.", + "description": "The API will accept the request after som basic validation of the request.\r\nThe system will also attempt to verify that it will be possible to fulfill the order.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailNotificationOrderRequestExt" + } + } + } + }, + "responses": { + "401": { + "description": "Caller is unauthorized" + }, + "403": { + "description": "Caller is not authorized to access the requested resource" + }, + "202": { + "description": "The notification order was accepted", + "headers": { + "Location": { + "description": "Link to access the newly created notification order.", + "schema": { + "type": "string", + "description": "Link to access the newly created notification order.", + "format": "" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrderIdExt" + } + } + } + }, + "400": { + "description": "The notification order is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + } } - } } - }, - "responses": { - "401": { - "description": "Caller is unauthorized" - }, - "403": { - "description": "Caller is not authorized to access the requested resource" - }, - "202": { - "description": "The notification order was accepted", - "headers": { - "Location": { - "description": "Link to access the newly created notification order.", - "schema": { - "type": "string", - "description": "Link to access the newly created notification order.", - "format": "" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrderIdExt" - } - } - } - }, - "400": { - "description": "The notification order is invalid", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationProblemDetails" - } + }, + "/orders/{id}/notifications/email": { + "get": { + "tags": [ + "EmailNotifications" + ], + "summary": "Endpoint for retrieving a summary of all email notifications related to an order", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The order id", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "401": { + "description": "Caller is unauthorized" + }, + "403": { + "description": "Caller is not authorized to access the requested resource" + }, + "200": { + "description": "The notification order was accepted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailNotificationSummaryExt" + } + } + } + }, + "404": { + "description": "No notification order mathching the id was found" + } } - } } - } - } - }, - "/orders/{id}/notifications/email": { - "get": { - "tags": [ - "EmailNotifications" - ], - "summary": "Endpoint for retrieving a summary of all email notifications related to an order", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The order id", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], - "responses": { - "401": { - "description": "Caller is unauthorized" - }, - "403": { - "description": "Caller is not authorized to access the requested resource" - }, - "200": { - "description": "The notification order was accepted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EmailNotificationSummaryExt" - } + }, + "/orders/{id}": { + "get": { + "tags": [ + "Orders" + ], + "summary": "Endpoint for retrieving an order by id.", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The order id", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "401": { + "description": "Caller is unauthorized" + }, + "403": { + "description": "Caller is not authorized to access the requested resource" + }, + "200": { + "description": "The notification order matching the provided id was retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationOrderExt" + } + } + } + }, + "404": { + "description": "No order with the provided id was found" + } } - } - }, - "404": { - "description": "No notification order mathching the id was found" - } - } - } - }, - "/orders/{id}": { - "get": { - "tags": [ - "Orders" - ], - "summary": "Endpoint for retrieving an order by id.", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The order id", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } } - ], - "responses": { - "401": { - "description": "Caller is unauthorized" - }, - "403": { - "description": "Caller is not authorized to access the requested resource" - }, - "200": { - "description": "The notification order matching the provided id was retrieved successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotificationOrderExt" - } + }, + "/orders": { + "get": { + "tags": [ + "Orders" + ], + "summary": "Endpoint for retrieving an order by senders reference", + "parameters": [ + { + "name": "sendersReference", + "in": "query", + "description": "The senders reference", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "401": { + "description": "Caller is unauthorized" + }, + "403": { + "description": "Caller is not authorized to access the requested resource" + }, + "200": { + "description": "The list of notification orders matching the provided senders ref was retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationOrderListExt" + } + } + } + } } - } - }, - "404": { - "description": "No order with the provided id was found" } - } - } - }, - "/orders": { - "get": { - "tags": [ - "Orders" - ], - "summary": "Endpoint for retrieving an order by senders reference", - "parameters": [ - { - "name": "sendersReference", - "in": "query", - "description": "The senders reference", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "401": { - "description": "Caller is unauthorized" - }, - "403": { - "description": "Caller is not authorized to access the requested resource" - }, - "200": { - "description": "The list of notification orders matching the provided senders ref was retrieved successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotificationOrderListExt" - } + }, + "/orders/{id}/status": { + "get": { + "tags": [ + "Orders" + ], + "summary": "Endpoint for retrieving an order with processing and notificatio status by id", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The order id", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "401": { + "description": "Caller is unauthorized" + }, + "403": { + "description": "Caller is not authorized to access the requested resource" + }, + "200": { + "description": "The notification order matching the provided id was retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NotificationOrderWithStatusExt" + } + } + } + }, + "404": { + "description": "No order with the provided id was found" + } } - } - } - } - } - }, - "/orders/{id}/status": { - "get": { - "tags": [ - "Orders" - ], - "summary": "Endpoint for retrieving an order with processing and notificatio status by id", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The order id", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } } - ], - "responses": { - "401": { - "description": "Caller is unauthorized" - }, - "403": { - "description": "Caller is not authorized to access the requested resource" - }, - "200": { - "description": "The notification order matching the provided id was retrieved successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NotificationOrderWithStatusExt" - } - } - } - }, - "404": { - "description": "No order with the provided id was found" - } - } - } - }, - "/orders/sms": { - "post": { - "tags": [ - "SmsNotificationOrders" - ], - "summary": "Add an SMS notification order.", - "description": "The API will accept the request after som basic validation of the request.\r\nThe system will also attempt to verify that it will be possible to fulfill the order.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SmsNotificationOrderRequestExt" + }, + "/orders/sms": { + "post": { + "tags": [ + "SmsNotificationOrders" + ], + "summary": "Add an SMS notification order.", + "description": "The API will accept the request after som basic validation of the request.\r\nThe system will also attempt to verify that it will be possible to fulfill the order.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SmsNotificationOrderRequestExt" + } + } + } + }, + "responses": { + "401": { + "description": "Caller is unauthorized" + }, + "403": { + "description": "Caller is not authorized to access the requested resource" + }, + "202": { + "description": "The notification order was accepted", + "headers": { + "Location": { + "description": "Link to access the newly created notification order.", + "schema": { + "type": "string", + "description": "Link to access the newly created notification order.", + "format": "" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrderIdExt" + } + } + } + }, + "400": { + "description": "The notification order is invalid", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationProblemDetails" + } + } + } + } } - } } - }, - "responses": { - "401": { - "description": "Caller is unauthorized" - }, - "403": { - "description": "Caller is not authorized to access the requested resource" - }, - "202": { - "description": "The notification order was accepted", - "headers": { - "Location": { - "description": "Link to access the newly created notification order.", - "schema": { - "type": "string", - "description": "Link to access the newly created notification order.", - "format": "" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrderIdExt" - } - } - } - }, - "400": { - "description": "The notification order is invalid", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationProblemDetails" - } + }, + "/orders/{id}/notifications/sms": { + "get": { + "tags": [ + "SmsNotifications" + ], + "summary": "Endpoint for retrieving a summary of all sms notifications related to an order", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The order id", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "401": { + "description": "Caller is unauthorized" + }, + "403": { + "description": "Caller is not authorized to access the requested resource" + }, + "200": { + "description": "The notification order was accepted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SmsNotificationSummaryExt" + } + } + } + }, + "404": { + "description": "No notification order mathching the id was found" + } } - } } - } } - } }, "components": { - "schemas": { - "EmailContentTypeExt": { - "enum": [ - "Plain", - "Html" - ], - "type": "string", - "description": "Enum describing available content types for an email." - }, - "EmailNotificationOrderRequestExt": { - "type": "object", - "properties": { - "subject": { - "type": "string", - "description": "Gets or sets the subject of the email", - "nullable": true - }, - "body": { - "type": "string", - "description": "Gets or sets the body of the email", - "nullable": true - }, - "contentType": { - "$ref": "#/components/schemas/EmailContentTypeExt" - }, - "requestedSendTime": { - "type": "string", - "description": "Gets or sets the send time of the email. Defaults to UtcNow.", - "format": "date-time" - }, - "sendersReference": { - "type": "string", - "description": "Gets or sets the senders reference on the notification", - "nullable": true - }, - "recipients": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RecipientExt" - }, - "description": "Gets or sets the list of recipients", - "nullable": true - } - }, - "additionalProperties": false, - "description": "Class representing an email notiication order request" - }, - "EmailNotificationStatusExt": { - "type": "object", - "properties": { - "links": { - "$ref": "#/components/schemas/NotificationResourceLinksExt" - }, - "generated": { - "type": "integer", - "description": "Gets or sets the number of generated notifications", - "format": "int32" - }, - "succeeded": { - "type": "integer", - "description": "Gets or sets the number of succeeeded notifications", - "format": "int32" - } - }, - "additionalProperties": false, - "description": "A class representing a status overview for email notifications" - }, - "EmailNotificationSummaryExt": { - "type": "object", - "properties": { - "orderId": { - "type": "string", - "description": "The order id", - "format": "uuid" - }, - "sendersReference": { - "type": "string", - "description": "The senders reference", - "nullable": true - }, - "generated": { - "type": "integer", - "description": "The number of generated email notifications", - "format": "int32" - }, - "succeeded": { - "type": "integer", - "description": "The number of email notifications that were sent successfully", - "format": "int32" - }, - "notifications": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EmailNotificationWithResultExt" - }, - "description": "A list of notifications with send result", - "nullable": true - } - }, - "additionalProperties": false, - "description": "A class representing an email notification summary" - }, - "EmailNotificationWithResultExt": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The notification id", - "format": "uuid" - }, - "succeeded": { - "type": "boolean", - "description": "Boolean indicating if the sending of the notification was successful" - }, - "recipient": { - "$ref": "#/components/schemas/RecipientExt" - }, - "sendStatus": { - "$ref": "#/components/schemas/StatusExt" - } - }, - "additionalProperties": false, - "description": "EmailNotificationWithResultExt class" - }, - "EmailTemplateExt": { - "type": "object", - "properties": { - "fromAddress": { - "type": "string", - "description": "Gets the from adress of emails created by the template", - "nullable": true - }, - "subject": { - "type": "string", - "description": "Gets the subject of emails created by the template", - "nullable": true - }, - "body": { - "type": "string", - "description": "Gets the body of emails created by the template", - "nullable": true - }, - "contentType": { - "$ref": "#/components/schemas/EmailContentTypeExt" - } - }, - "additionalProperties": false, - "description": "Template for an email notification" - }, - "NotificationChannelExt": { - "enum": [ - "Email", - "Sms" - ], - "type": "string", - "description": "Enum describing available notification channels." - }, - "NotificationOrderExt": { - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "creator": { - "type": "string", - "nullable": true - }, - "sendersReference": { - "type": "string", - "nullable": true - }, - "requestedSendTime": { - "type": "string", - "format": "date-time" - }, - "created": { - "type": "string", - "format": "date-time" - }, - "notificationChannel": { - "$ref": "#/components/schemas/NotificationChannelExt" - }, - "recipients": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RecipientExt" - }, - "description": "Gets or sets the list of recipients", - "nullable": true - }, - "emailTemplate": { - "$ref": "#/components/schemas/EmailTemplateExt" - }, - "smsTemplate": { - "$ref": "#/components/schemas/SmsTemplateExt" - }, - "links": { - "$ref": "#/components/schemas/OrderResourceLinksExt" - } - }, - "additionalProperties": false, - "description": "A class representing a registered notification order." - }, - "NotificationOrderListExt": { - "type": "object", - "properties": { - "count": { - "type": "integer", - "description": "Gets or sets the number of orders in the list", - "format": "int32" - }, - "orders": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NotificationOrderExt" - }, - "description": "Gets or sets the list of notification orders", - "nullable": true - } - }, - "additionalProperties": false, - "description": "A class representing a list of notification order." - }, - "NotificationOrderWithStatusExt": { - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "sendersReference": { - "type": "string", - "nullable": true - }, - "requestedSendTime": { - "type": "string", - "format": "date-time" - }, - "creator": { - "type": "string", - "nullable": true - }, - "created": { - "type": "string", - "format": "date-time" - }, - "notificationChannel": { - "$ref": "#/components/schemas/NotificationChannelExt" - }, - "processingStatus": { - "$ref": "#/components/schemas/StatusExt" - }, - "notificationsStatusSummary": { - "$ref": "#/components/schemas/NotificationsStatusSummaryExt" - } - }, - "additionalProperties": false, - "description": "A class representing a registered notification order with status information." - }, - "NotificationResourceLinksExt": { - "type": "object", - "properties": { - "self": { - "type": "string", - "description": "Gets or sets the self link", - "nullable": true - } - }, - "additionalProperties": false, - "description": "A class representing a set of resource links of a notification" - }, - "NotificationsStatusSummaryExt": { - "type": "object", - "properties": { - "email": { - "$ref": "#/components/schemas/EmailNotificationStatusExt" - }, - "sms": { - "$ref": "#/components/schemas/SmsNotificationStatusExt" - } - }, - "additionalProperties": false, - "description": "A class representing a summary of status overviews of all notification channels" - }, - "OrderIdExt": { - "type": "object", - "properties": { - "orderId": { - "type": "string", - "description": "The order id", - "format": "uuid" - } - }, - "additionalProperties": false, - "description": "A class representing a container for an order id." - }, - "OrderResourceLinksExt": { - "type": "object", - "properties": { - "self": { - "type": "string", - "description": "Gets or sets the self link", - "nullable": true - }, - "status": { - "type": "string", - "description": "Gets or sets the status link", - "nullable": true - } - }, - "additionalProperties": false, - "description": "A class representing a set of resource links of a notification order." - }, - "RecipientExt": { - "type": "object", - "properties": { - "emailAddress": { - "type": "string", - "description": "Gets or sets the email address of the recipient", - "nullable": true - }, - "mobileNumber": { - "type": "string", - "description": "Gets or sets the mobile number of the recipient", - "nullable": true - } - }, - "additionalProperties": false, - "description": "Class representing a notification recipient" - }, - "SmsNotificationOrderRequestExt": { - "type": "object", - "properties": { - "senderNumber": { - "type": "string", - "description": "Gets or sets the sender number of the SMS", - "nullable": true - }, - "body": { - "type": "string", - "description": "Gets or sets the body of the SMS", - "nullable": true - }, - "requestedSendTime": { - "type": "string", - "description": "Gets or sets the send time of the SMS. Defaults to UtcNow.", - "format": "date-time" - }, - "sendersReference": { - "type": "string", - "description": "Gets or sets the senders reference on the notification", - "nullable": true - }, - "recipients": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RecipientExt" - }, - "description": "Gets or sets the list of recipients", - "nullable": true - } - }, - "additionalProperties": false, - "description": "Class representing an SMS notiication order request" - }, - "SmsNotificationStatusExt": { - "type": "object", - "properties": { - "links": { - "$ref": "#/components/schemas/NotificationResourceLinksExt" - }, - "generated": { - "type": "integer", - "description": "Gets or sets the number of generated notifications", - "format": "int32" - }, - "succeeded": { - "type": "integer", - "description": "Gets or sets the number of succeeeded notifications", - "format": "int32" - } - }, - "additionalProperties": false, - "description": "A class representing a status overview for sms notifications" - }, - "SmsTemplateExt": { - "type": "object", - "properties": { - "senderNumber": { - "type": "string", - "description": "Gets the number from which the SMS is created by the template", - "nullable": true - }, - "body": { - "type": "string", - "description": "Gets the body of SMSs created by the template", - "nullable": true - } - }, - "additionalProperties": false, - "description": "Template for an sms notification" - }, - "StatusExt": { - "type": "object", - "properties": { - "status": { - "type": "string", - "description": "Gets or sets the status", - "nullable": true - }, - "description": { - "type": "string", - "description": "Gets or sets the description", - "nullable": true - }, - "lastUpdate": { - "type": "string", - "description": "Gets or sets the date time of when the status was last updated", - "format": "date-time" - } - }, - "additionalProperties": false, - "description": "A class representing a status summary" - }, - "ValidationProblemDetails": { - "type": "object", - "properties": { - "type": { - "type": "string", - "nullable": true - }, - "title": { - "type": "string", - "nullable": true - }, - "status": { - "type": "integer", - "format": "int32", - "nullable": true - }, - "detail": { - "type": "string", - "nullable": true - }, - "instance": { - "type": "string", - "nullable": true - }, - "errors": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "nullable": true + "schemas": { + "EmailContentTypeExt": { + "enum": [ + "Plain", + "Html" + ], + "type": "string", + "description": "Enum describing available content types for an email." + }, + "EmailNotificationOrderRequestExt": { + "type": "object", + "properties": { + "subject": { + "type": "string", + "description": "Gets or sets the subject of the email", + "nullable": true + }, + "body": { + "type": "string", + "description": "Gets or sets the body of the email", + "nullable": true + }, + "contentType": { + "$ref": "#/components/schemas/EmailContentTypeExt" + }, + "requestedSendTime": { + "type": "string", + "description": "Gets or sets the send time of the email. Defaults to UtcNow.", + "format": "date-time" + }, + "sendersReference": { + "type": "string", + "description": "Gets or sets the senders reference on the notification", + "nullable": true + }, + "recipients": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecipientExt" + }, + "description": "Gets or sets the list of recipients", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Class representing an email notiication order request" + }, + "EmailNotificationStatusExt": { + "type": "object", + "properties": { + "links": { + "$ref": "#/components/schemas/NotificationResourceLinksExt" + }, + "generated": { + "type": "integer", + "description": "Gets or sets the number of generated notifications", + "format": "int32" + }, + "succeeded": { + "type": "integer", + "description": "Gets or sets the number of succeeeded notifications", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "A class representing a status overview for email notifications" + }, + "EmailNotificationSummaryExt": { + "type": "object", + "properties": { + "orderId": { + "type": "string", + "description": "The order id", + "format": "uuid" + }, + "sendersReference": { + "type": "string", + "description": "The senders reference", + "nullable": true + }, + "generated": { + "type": "integer", + "description": "The number of generated email notifications", + "format": "int32" + }, + "succeeded": { + "type": "integer", + "description": "The number of email notifications that were sent successfully", + "format": "int32" + }, + "notifications": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EmailNotificationWithResultExt" + }, + "description": "A list of notifications with send result", + "nullable": true + } + }, + "additionalProperties": false, + "description": "A class representing an email notification summary" + }, + "EmailNotificationWithResultExt": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The notification id", + "format": "uuid" + }, + "succeeded": { + "type": "boolean", + "description": "Boolean indicating if the sending of the notification was successful" + }, + "recipient": { + "$ref": "#/components/schemas/RecipientExt" + }, + "sendStatus": { + "$ref": "#/components/schemas/StatusExt" + } + }, + "additionalProperties": false, + "description": "EmailNotificationWithResultExt class" + }, + "EmailTemplateExt": { + "type": "object", + "properties": { + "fromAddress": { + "type": "string", + "description": "Gets the from adress of emails created by the template", + "nullable": true + }, + "subject": { + "type": "string", + "description": "Gets the subject of emails created by the template", + "nullable": true + }, + "body": { + "type": "string", + "description": "Gets the body of emails created by the template", + "nullable": true + }, + "contentType": { + "$ref": "#/components/schemas/EmailContentTypeExt" + } + }, + "additionalProperties": false, + "description": "Template for an email notification" + }, + "NotificationChannelExt": { + "enum": [ + "Email", + "Sms" + ], + "type": "string", + "description": "Enum describing available notification channels." + }, + "NotificationOrderExt": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "creator": { + "type": "string", + "nullable": true + }, + "sendersReference": { + "type": "string", + "nullable": true + }, + "requestedSendTime": { + "type": "string", + "format": "date-time" + }, + "created": { + "type": "string", + "format": "date-time" + }, + "notificationChannel": { + "$ref": "#/components/schemas/NotificationChannelExt" + }, + "recipients": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecipientExt" + }, + "description": "Gets or sets the list of recipients", + "nullable": true + }, + "emailTemplate": { + "$ref": "#/components/schemas/EmailTemplateExt" + }, + "smsTemplate": { + "$ref": "#/components/schemas/SmsTemplateExt" + }, + "links": { + "$ref": "#/components/schemas/OrderResourceLinksExt" + } + }, + "additionalProperties": false, + "description": "A class representing a registered notification order." + }, + "NotificationOrderListExt": { + "type": "object", + "properties": { + "count": { + "type": "integer", + "description": "Gets or sets the number of orders in the list", + "format": "int32" + }, + "orders": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationOrderExt" + }, + "description": "Gets or sets the list of notification orders", + "nullable": true + } + }, + "additionalProperties": false, + "description": "A class representing a list of notification order." + }, + "NotificationOrderWithStatusExt": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "sendersReference": { + "type": "string", + "nullable": true + }, + "requestedSendTime": { + "type": "string", + "format": "date-time" + }, + "creator": { + "type": "string", + "nullable": true + }, + "created": { + "type": "string", + "format": "date-time" + }, + "notificationChannel": { + "$ref": "#/components/schemas/NotificationChannelExt" + }, + "processingStatus": { + "$ref": "#/components/schemas/StatusExt" + }, + "notificationsStatusSummary": { + "$ref": "#/components/schemas/NotificationsStatusSummaryExt" + } + }, + "additionalProperties": false, + "description": "A class representing a registered notification order with status information." + }, + "NotificationResourceLinksExt": { + "type": "object", + "properties": { + "self": { + "type": "string", + "description": "Gets or sets the self link", + "nullable": true + } + }, + "additionalProperties": false, + "description": "A class representing a set of resource links of a notification" + }, + "NotificationsStatusSummaryExt": { + "type": "object", + "properties": { + "email": { + "$ref": "#/components/schemas/EmailNotificationStatusExt" + }, + "sms": { + "$ref": "#/components/schemas/SmsNotificationStatusExt" + } + }, + "additionalProperties": false, + "description": "A class representing a summary of status overviews of all notification channels" + }, + "OrderIdExt": { + "type": "object", + "properties": { + "orderId": { + "type": "string", + "description": "The order id", + "format": "uuid" + } + }, + "additionalProperties": false, + "description": "A class representing a container for an order id." + }, + "OrderResourceLinksExt": { + "type": "object", + "properties": { + "self": { + "type": "string", + "description": "Gets or sets the self link", + "nullable": true + }, + "status": { + "type": "string", + "description": "Gets or sets the status link", + "nullable": true + } + }, + "additionalProperties": false, + "description": "A class representing a set of resource links of a notification order." + }, + "RecipientExt": { + "type": "object", + "properties": { + "emailAddress": { + "type": "string", + "description": "Gets or sets the email address of the recipient", + "nullable": true + }, + "mobileNumber": { + "type": "string", + "description": "Gets or sets the mobile number of the recipient", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Class representing a notification recipient" + }, + "SmsNotificationOrderRequestExt": { + "type": "object", + "properties": { + "senderNumber": { + "type": "string", + "description": "Gets or sets the sender number of the SMS", + "nullable": true + }, + "body": { + "type": "string", + "description": "Gets or sets the body of the SMS", + "nullable": true + }, + "requestedSendTime": { + "type": "string", + "description": "Gets or sets the send time of the SMS. Defaults to UtcNow.", + "format": "date-time" + }, + "sendersReference": { + "type": "string", + "description": "Gets or sets the senders reference on the notification", + "nullable": true + }, + "recipients": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RecipientExt" + }, + "description": "Gets or sets the list of recipients", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Class representing an SMS notiication order request" + }, + "SmsNotificationStatusExt": { + "type": "object", + "properties": { + "links": { + "$ref": "#/components/schemas/NotificationResourceLinksExt" + }, + "generated": { + "type": "integer", + "description": "Gets or sets the number of generated notifications", + "format": "int32" + }, + "succeeded": { + "type": "integer", + "description": "Gets or sets the number of succeeeded notifications", + "format": "int32" + } + }, + "additionalProperties": false, + "description": "A class representing a status overview for sms notifications" + }, + "SmsNotificationSummaryExt": { + "type": "object", + "properties": { + "orderId": { + "type": "string", + "description": "The order id", + "format": "uuid" + }, + "sendersReference": { + "type": "string", + "description": "The senders reference", + "nullable": true + }, + "generated": { + "type": "integer", + "description": "The number of generated sms notifications", + "format": "int32" + }, + "succeeded": { + "type": "integer", + "description": "The number of sms notifications that were sent successfully", + "format": "int32" + }, + "notifications": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SmsNotificationWithResultExt" + }, + "description": "A list of notifications with send result", + "nullable": true + } + }, + "additionalProperties": false, + "description": "A class representing an sms notification summary" + }, + "SmsNotificationWithResultExt": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The notification id", + "format": "uuid" + }, + "succeeded": { + "type": "boolean", + "description": "Boolean indicating if the sending of the notification was successful" + }, + "recipient": { + "$ref": "#/components/schemas/RecipientExt" + }, + "sendStatus": { + "$ref": "#/components/schemas/StatusExt" + } + }, + "additionalProperties": false, + "description": "A class representing an sms notification with result" + }, + "SmsTemplateExt": { + "type": "object", + "properties": { + "senderNumber": { + "type": "string", + "description": "Gets the number from which the SMS is created by the template", + "nullable": true + }, + "body": { + "type": "string", + "description": "Gets the body of SMSs created by the template", + "nullable": true + } + }, + "additionalProperties": false, + "description": "Template for an sms notification" + }, + "StatusExt": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "Gets or sets the status", + "nullable": true + }, + "description": { + "type": "string", + "description": "Gets or sets the description", + "nullable": true + }, + "lastUpdate": { + "type": "string", + "description": "Gets or sets the date time of when the status was last updated", + "format": "date-time" + } + }, + "additionalProperties": false, + "description": "A class representing a status summary" + }, + "ValidationProblemDetails": { + "type": "object", + "properties": { + "type": { + "type": "string", + "nullable": true + }, + "title": { + "type": "string", + "nullable": true + }, + "status": { + "type": "integer", + "format": "int32", + "nullable": true + }, + "detail": { + "type": "string", + "nullable": true + }, + "instance": { + "type": "string", + "nullable": true + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "nullable": true + } + }, + "additionalProperties": {} } - }, - "additionalProperties": { } } - } } - } \ No newline at end of file +} \ No newline at end of file