diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 0fd49460..f1d72fa6 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,12 +1,13 @@ -speakeasyVersion: 1.308.1 +speakeasyVersion: 1.462.2 sources: openapi-with-code-samples: sourceNamespace: openapi-with-code-samples - sourceRevisionDigest: sha256:8e7b0030b71fdec4ccecd24cc1bc1969ef382cc2ac80a11c3c813ccedf287388 - sourceBlobDigest: sha256:b1f491e8f7b893a82300669ad821fa6c249c74874cae1213c92719b423d5457f + sourceRevisionDigest: sha256:de60dd2e956b40266392eb01ebb7a3a695be4ba1fb65836acba7f4668ed428dc + sourceBlobDigest: sha256:8fbd19aaa05e288931bf393779ec0af7d03523c2c32ea9792a9c4e3ed8e9ca21 tags: - latest - - staging + - speakeasy-sdk-regen-1721694309 + - "1.0" targets: {} workflow: workflowVersion: 1.0.0 diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index c085d717..2d133b94 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -1,12 +1,12 @@ workflowVersion: 1.0.0 speakeasyVersion: latest sources: - openapi-with-code-samples: - inputs: - - location: registry.speakeasyapi.dev/novu/novu/json-development:main - overlays: - - location: registry.speakeasyapi.dev/novu/novu/code-samples-typescript:main - output: ./openapi.json - registry: - location: registry.speakeasyapi.dev/novu/novu/openapi-with-code-samples + openapi-with-code-samples: + inputs: + - location: registry.speakeasyapi.dev/novu/novu/json-development:main + overlays: + - location: registry.speakeasyapi.dev/novu/novu/code-samples-typescript:main + output: ./openapi.json + registry: + location: registry.speakeasyapi.dev/novu/novu/openapi-with-code-samples targets: {} diff --git a/openapi.json b/openapi.json new file mode 100644 index 00000000..732d71a1 --- /dev/null +++ b/openapi.json @@ -0,0 +1,18561 @@ +{ + "openapi": "3.0.0", + "paths": { + "/v1/events/trigger": { + "post": { + "operationId": "EventsController_trigger", + "x-speakeasy-group": "", + "x-speakeasy-usage-example": { + "title": "Trigger Notification Event" + }, + "x-speakeasy-name-override": "trigger", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.trigger({\n name: \"workflow_identifier\",\n payload: {\n \"comment_id\": \"string\",\n \"post\": {\n \"text\": \"string\",\n },\n },\n bridgeUrl: \"https://example.com/bridge\",\n overrides: {\n \"fcm\": {\n \"data\": {\n \"key\": \"value\",\n },\n },\n },\n to: {\n subscriberId: \"\u003cid\u003e\",\n },\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "summary": "Trigger event", + "description": "\n Trigger event is the main (and only) way to send notifications to subscribers. \n The trigger identifier is used to match the particular workflow associated with it. \n Additional information can be passed according the body interface below.\n ", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TriggerEventRequestDto" + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TriggerEventResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Events" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/events/trigger/bulk": { + "post": { + "operationId": "EventsController_triggerBulk", + "x-speakeasy-group": "", + "x-speakeasy-usage-example": { + "title": "Trigger Notification Events in Bulk" + }, + "x-speakeasy-name-override": "triggerBulk", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.triggerBulk({\n events: [\n {\n name: \"workflow_identifier\",\n payload: {\n \"comment_id\": \"string\",\n \"post\": {\n \"text\": \"string\",\n },\n },\n bridgeUrl: \"https://example.com/bridge\",\n overrides: {\n \"fcm\": {\n \"data\": {\n \"key\": \"value\",\n },\n },\n },\n to: {\n subscriberId: \"\u003cid\u003e\",\n },\n },\n {\n name: \"workflow_identifier\",\n payload: {\n \"comment_id\": \"string\",\n \"post\": {\n \"text\": \"string\",\n },\n },\n bridgeUrl: \"https://example.com/bridge\",\n overrides: {\n \"fcm\": {\n \"data\": {\n \"key\": \"value\",\n },\n },\n },\n to: {\n topicKey: \"\u003cvalue\u003e\",\n type: \"Subscriber\",\n },\n },\n {\n name: \"workflow_identifier\",\n payload: {\n \"comment_id\": \"string\",\n \"post\": {\n \"text\": \"string\",\n },\n },\n bridgeUrl: \"https://example.com/bridge\",\n overrides: {\n \"fcm\": {\n \"data\": {\n \"key\": \"value\",\n },\n },\n },\n to: [\n \"SUBSCRIBER_ID\",\n \"SUBSCRIBER_ID\",\n ],\n },\n ],\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "summary": "Bulk trigger event", + "description": "\n Using this endpoint you can trigger multiple events at once, to avoid multiple calls to the API.\n The bulk API is limited to 100 events per request.\n ", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkTriggerEventDto" + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TriggerEventResponseDto" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Events" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/events/trigger/broadcast": { + "post": { + "operationId": "EventsController_broadcastEventToAll", + "x-speakeasy-group": "", + "x-speakeasy-usage-example": { + "title": "Broadcast Event to All" + }, + "x-speakeasy-name-override": "triggerBroadcast", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.triggerBroadcast({\n name: \"\u003cvalue\u003e\",\n payload: {\n \"comment_id\": \"string\",\n \"post\": {\n \"text\": \"string\",\n },\n },\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "summary": "Broadcast event to all", + "description": "Trigger a broadcast event to all existing subscribers, could be used to send announcements, etc.\n\n In the future could be used to trigger events to a subset of subscribers based on defined filters.", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TriggerEventToAllRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TriggerEventResponseDto" + } + } + } + }, + "201": { + "description": "Broadcast request has been registered successfully ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TriggerEventResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Events" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/events/trigger/{transactionId}": { + "delete": { + "operationId": "EventsController_cancel", + "x-speakeasy-group": "", + "x-speakeasy-usage-example": { + "title": "Cancel Triggered Event" + }, + "x-speakeasy-name-override": "cancel", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.cancel(\"\u003cid\u003e\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "summary": "Cancel triggered event", + "description": "\n Using a previously generated transactionId during the event trigger,\n will cancel any active or pending workflows. This is useful to cancel active digests, delays etc...\n ", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "transactionId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DataBooleanDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Events" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/notifications": { + "get": { + "operationId": "NotificationsController_listNotifications", + "summary": "Get notifications", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "channels", + "required": false, + "in": "query", + "description": "Array of channel types", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelTypeEnum" + } + } + }, + { + "name": "templates", + "required": false, + "in": "query", + "description": "Array of template IDs or a single template ID", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "emails", + "required": false, + "in": "query", + "description": "Array of email addresses or a single email address", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "search", + "required": false, + "in": "query", + "deprecated": true, + "description": "Search term (deprecated)", + "schema": { + "type": "string" + } + }, + { + "name": "subscriberIds", + "required": false, + "in": "query", + "description": "Array of subscriber IDs or a single subscriber ID", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "page", + "required": false, + "in": "query", + "description": "Page number for pagination", + "schema": { + "default": 0, + "type": "number" + } + }, + { + "name": "transactionId", + "required": false, + "in": "query", + "description": "Transaction ID for filtering", + "schema": { + "type": "string" + } + }, + { + "name": "after", + "required": false, + "in": "query", + "description": "Date filter for records after this timestamp", + "schema": { + "type": "string" + } + }, + { + "name": "before", + "required": false, + "in": "query", + "description": "Date filter for records before this timestamp", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivitiesResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Notifications" + ], + "security": [ + { + "api-key": [] + } + ], + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.notifications.list({});\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ] + } + }, + "/v1/notifications/stats": { + "get": { + "operationId": "NotificationsController_getActivityStats", + "x-speakeasy-group": "Notifications.Stats", + "summary": "Get notification statistics", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.notifications.stats.retrieve();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivityStatsResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Notifications" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/notifications/graph/stats": { + "get": { + "operationId": "NotificationsController_getActivityGraphStats", + "x-speakeasy-name-override": "graph", + "x-speakeasy-group": "Notifications.Stats", + "summary": "Get notification graph statistics", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.notifications.stats.graph();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "days", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "OK", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ActivityGraphStatesResponse" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Notifications" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/notifications/{notificationId}": { + "get": { + "operationId": "NotificationsController_getNotification", + "summary": "Get notification", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "notificationId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivityNotificationResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Notifications" + ], + "security": [ + { + "api-key": [] + } + ], + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.notifications.retrieve(\"\u003cid\u003e\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ] + } + }, + "/v1/integrations": { + "get": { + "operationId": "IntegrationsController_listIntegrations", + "summary": "Get integrations", + "description": "Return all the integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The list of integrations belonging to the organization that are successfully returned.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IntegrationResponseDto" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Integrations" + ], + "security": [ + { + "api-key": [] + } + ], + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.integrations.list();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ] + }, + "post": { + "operationId": "IntegrationsController_createIntegration", + "summary": "Create integration", + "description": "Create an integration for the current environment the user is based on the API key provided", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateIntegrationRequestDto" + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Integrations" + ], + "security": [ + { + "api-key": [] + } + ], + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.integrations.create({\n providerId: \"\u003cid\u003e\",\n channel: \"sms\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ] + } + }, + "/v1/integrations/active": { + "get": { + "operationId": "IntegrationsController_getActiveIntegrations", + "x-speakeasy-name-override": "listActive", + "summary": "Get active integrations", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.integrations.listActive();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "description": "Return all the active integrations the user has created for that organization. Review v.0.17.0 changelog for a breaking change", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The list of active integrations belonging to the organization that are successfully returned.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IntegrationResponseDto" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Integrations" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/integrations/webhook/provider/{providerOrIntegrationId}/status": { + "get": { + "operationId": "IntegrationsController_getWebhookSupportStatus", + "x-speakeasy-group": "Integrations.Webhooks", + "summary": "Get webhook support status for provider", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.integrations.webhooks.retrieve(\"\u003cid\u003e\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "description": "Return the status of the webhook for this provider, if it is supported or if it is not based on a boolean value", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "providerOrIntegrationId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "The status of the webhook for the provider requested", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Integrations" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/integrations/{integrationId}": { + "put": { + "operationId": "IntegrationsController_updateIntegrationById", + "summary": "Update integration", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "integrationId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateIntegrationRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "The integration with the integrationId provided does not exist in the database.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Integrations" + ], + "security": [ + { + "api-key": [] + } + ], + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.integrations.update({}, \"\u003cid\u003e\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ] + }, + "delete": { + "operationId": "IntegrationsController_removeIntegration", + "summary": "Delete integration", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "integrationId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/IntegrationResponseDto" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Integrations" + ], + "security": [ + { + "api-key": [] + } + ], + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.integrations.delete(\"\u003cid\u003e\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ] + } + }, + "/v1/integrations/{integrationId}/set-primary": { + "post": { + "operationId": "IntegrationsController_setIntegrationAsPrimary", + "x-speakeasy-name-override": "setAsPrimary", + "summary": "Set integration as primary", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.integrations.setAsPrimary(\"\u003cid\u003e\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "integrationId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IntegrationResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "The integration with the integrationId provided does not exist in the database.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Integrations" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/subscribers": { + "get": { + "operationId": "SubscribersController_listSubscribers", + "x-speakeasy-pagination": { + "type": "offsetLimit", + "inputs": [ + { + "name": "page", + "in": "parameters", + "type": "page" + }, + { + "name": "limit", + "in": "parameters", + "type": "limit" + } + ], + "outputs": { + "results": "$.data.resultArray" + } + }, + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.subscribers.list();\n\n for await (const page of result) {\n // Handle the page\n console.log(page);\n }\n}\n\nrun();" + } + ], + "summary": "Get subscribers", + "description": "Returns a list of subscribers, could paginated using the `page` and `limit` query parameter", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "schema": { + "maximum": 100, + "default": 10, + "type": "number" + } + } + ], + "responses": { + "200": { + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "allOf": [ + { + "$ref": "#/components/schemas/PaginatedResponseDto" + }, + { + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SubscriberResponseDto" + } + } + } + } + ] + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Subscribers" + ], + "security": [ + { + "api-key": [] + } + ] + }, + "post": { + "operationId": "SubscribersController_createSubscriber", + "summary": "Create subscriber", + "description": "Creates a subscriber entity, in the Novu platform. The subscriber will be later used to receive notifications, and access notification feeds. Communication credentials such as email, phone number, and 3 rd party credentials i.e slack tokens could be later associated to this entity.", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateSubscriberRequestDto" + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriberResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Subscribers" + ], + "security": [ + { + "api-key": [] + } + ], + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.subscribers.create({\n subscriberId: \"\u003cid\u003e\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ] + } + }, + "/v1/subscribers/{subscriberId}": { + "get": { + "operationId": "SubscribersController_getSubscriber", + "summary": "Get subscriber", + "description": "Get subscriber by your internal id used to identify the subscriber", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "includeTopics", + "required": false, + "in": "query", + "description": "Includes the topics associated with the subscriber", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "OK", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriberResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Subscribers" + ], + "security": [ + { + "api-key": [] + } + ], + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.subscribers.retrieve(\"\u003cid\u003e\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ] + }, + "put": { + "operationId": "SubscribersController_updateSubscriber", + "summary": "Update subscriber", + "description": "Used to update the subscriber entity with new information", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriberRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriberResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Subscribers" + ], + "security": [ + { + "api-key": [] + } + ], + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.subscribers.update({\n email: \"john.doe@example.com\",\n firstName: \"John\",\n lastName: \"Doe\",\n phone: \"+1234567890\",\n avatar: \"https://example.com/avatar.jpg\",\n locale: \"en-US\",\n data: {\n \"preferences\": {\n \"notifications\": true,\n \"theme\": \"dark\",\n },\n \"tags\": [\n \"premium\",\n \"newsletter\",\n ],\n },\n }, \"\u003cid\u003e\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ] + }, + "delete": { + "operationId": "SubscribersController_removeSubscriber", + "summary": "Delete subscriber", + "description": "Deletes a subscriber entity from the Novu platform", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteSubscriberResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Subscribers" + ], + "security": [ + { + "api-key": [] + } + ], + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.subscribers.delete(\"\u003cid\u003e\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ] + } + }, + "/v1/subscribers/bulk": { + "post": { + "operationId": "SubscribersController_bulkCreateSubscribers", + "x-speakeasy-name-override": "createBulk", + "summary": "Bulk create subscribers", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.subscribers.createBulk({\n subscribers: [\n {\n subscriberId: \"\u003cid\u003e\",\n },\n ],\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "description": "\n Using this endpoint you can create multiple subscribers at once, to avoid multiple calls to the API.\n The bulk API is limited to 500 subscribers per request.\n ", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkSubscriberCreateDto" + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BulkCreateSubscriberResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Subscribers" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/subscribers/{subscriberId}/credentials": { + "put": { + "operationId": "SubscribersController_updateSubscriberChannel", + "x-speakeasy-group": "Subscribers.Credentials", + "summary": "Update subscriber credentials", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.subscribers.credentials.update({\n providerId: \"pushpad\",\n credentials: {\n webhookUrl: \"https://example.com/webhook\",\n channel: \"general\",\n deviceTokens: [\n \"token1\",\n \"token2\",\n \"token3\",\n ],\n alertUid: \"12345-abcde\",\n title: \"Critical Alert\",\n imageUrl: \"https://example.com/image.png\",\n state: \"resolved\",\n externalUrl: \"https://example.com/details\",\n },\n }, \"\u003cid\u003e\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "description": "Subscriber credentials associated to the delivery methods such as slack and push tokens.", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriberChannelRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriberResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Subscribers" + ], + "security": [ + { + "api-key": [] + } + ] + }, + "patch": { + "operationId": "SubscribersController_modifySubscriberChannel", + "x-speakeasy-name-override": "append", + "x-speakeasy-group": "Subscribers.Credentials", + "summary": "Modify subscriber credentials", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.subscribers.credentials.append({\n providerId: \"zulip\",\n credentials: {\n webhookUrl: \"https://example.com/webhook\",\n channel: \"general\",\n deviceTokens: [\n \"token1\",\n \"token2\",\n \"token3\",\n ],\n alertUid: \"12345-abcde\",\n title: \"Critical Alert\",\n imageUrl: \"https://example.com/image.png\",\n state: \"resolved\",\n externalUrl: \"https://example.com/details\",\n },\n }, \"\u003cid\u003e\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "description": "Subscriber credentials associated to the delivery methods such as slack and push tokens.\n\n This endpoint appends provided credentials and deviceTokens to the existing ones.", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriberChannelRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriberResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Subscribers" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/subscribers/{subscriberId}/credentials/{providerId}": { + "delete": { + "operationId": "SubscribersController_deleteSubscriberCredentials", + "x-speakeasy-group": "Subscribers.Credentials", + "summary": "Delete subscriber credentials by providerId", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.subscribers.credentials.delete(\"\u003cid\u003e\", \"\u003cid\u003e\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "description": "Delete subscriber credentials such as slack and expo tokens.", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "providerId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Subscribers" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/subscribers/{subscriberId}/online-status": { + "patch": { + "operationId": "SubscribersController_updateSubscriberOnlineFlag", + "x-speakeasy-name-override": "updateOnlineFlag", + "x-speakeasy-group": "Subscribers.properties", + "summary": "Update subscriber online status", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.subscribers.properties.updateOnlineFlag({\n isOnline: false,\n }, \"\u003cid\u003e\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "description": "Used to update the subscriber isOnline flag.", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriberOnlineFlagRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriberResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Subscribers" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/subscribers/{subscriberId}/preferences": { + "get": { + "operationId": "SubscribersController_listSubscriberPreferences", + "x-speakeasy-name-override": "list", + "x-speakeasy-group": "Subscribers.Preferences", + "summary": "Get subscriber preferences", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.subscribers.preferences.list(\"\u003cid\u003e\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "includeInactiveChannels", + "required": false, + "in": "query", + "description": "A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true", + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "OK", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdateSubscriberPreferenceResponseDto" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Subscribers" + ], + "security": [ + { + "api-key": [] + } + ] + }, + "patch": { + "operationId": "SubscribersController_updateSubscriberGlobalPreferences", + "x-speakeasy-name-override": "updateGlobal", + "x-speakeasy-group": "Subscribers.Preferences", + "summary": "Update subscriber global preferences", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.subscribers.preferences.updateGlobal({}, \"\u003cid\u003e\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriberGlobalPreferencesRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriberPreferenceGlobalResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Subscribers" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/subscribers/{subscriberId}/preferences/{parameter}": { + "get": { + "operationId": "SubscribersController_getSubscriberPreferenceByLevel", + "x-speakeasy-name-override": "retrieveByLevel", + "x-speakeasy-group": "Subscribers.Preferences", + "summary": "Get subscriber preferences by level", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.subscribers.preferences.retrieveByLevel({\n preferenceLevel: \"template\",\n subscriberId: \"\u003cid\u003e\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "includeInactiveChannels", + "required": false, + "in": "query", + "description": "A flag which specifies if the inactive workflow channels should be included in the retrieved preferences. Default is true", + "schema": { + "type": "boolean" + } + }, + { + "name": "parameter", + "required": true, + "in": "path", + "description": "the preferences level to be retrieved (template / global) ", + "x-speakeasy-name-override": "preferenceLevel", + "schema": { + "enum": [ + "global", + "template" + ], + "type": "string" + } + }, + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetSubscriberPreferencesResponseDto" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Subscribers" + ], + "security": [ + { + "api-key": [] + } + ] + }, + "patch": { + "operationId": "SubscribersController_updateSubscriberPreference", + "x-speakeasy-group": "Subscribers.Preferences", + "summary": "Update subscriber preference", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.subscribers.preferences.update({\n subscriberId: \"\u003cid\u003e\",\n workflowId: \"\u003cid\u003e\",\n updateSubscriberPreferenceRequestDto: {},\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "parameter", + "required": true, + "in": "path", + "x-speakeasy-name-override": "workflowId", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriberPreferenceRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriberPreferenceResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Subscribers" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/subscribers/{subscriberId}/notifications/feed": { + "get": { + "operationId": "SubscribersController_getNotificationsFeed", + "x-speakeasy-name-override": "feed", + "x-speakeasy-group": "Subscribers.Notifications", + "summary": "Get in-app notification feed for a particular subscriber", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.subscribers.notifications.feed({\n subscriberId: \"\u003cid\u003e\",\n payload: \"btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30=\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "page", + "required": false, + "in": "query", + "schema": { + "type": "number" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "schema": { + "maximum": 100, + "default": 10, + "type": "number" + } + }, + { + "name": "read", + "required": false, + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "seen", + "required": false, + "in": "query", + "schema": { + "type": "boolean" + } + }, + { + "name": "payload", + "required": false, + "in": "query", + "description": "Base64 encoded string of the partial payload JSON object", + "example": "btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30=", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Subscribers" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/subscribers/{subscriberId}/notifications/unseen": { + "get": { + "operationId": "SubscribersController_getUnseenCount", + "x-speakeasy-name-override": "unseenCount", + "x-speakeasy-group": "Subscribers.Notifications", + "summary": "Get the unseen in-app notifications count for subscribers feed", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.subscribers.notifications.unseenCount({\n subscriberId: \"\u003cid\u003e\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "seen", + "required": false, + "in": "query", + "description": "Indicates whether to count seen notifications.", + "schema": { + "default": false, + "type": "boolean" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "description": "The maximum number of notifications to return.", + "schema": { + "default": 100, + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "OK", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnseenCountResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Subscribers" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/subscribers/{subscriberId}/messages/mark-as": { + "post": { + "operationId": "SubscribersController_markMessagesAs", + "x-speakeasy-name-override": "markAllAs", + "x-speakeasy-group": "Subscribers.Messages", + "summary": "Mark a subscriber messages as seen, read, unseen or unread", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.subscribers.messages.markAllAs({\n messageId: \"\u003cvalue\u003e\",\n markAs: \"unread\",\n }, \"\u003cid\u003e\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageMarkAsRequestDto" + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/MessageResponseDto" + } + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Subscribers" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/subscribers/{subscriberId}/messages/mark-all": { + "post": { + "operationId": "SubscribersController_markAllUnreadAsRead", + "x-speakeasy-name-override": "markAll", + "x-speakeasy-group": "Subscribers.Messages", + "summary": "Marks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed.", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.subscribers.messages.markAll({\n markAs: \"seen\",\n }, \"\u003cid\u003e\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MarkAllMessageAsRequestDto" + } + } + } + }, + "responses": { + "201": { + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "type": "number" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Subscribers" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/subscribers/{subscriberId}/messages/{messageId}/actions/{type}": { + "post": { + "operationId": "SubscribersController_markActionAsSeen", + "x-speakeasy-name-override": "updateAsSeen", + "x-speakeasy-group": "Subscribers.Messages", + "summary": "Mark message action as seen", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.subscribers.messages.updateAsSeen({\n messageId: \"\u003cid\u003e\",\n type: \"\u003cvalue\u003e\",\n subscriberId: \"\u003cid\u003e\",\n markMessageActionAsSeenDto: {\n status: \"done\",\n },\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "messageId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "type", + "required": true, + "in": "path", + "schema": {} + }, + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MarkMessageActionAsSeenDto" + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Subscribers" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth/callback": { + "get": { + "operationId": "SubscribersController_chatOauthCallback", + "x-speakeasy-name-override": "chatAccessOauthCallBack", + "x-speakeasy-group": "Subscribers.Authentication", + "summary": "Handle providers oauth redirect", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.subscribers.authentication.chatAccessOauthCallBack({\n subscriberId: \"\u003cid\u003e\",\n providerId: \"\u003cid\u003e\",\n hmacHash: \"\u003cvalue\u003e\",\n environmentId: \"\u003cid\u003e\",\n code: \"\u003cvalue\u003e\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "providerId", + "required": true, + "in": "path", + "schema": {} + }, + { + "name": "hmacHash", + "required": true, + "in": "query", + "description": "HMAC hash for the request", + "schema": { + "type": "string" + } + }, + { + "name": "environmentId", + "required": true, + "in": "query", + "description": "The ID of the environment, must be a valid MongoDB ID", + "schema": { + "type": "string" + } + }, + { + "name": "integrationIdentifier", + "required": false, + "in": "query", + "description": "Optional integration identifier", + "schema": { + "type": "string" + } + }, + { + "name": "code", + "required": true, + "in": "query", + "description": "Optional authorization code returned from the OAuth provider", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns plain text response.", + "content": { + "text/html": { + "schema": { + "type": "string" + } + } + }, + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + } + }, + "302": { + "description": "Redirects to the specified URL.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Location": { + "description": "The URL to redirect to.", + "schema": { + "type": "string", + "example": "https://www.novu.co" + }, + "example": "https://www.novu.co" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Subscribers" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/subscribers/{subscriberId}/credentials/{providerId}/oauth": { + "get": { + "operationId": "SubscribersController_chatAccessOauth", + "x-speakeasy-name-override": "chatAccessOauth", + "x-speakeasy-group": "Subscribers.Authentication", + "summary": "Handle chat oauth", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.subscribers.authentication.chatAccessOauth({\n subscriberId: \"\u003cid\u003e\",\n providerId: \"\u003cid\u003e\",\n hmacHash: \"\u003cvalue\u003e\",\n environmentId: \"\u003cid\u003e\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "subscriberId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "providerId", + "required": true, + "in": "path", + "schema": {} + }, + { + "name": "hmacHash", + "required": true, + "in": "query", + "description": "HMAC hash for the request", + "schema": { + "type": "string" + } + }, + { + "name": "environmentId", + "required": true, + "in": "query", + "description": "The ID of the environment, must be a valid MongoDB ID", + "schema": { + "type": "string" + } + }, + { + "name": "integrationIdentifier", + "required": false, + "in": "query", + "description": "Optional integration identifier", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": {}, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Subscribers" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/messages": { + "get": { + "operationId": "MessagesController_getMessages", + "summary": "Get messages", + "description": "Returns a list of messages, could paginate using the `page` query parameter", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "channel", + "required": false, + "in": "query", + "schema": { + "$ref": "#/components/schemas/ChannelTypeEnum" + } + }, + { + "name": "subscriberId", + "required": false, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "transactionId", + "required": false, + "in": "query", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "page", + "required": false, + "in": "query", + "schema": { + "default": 0, + "type": "number" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "schema": { + "default": 10, + "type": "number" + } + } + ], + "responses": { + "200": { + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ActivitiesResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Messages" + ], + "security": [ + { + "api-key": [] + } + ], + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.messages.retrieve({});\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ] + } + }, + "/v1/messages/{messageId}": { + "delete": { + "operationId": "MessagesController_deleteMessage", + "summary": "Delete message", + "description": "Deletes a message entity from the Novu platform", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "messageId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteMessageResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Messages" + ], + "security": [ + { + "api-key": [] + } + ], + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.messages.delete(\"\u003cid\u003e\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ] + } + }, + "/v1/messages/transaction/{transactionId}": { + "delete": { + "operationId": "MessagesController_deleteMessagesByTransactionId", + "x-speakeasy-name-override": "deleteByTransactionId", + "summary": "Delete messages by transactionId", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.messages.deleteByTransactionId(\"\u003cid\u003e\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "description": "Deletes messages entity from the Novu platform using TransactionId of message", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "channel", + "required": false, + "in": "query", + "description": "The channel of the message to be deleted", + "schema": { + "enum": [ + "in_app", + "email", + "sms", + "chat", + "push" + ], + "type": "string" + } + }, + { + "name": "transactionId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Messages" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/topics": { + "post": { + "operationId": "TopicsController_createTopic", + "summary": "Topic creation", + "description": "Create a topic", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTopicRequestDto" + } + } + } + }, + "responses": { + "201": { + "description": "Created", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTopicResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Topics" + ], + "security": [ + { + "api-key": [] + } + ], + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.topics.create({\n key: \"\u003ckey\u003e\",\n name: \"\u003cvalue\u003e\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ] + }, + "get": { + "operationId": "TopicsController_listTopics", + "summary": "Get topic list filtered ", + "description": "Returns a list of topics that can be paginated using the `page` query parameter and filtered by the topic key with the `key` query parameter", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "page", + "required": false, + "in": "query", + "example": 0, + "description": "The page number to retrieve (starts from 0)", + "schema": { + "format": "int64", + "default": 0, + "type": "integer" + } + }, + { + "name": "pageSize", + "required": false, + "in": "query", + "example": 10, + "description": "The number of items to return per page (default: 10)", + "schema": { + "format": "int64", + "default": 10, + "type": "integer" + } + }, + { + "name": "key", + "required": false, + "in": "query", + "example": "exampleKey", + "description": "A filter key to apply to the results", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FilterTopicsResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Topics" + ], + "security": [ + { + "api-key": [] + } + ], + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.topics.list({\n page: 0,\n pageSize: 10,\n key: \"exampleKey\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ] + } + }, + "/v1/topics/{topicKey}/subscribers": { + "post": { + "operationId": "TopicsController_assign", + "x-speakeasy-name-override": "assign", + "x-speakeasy-group": "Topics.Subscribers", + "summary": "Subscribers addition", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.topics.subscribers.assign({\n subscribers: [\n \"\u003cvalue\u003e\",\n \"\u003cvalue\u003e\",\n \"\u003cvalue\u003e\",\n ],\n }, \"\u003cvalue\u003e\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "description": "Add subscribers to a topic by key", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "topicKey", + "required": true, + "in": "path", + "description": "The topic key", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddSubscribersRequestDto" + } + } + } + }, + "responses": { + "200": { + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AssignSubscriberToTopicDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Topics" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/topics/{topicKey}/subscribers/{externalSubscriberId}": { + "get": { + "operationId": "TopicsController_getTopicSubscriber", + "x-speakeasy-group": "Topics.Subscribers", + "summary": "Check topic subscriber", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.topics.subscribers.retrieve(\"\u003cid\u003e\", \"\u003cvalue\u003e\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "description": "Check if a subscriber belongs to a certain topic", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "externalSubscriberId", + "required": true, + "in": "path", + "description": "The external subscriber id", + "schema": { + "type": "string" + } + }, + { + "name": "topicKey", + "required": true, + "in": "path", + "description": "The topic key", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TopicSubscriberDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Topics" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/topics/{topicKey}/subscribers/removal": { + "post": { + "operationId": "TopicsController_removeSubscribers", + "x-speakeasy-name-override": "remove", + "x-speakeasy-group": "Topics.Subscribers", + "summary": "Subscribers removal", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.topics.subscribers.remove({\n subscribers: [\n \"\u003cvalue\u003e\",\n \"\u003cvalue\u003e\",\n ],\n }, \"\u003cvalue\u003e\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "description": "Remove subscribers from a topic", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "topicKey", + "required": true, + "in": "path", + "description": "The topic key", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RemoveSubscribersRequestDto" + } + } + } + }, + "responses": { + "204": { + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Topics" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/topics/{topicKey}": { + "delete": { + "operationId": "TopicsController_deleteTopic", + "summary": "Delete topic", + "description": "Delete a topic by its topic key if it has no subscribers", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "topicKey", + "required": true, + "in": "path", + "description": "The topic key", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "The topic has been deleted correctly", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Topics" + ], + "security": [ + { + "api-key": [] + } + ], + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.topics.delete(\"\u003cvalue\u003e\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ] + }, + "get": { + "operationId": "TopicsController_getTopic", + "summary": "Get topic", + "description": "Get a topic by its topic key", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "topicKey", + "required": true, + "in": "path", + "description": "The topic key", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "OK", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTopicResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Topics" + ], + "security": [ + { + "api-key": [] + } + ], + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.topics.retrieve(\"\u003cvalue\u003e\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ] + }, + "patch": { + "operationId": "TopicsController_renameTopic", + "x-speakeasy-name-override": "rename", + "summary": "Rename a topic", + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.topics.rename({\n name: \"\u003cvalue\u003e\",\n }, \"\u003cvalue\u003e\");\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ], + "description": "Rename a topic by providing a new name", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "topicKey", + "required": true, + "in": "path", + "description": "The topic key", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RenameTopicRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RenameTopicResponseDto" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Topics" + ], + "security": [ + { + "api-key": [] + } + ] + } + }, + "/v1/testing/idempotency": { + "post": { + "operationId": "TestingController_idempotency", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IdempotencyBodyDto" + } + } + } + }, + "responses": { + "200": { + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IdempotencyResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Admin" + ], + "security": [ + { + "api-key": [] + } + ], + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.admin.testingControllerIdempotency({\n data: 6704.42,\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ] + }, + "get": { + "operationId": "TestingController_idempotencyGet", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "description": "A header for idempotency purposes ", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IdempotencyResponse" + } + } + } + }, + "400": { + "description": "Bad Request", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "404": { + "description": "Not Found", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "409": { + "description": "Conflict", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDto" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorDto" + } + } + } + }, + "429": { + "description": "The client has sent too many requests in a given amount of time. ", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "API rate limit exceeded" + } + } + } + }, + "503": { + "description": "The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.", + "headers": { + "Content-Type": { + "$ref": "#/components/headers/Content-Type" + }, + "RateLimit-Limit": { + "$ref": "#/components/headers/RateLimit-Limit" + }, + "RateLimit-Remaining": { + "$ref": "#/components/headers/RateLimit-Remaining" + }, + "RateLimit-Reset": { + "$ref": "#/components/headers/RateLimit-Reset" + }, + "RateLimit-Policy": { + "$ref": "#/components/headers/RateLimit-Policy" + }, + "Idempotency-Key": { + "$ref": "#/components/headers/Idempotency-Key" + }, + "Idempotency-Replay": { + "$ref": "#/components/headers/Idempotency-Replay" + }, + "Retry-After": { + "$ref": "#/components/headers/Retry-After" + } + }, + "content": { + "application/json": { + "schema": { + "type": "string", + "example": "Please wait some time, then try again." + } + } + } + } + }, + "tags": [ + "Admin" + ], + "security": [ + { + "api-key": [] + } + ], + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.admin.testingControllerIdempotencyGet();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ] + } + }, + "/v1/rate-limiting-trigger-bulk/no-category-no-cost-override": { + "get": { + "operationId": "TestApiRateLimitBulkController_noCategoryNoCostOverride", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + } + } + } + }, + "security": [ + { + "api-key": [] + } + ], + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.testApiRateLimitBulkControllerNoCategoryNoCostOverride();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ] + } + }, + "/v1/rate-limiting-trigger-bulk/no-category-single-cost-override": { + "get": { + "operationId": "TestApiRateLimitBulkController_noCategorySingleCostOverride", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + } + } + } + }, + "security": [ + { + "api-key": [] + } + ], + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.testApiRateLimitBulkControllerNoCategorySingleCostOverride();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ] + } + }, + "/v1/rate-limiting-trigger-bulk/global-category-no-cost-override": { + "get": { + "operationId": "TestApiRateLimitBulkController_globalCategoryNoCostOverride", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "boolean" + } + } + } + } + }, + "security": [ + { + "api-key": [] + } + ], + "x-codeSamples": [ + { + "lang": "typescript", + "label": "TypeScript", + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\u003cYOUR_API_KEY_HERE\u003e\",\n});\n\nasync function run() {\n const result = await novu.testApiRateLimitBulkControllerGlobalCategoryNoCostOverride();\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + } + ] + } + } + }, + "info": { + "title": "Novu API", + "description": "Novu REST API. Please see https://docs.novu.co/api-reference for more details.", + "version": "1.0", + "contact": { + "name": "Novu Support", + "url": "https://discord.gg/novu", + "email": "support@novu.co" + }, + "termsOfService": "https://novu.co/terms", + "license": { + "name": "MIT", + "url": "https://opensource.org/license/mit" + } + }, + "tags": [ + { + "name": "Events", + "description": "Events represent a change in state of a subscriber. They are used to trigger workflows, and enable you to send notifications to subscribers based on their actions.", + "externalDocs": { + "url": "https://docs.novu.co/workflows" + } + }, + { + "name": "Subscribers", + "description": "A subscriber in Novu represents someone who should receive a message. A subscriber’s profile information contains important attributes about the subscriber that will be used in messages (name, email). The subscriber object can contain other key-value pairs that can be used to further personalize your messages.", + "externalDocs": { + "url": "https://docs.novu.co/subscribers/subscribers" + } + }, + { + "name": "Topics", + "description": "Topics are a way to group subscribers together so that they can be notified of events at once. A topic is identified by a custom key. This can be helpful for things like sending out marketing emails or notifying users of new features. Topics can also be used to send notifications to the subscribers who have been grouped together based on their interests, location, activities and much more.", + "externalDocs": { + "url": "https://docs.novu.co/subscribers/topics" + } + }, + { + "name": "Notification", + "description": "A notification conveys information from source to recipient, triggered by a workflow acting as a message blueprint. Notifications can be individual or bundled as digest for user-friendliness.", + "externalDocs": { + "url": "https://docs.novu.co/getting-started/introduction" + } + }, + { + "name": "Integrations", + "description": "With the help of the Integration Store, you can easily integrate your favorite delivery provider. During the runtime of the API, the Integrations Store is responsible for storing the configurations of all the providers.", + "externalDocs": { + "url": "https://docs.novu.co/channels-and-providers/integration-store" + } + }, + { + "name": "Layouts", + "description": "Novu allows the creation of layouts - a specific HTML design or structure to wrap content of email notifications. Layouts can be manipulated and assigned to new or existing workflows within the Novu platform, allowing users to create, manage, and assign these layouts to workflows, so they can be reused to structure the appearance of notifications sent through the platform.", + "externalDocs": { + "url": "https://docs.novu.co/content-creation-design/layouts" + } + }, + { + "name": "Workflows", + "description": "All notifications are sent via a workflow. Each workflow acts as a container for the logic and blueprint that are associated with a type of notification in your system.", + "externalDocs": { + "url": "https://docs.novu.co/workflows" + } + }, + { + "name": "Notification Templates", + "description": "Deprecated. Use Workflows (/workflows) instead, which provide the same functionality under a new name." + }, + { + "name": "Workflow groups", + "description": "Workflow groups are used to organize workflows into logical groups." + }, + { + "name": "Changes", + "description": "Changes represent a change in state of an environment. They are analagous to a pending pull request in git, enabling you to test changes before they are applied to your environment and atomically apply them when you are ready.", + "externalDocs": { + "url": "https://docs.novu.co/platform/environments#promoting-pending-changes-to-production" + } + }, + { + "name": "Environments", + "description": "Novu uses the concept of environments to ensure logical separation of your data and configuration. This means that subscribers, and preferences created in one environment are never accessible to another.", + "externalDocs": { + "url": "https://docs.novu.co/platform/environments" + } + }, + { + "name": "Inbound Parse", + "description": "Inbound Webhook is a feature that allows processing of incoming emails for a domain or subdomain. The feature parses the contents of the email and POSTs the information to a specified URL in a multipart/form-data format.", + "externalDocs": { + "url": "https://docs.novu.co/platform/inbound-parse-webhook" + } + }, + { + "name": "Feeds", + "description": "Novu provides a notification activity feed that monitors every outgoing message associated with its relevant metadata. This can be used to monitor activity and discover potential issues with a specific provider or a channel type.", + "externalDocs": { + "url": "https://docs.novu.co/activity-feed" + } + }, + { + "name": "Tenants", + "description": "A tenant represents a group of users. As a developer, when your apps have organizations, they are referred to as tenants. Tenants in Novu provides the ability to tailor specific notification experiences to users of different groups or organizations.", + "externalDocs": { + "url": "https://docs.novu.co/tenants" + } + }, + { + "name": "Messages", + "description": "A message in Novu represents a notification delivered to a recipient on a particular channel. Messages contain information about the request that triggered its delivery, a view of the data sent to the recipient, and a timeline of its lifecycle events. Learn more about messages.", + "externalDocs": { + "url": "https://docs.novu.co/workflows/messages" + } + }, + { + "name": "Organizations", + "description": "An organization serves as a separate entity within your Novu account. Each organization you create has its own separate integration store, workflows, subscribers, and API keys. This separation of resources allows you to manage multi-tenant environments and separate domains within a single account.", + "externalDocs": { + "url": "https://docs.novu.co/platform/organizations" + } + }, + { + "name": "Admin", + "description": "testing", + "externalDocs": { + "url": "https://docs.novu.co/platform/organizations" + } + }, + { + "name": "Execution Details", + "description": "Execution details are used to track the execution of a workflow. They provided detailed information on the execution of a workflow, including the status of each step, the input and output of each step, and the overall status of the execution.", + "externalDocs": { + "url": "https://docs.novu.co/activity-feed" + } + } + ], + "servers": [ + { + "url": "https://api.novu.co" + }, + { + "url": "https://eu.api.novu.co" + } + ], + "components": { + "securitySchemes": { + "api-key": { + "type": "apiKey", + "in": "header", + "name": "Authorization", + "description": "API key authentication. Allowed headers-- \"Authorization: ApiKey \u003capi_key\u003e\"." + } + }, + "schemas": { + "DataWrapperDto": { + "type": "object", + "properties": { + "data": { + "type": "object" + } + }, + "required": [ + "data" + ] + }, + "ErrorDto": { + "type": "object", + "properties": { + "statusCode": { + "type": "number", + "description": "HTTP status code of the error response.", + "example": 404 + }, + "timestamp": { + "type": "string", + "description": "Timestamp of when the error occurred.", + "example": "2024-12-12T13:00:00Z" + }, + "path": { + "type": "string", + "description": "The path where the error occurred.", + "example": "/api/v1/resource" + }, + "message": { + "type": "string", + "description": "A detailed error message.", + "example": "Resource not found." + }, + "ctx": { + "type": "object", + "description": "Optional context object for additional error details.", + "additionalProperties": true, + "example": { + "workflowId": "some_wf_id", + "stepId": "some_wf_id" + } + }, + "errorId": { + "type": "string", + "description": "Optional unique identifier for the error, useful for tracking using Sentry and \n New Relic, only available for 500.", + "example": "abc123" + } + }, + "required": [ + "statusCode", + "timestamp", + "path", + "message" + ] + }, + "ValidationErrorDto": { + "type": "object", + "properties": { + "statusCode": { + "type": "number", + "description": "HTTP status code of the error response.", + "example": 404 + }, + "timestamp": { + "type": "string", + "description": "Timestamp of when the error occurred.", + "example": "2024-12-12T13:00:00Z" + }, + "path": { + "type": "string", + "description": "The path where the error occurred.", + "example": "/api/v1/resource" + }, + "message": { + "type": "string", + "description": "A detailed error message.", + "example": "Resource not found." + }, + "ctx": { + "type": "object", + "description": "Optional context object for additional error details.", + "additionalProperties": true, + "example": { + "workflowId": "some_wf_id", + "stepId": "some_wf_id" + } + }, + "errorId": { + "type": "string", + "description": "Optional unique identifier for the error, useful for tracking using Sentry and \n New Relic, only available for 500.", + "example": "abc123" + }, + "errors": { + "type": "object", + "description": "A record of validation errors keyed by field name", + "additionalProperties": { + "type": "object", + "properties": { + "messages": { + "type": "array", + "items": { + "type": "string" + } + }, + "value": { + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "type": "object", + "additionalProperties": true + }, + { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + } + } + ] + } + }, + "required": [ + "messages", + "value" + ], + "example": { + "messages": [ + "Field is required", + "Invalid format" + ], + "value": "xx xx xx " + } + }, + "example": { + "fieldName1": { + "messages": [ + "Field is required", + "Must be a valid email address" + ], + "value": "invalidEmail" + }, + "fieldName2": { + "messages": [ + "Must be at least 18 years old" + ], + "value": 17 + }, + "fieldName3": { + "messages": [ + "Must be a boolean value" + ], + "value": true + }, + "fieldName4": { + "messages": [ + "Must be a valid object" + ], + "value": { + "key": "value" + } + } + } + } + }, + "required": [ + "statusCode", + "timestamp", + "path", + "message", + "errors" + ] + }, + "TriggerEventResponseDto": { + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean", + "description": "Indicates whether the trigger was acknowledged or not" + }, + "status": { + "enum": [ + "error", + "trigger_not_active", + "no_workflow_active_steps_defined", + "no_workflow_steps_defined", + "processed", + "subscriber_id_missing", + "no_tenant_found" + ], + "type": "string", + "description": "Status of the trigger" + }, + "error": { + "description": "In case of an error, this field will contain the error message(s)", + "type": "array", + "items": { + "type": "string" + } + }, + "transactionId": { + "type": "string", + "description": "The returned transaction ID of the trigger" + } + }, + "required": [ + "acknowledged", + "status" + ] + }, + "ChannelCredentialsDto": { + "type": "object", + "properties": { + "webhookUrl": { + "type": "string", + "description": "The URL for the webhook associated with the channel." + }, + "deviceTokens": { + "description": "An array of device tokens for push notifications.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "SubscriberChannelDto": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "description": "The ID of the chat or push provider.", + "enum": [ + "slack", + "discord", + "msteams", + "mattermost", + "ryver", + "zulip", + "grafana-on-call", + "getstream", + "rocket-chat", + "whatsapp-business", + "fcm", + "apns", + "expo", + "one-signal", + "pushpad", + "push-webhook", + "pusher-beams" + ] + }, + "integrationIdentifier": { + "type": "string", + "description": "An optional identifier for the integration." + }, + "credentials": { + "description": "Credentials for the channel.", + "allOf": [ + { + "$ref": "#/components/schemas/ChannelCredentialsDto" + } + ] + } + }, + "required": [ + "providerId", + "credentials" + ] + }, + "SubscriberPayloadDto": { + "type": "object", + "properties": { + "subscriberId": { + "type": "string", + "description": "The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems" + }, + "email": { + "type": "string", + "description": "The email address of the subscriber." + }, + "firstName": { + "type": "string", + "description": "The first name of the subscriber." + }, + "lastName": { + "type": "string", + "description": "The last name of the subscriber." + }, + "phone": { + "type": "string", + "description": "The phone number of the subscriber." + }, + "avatar": { + "type": "string", + "description": "An HTTP URL to the profile image of your subscriber." + }, + "locale": { + "type": "string", + "description": "The locale of the subscriber." + }, + "data": { + "type": "object", + "description": "An optional payload object that can contain any properties.", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + } + }, + "channels": { + "description": "An optional array of subscriber channels.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SubscriberChannelDto" + } + } + }, + "required": [ + "subscriberId" + ] + }, + "TenantPayloadDto": { + "type": "object", + "properties": { + "identifier": { + "type": "string" + }, + "name": { + "type": "string" + }, + "data": { + "type": "object" + } + } + }, + "TriggerRecipientsTypeEnum": { + "type": "string", + "enum": [ + "Subscriber", + "Topic" + ] + }, + "TopicPayloadDto": { + "type": "object", + "properties": { + "topicKey": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/TriggerRecipientsTypeEnum" + } + }, + "required": [ + "topicKey", + "type" + ] + }, + "WorkflowToStepControlValuesDto": { + "type": "object", + "properties": { + "steps": { + "type": "object", + "description": "A mapping of step IDs to their corresponding data.", + "additionalProperties": { + "type": "object", + "additionalProperties": true + } + } + } + }, + "TriggerEventRequestDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The trigger identifier of the workflow you wish to send. This identifier can be found on the workflow page.", + "example": "workflow_identifier" + }, + "payload": { + "type": "object", + "description": "The payload object is used to pass additional custom information that could be \n used to render the workflow, or perform routing rules based on it. \n This data will also be available when fetching the notifications feed from the API to display certain parts of the UI.", + "additionalProperties": true, + "example": { + "comment_id": "string", + "post": { + "text": "string" + } + } + }, + "bridgeUrl": { + "type": "string", + "description": "A URL to bridge for additional processing.", + "example": "https://example.com/bridge" + }, + "overrides": { + "type": "object", + "description": "This could be used to override provider specific configurations", + "example": { + "fcm": { + "data": { + "key": "value" + } + } + }, + "additionalProperties": { + "type": "object", + "additionalProperties": true + } + }, + "to": { + "description": "The recipients list of people who will receive the notification.", + "oneOf": [ + { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/SubscriberPayloadDto" + }, + { + "$ref": "#/components/schemas/TopicPayloadDto" + }, + { + "type": "string", + "description": "Unique identifier of a subscriber in your systems", + "example": "SUBSCRIBER_ID" + } + ] + } + }, + { + "type": "string", + "description": "Unique identifier of a subscriber in your systems", + "example": "SUBSCRIBER_ID" + }, + { + "$ref": "#/components/schemas/SubscriberPayloadDto" + }, + { + "$ref": "#/components/schemas/TopicPayloadDto" + } + ] + }, + "transactionId": { + "type": "string", + "description": "A unique identifier for this transaction, we will generate a UUID if not provided." + }, + "actor": { + "description": "It is used to display the Avatar of the provided actor's subscriber id or actor object.\n\n If a new actor object is provided, we will create a new subscriber in our system", + "oneOf": [ + { + "type": "string", + "description": "Unique identifier of a subscriber in your systems" + }, + { + "$ref": "#/components/schemas/SubscriberPayloadDto" + } + ] + }, + "tenant": { + "description": "It is used to specify a tenant context during trigger event.\n Existing tenants will be updated with the provided details.", + "oneOf": [ + { + "type": "string", + "description": "Unique identifier of a tenant in your system" + }, + { + "$ref": "#/components/schemas/TenantPayloadDto" + } + ] + }, + "controls": { + "description": "Additional control configurations.", + "allOf": [ + { + "$ref": "#/components/schemas/WorkflowToStepControlValuesDto" + } + ] + } + }, + "required": [ + "name", + "to" + ] + }, + "BulkTriggerEventDto": { + "type": "object", + "properties": { + "events": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TriggerEventRequestDto" + } + } + }, + "required": [ + "events" + ] + }, + "TriggerEventToAllRequestDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The trigger identifier associated for the template you wish to send. This identifier can be found on the template page." + }, + "payload": { + "type": "object", + "example": { + "comment_id": "string", + "post": { + "text": "string" + } + }, + "description": "The payload object is used to pass additional information that \n could be used to render the template, or perform routing rules based on it. \n For In-App channel, payload data are also available in \u003cInbox /\u003e", + "additionalProperties": true + }, + "overrides": { + "type": "object", + "description": "This could be used to override provider specific configurations", + "example": { + "fcm": { + "data": { + "key": "value" + } + } + } + }, + "transactionId": { + "type": "string", + "description": "A unique identifier for this transaction, we will generated a UUID if not provided." + }, + "actor": { + "description": "It is used to display the Avatar of the provided actor's subscriber id or actor object.\n If a new actor object is provided, we will create a new subscriber in our system\n ", + "oneOf": [ + { + "type": "string", + "description": "Unique identifier of a subscriber in your systems" + }, + { + "$ref": "#/components/schemas/SubscriberPayloadDto" + } + ] + }, + "tenant": { + "description": "It is used to specify a tenant context during trigger event.\n If a new tenant object is provided, we will create a new tenant.\n ", + "oneOf": [ + { + "type": "string", + "description": "Unique identifier of a tenant in your system" + }, + { + "$ref": "#/components/schemas/TenantPayloadDto" + } + ] + } + }, + "required": [ + "name", + "payload" + ] + }, + "DataBooleanDto": { + "type": "object", + "properties": { + "data": { + "type": "boolean" + } + }, + "required": [ + "data" + ] + }, + "ChannelTypeEnum": { + "type": "string", + "description": "Channel type through which the message is sent", + "enum": [ + "in_app", + "email", + "sms", + "chat", + "push" + ] + }, + "StepTypeEnum": { + "type": "string", + "description": "Channels of the notification", + "enum": [ + "in_app", + "email", + "sms", + "chat", + "push", + "digest", + "trigger", + "delay", + "custom" + ] + }, + "ActivityNotificationSubscriberResponseDto": { + "type": "object", + "properties": { + "firstName": { + "type": "string", + "description": "First name of the subscriber" + }, + "_id": { + "type": "string", + "description": "Unique identifier of the subscriber" + }, + "lastName": { + "type": "string", + "description": "Last name of the subscriber" + }, + "email": { + "type": "string", + "description": "Email of the subscriber" + }, + "phone": { + "type": "string", + "description": "Phone number of the subscriber" + } + }, + "required": [ + "_id" + ] + }, + "NotificationTriggerVariable": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the variable" + } + }, + "required": [ + "name" + ] + }, + "NotificationTrigger": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "event" + ], + "description": "Type of the trigger" + }, + "identifier": { + "type": "string", + "description": "Identifier of the trigger" + }, + "variables": { + "description": "Variables of the trigger", + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationTriggerVariable" + } + }, + "subscriberVariables": { + "description": "Subscriber variables of the trigger", + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationTriggerVariable" + } + } + }, + "required": [ + "type", + "identifier", + "variables" + ] + }, + "ActivityNotificationTemplateResponseDto": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "description": "Unique identifier of the template" + }, + "name": { + "type": "string", + "description": "Name of the template" + }, + "triggers": { + "description": "Triggers of the template", + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationTrigger" + } + } + }, + "required": [ + "name", + "triggers" + ] + }, + "DigestWithEventsDto": { + "type": "object", + "properties": { + "digestKey": { + "type": "string", + "description": "Optional key for the digest" + }, + "amount": { + "type": "number", + "description": "Amount for the digest" + }, + "unit": { + "enum": [ + "seconds", + "minutes", + "hours", + "days", + "weeks", + "months" + ], + "type": "string", + "description": "Unit of the digest" + }, + "events": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": true + }, + "description": "Optional array of events associated with the digest, represented as key-value pairs" + } + } + }, + "ProvidersIdEnum": { + "type": "string", + "description": "Provider ID of the job", + "enum": [ + "emailjs", + "mailgun", + "mailjet", + "mandrill", + "nodemailer", + "postmark", + "sendgrid", + "sendinblue", + "ses", + "netcore", + "infobip-email", + "resend", + "plunk", + "mailersend", + "mailtrap", + "clickatell", + "outlook365", + "novu-email", + "sparkpost", + "email-webhook", + "braze", + "nexmo", + "plivo", + "sms77", + "sms-central", + "sns", + "telnyx", + "twilio", + "gupshup", + "firetext", + "infobip-sms", + "burst-sms", + "bulk-sms", + "isend-sms", + "forty-six-elks", + "kannel", + "maqsam", + "termii", + "africas-talking", + "novu-sms", + "sendchamp", + "generic-sms", + "clicksend", + "bandwidth", + "messagebird", + "simpletexting", + "azure-sms", + "ring-central", + "brevo-sms", + "eazy-sms", + "mobishastra", + "fcm", + "apns", + "expo", + "one-signal", + "pushpad", + "push-webhook", + "pusher-beams", + "novu", + "slack", + "discord", + "msteams", + "mattermost", + "ryver", + "zulip", + "grafana-on-call", + "getstream", + "rocket-chat", + "whatsapp-business" + ] + }, + "ActivityNotificationExecutionDetailResponseDto": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "description": "Unique identifier of the execution detail" + }, + "status": { + "enum": [ + "Success", + "Warning", + "Failed", + "Pending", + "Queued", + "ReadConfirmation" + ], + "type": "string", + "description": "Status of the execution detail" + }, + "detail": { + "type": "string", + "description": "Detailed information about the execution" + }, + "isRetry": { + "type": "boolean", + "description": "Whether the execution is a retry or not" + }, + "isTest": { + "type": "boolean", + "description": "Whether the execution is a test or not" + }, + "providerId": { + "$ref": "#/components/schemas/ProvidersIdEnum" + }, + "raw": { + "type": "string", + "description": "Raw data of the execution" + }, + "source": { + "enum": [ + "Credentials", + "Internal", + "Payload", + "Webhook" + ], + "type": "string", + "description": "Source of the execution detail" + } + }, + "required": [ + "_id", + "status", + "detail", + "isRetry", + "isTest", + "providerId", + "source" + ] + }, + "StepFilter": { + "type": "object" + }, + "MessageTemplateDto": { + "type": "object" + }, + "ActivityNotificationStepResponseDto": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "description": "Unique identifier of the step" + }, + "active": { + "type": "boolean", + "description": "Whether the step is active or not" + }, + "filters": { + "description": "Filter criteria for the step", + "type": "array", + "items": { + "$ref": "#/components/schemas/StepFilter" + } + }, + "template": { + "description": "Optional template for the step", + "allOf": [ + { + "$ref": "#/components/schemas/MessageTemplateDto" + } + ] + } + }, + "required": [ + "_id", + "active", + "filters" + ] + }, + "ActivityNotificationJobResponseDto": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "description": "Unique identifier of the job" + }, + "type": { + "enum": [ + "in_app", + "email", + "sms", + "chat", + "push", + "digest", + "trigger", + "delay", + "custom" + ], + "type": "string", + "description": "Type of the job" + }, + "digest": { + "description": "Optional digest for the job, including metadata and events", + "allOf": [ + { + "$ref": "#/components/schemas/DigestWithEventsDto" + } + ] + }, + "executionDetails": { + "description": "Execution details of the job", + "type": "array", + "items": { + "$ref": "#/components/schemas/ActivityNotificationExecutionDetailResponseDto" + } + }, + "step": { + "description": "Step details of the job", + "allOf": [ + { + "$ref": "#/components/schemas/ActivityNotificationStepResponseDto" + } + ] + }, + "payload": { + "type": "object", + "description": "Optional payload for the job" + }, + "providerId": { + "$ref": "#/components/schemas/ProvidersIdEnum" + }, + "status": { + "type": "string", + "description": "Status of the job" + } + }, + "required": [ + "_id", + "type", + "executionDetails", + "step", + "providerId", + "status" + ] + }, + "ActivityNotificationResponseDto": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "description": "Unique identifier of the notification" + }, + "_environmentId": { + "type": "string", + "description": "Environment ID of the notification" + }, + "_organizationId": { + "type": "string", + "description": "Organization ID of the notification" + }, + "transactionId": { + "type": "string", + "description": "Transaction ID of the notification" + }, + "createdAt": { + "type": "string", + "description": "Creation time of the notification" + }, + "channels": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StepTypeEnum" + } + }, + "subscriber": { + "description": "Subscriber of the notification", + "allOf": [ + { + "$ref": "#/components/schemas/ActivityNotificationSubscriberResponseDto" + } + ] + }, + "template": { + "description": "Template of the notification", + "allOf": [ + { + "$ref": "#/components/schemas/ActivityNotificationTemplateResponseDto" + } + ] + }, + "jobs": { + "description": "Jobs of the notification", + "type": "array", + "items": { + "$ref": "#/components/schemas/ActivityNotificationJobResponseDto" + } + } + }, + "required": [ + "_environmentId", + "_organizationId", + "transactionId" + ] + }, + "ActivitiesResponseDto": { + "type": "object", + "properties": { + "hasMore": { + "type": "boolean", + "description": "Whether there are more activities" + }, + "data": { + "description": "Array of activity notifications", + "type": "array", + "items": { + "$ref": "#/components/schemas/ActivityNotificationResponseDto" + } + }, + "pageSize": { + "type": "number", + "description": "Page size of the activities" + }, + "page": { + "type": "number", + "description": "Current page of the activities" + } + }, + "required": [ + "hasMore", + "data", + "pageSize", + "page" + ] + }, + "ActivityStatsResponseDto": { + "type": "object", + "properties": { + "weeklySent": { + "type": "number" + }, + "monthlySent": { + "type": "number" + } + }, + "required": [ + "weeklySent", + "monthlySent" + ] + }, + "ActivityGraphStatesResponse": { + "type": "object", + "properties": { + "_id": { + "type": "string" + }, + "count": { + "type": "number" + }, + "templates": { + "type": "array", + "items": { + "type": "string" + } + }, + "channels": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "in_app", + "email", + "sms", + "chat", + "push" + ] + } + } + }, + "required": [ + "_id", + "count", + "templates", + "channels" + ] + }, + "CredentialsDto": { + "type": "object", + "properties": { + "apiKey": { + "type": "string" + }, + "user": { + "type": "string" + }, + "secretKey": { + "type": "string" + }, + "domain": { + "type": "string" + }, + "password": { + "type": "string" + }, + "host": { + "type": "string" + }, + "port": { + "type": "string" + }, + "secure": { + "type": "boolean" + }, + "region": { + "type": "string" + }, + "accountSid": { + "type": "string" + }, + "messageProfileId": { + "type": "string" + }, + "token": { + "type": "string" + }, + "from": { + "type": "string" + }, + "senderName": { + "type": "string" + }, + "projectName": { + "type": "string" + }, + "applicationId": { + "type": "string" + }, + "clientId": { + "type": "string" + }, + "requireTls": { + "type": "boolean" + }, + "ignoreTls": { + "type": "boolean" + }, + "tlsOptions": { + "type": "object" + }, + "baseUrl": { + "type": "string" + }, + "webhookUrl": { + "type": "string" + }, + "redirectUrl": { + "type": "string" + }, + "hmac": { + "type": "boolean" + }, + "serviceAccount": { + "type": "string" + }, + "ipPoolName": { + "type": "string" + }, + "apiKeyRequestHeader": { + "type": "string" + }, + "secretKeyRequestHeader": { + "type": "string" + }, + "idPath": { + "type": "string" + }, + "datePath": { + "type": "string" + }, + "apiToken": { + "type": "string" + }, + "authenticateByToken": { + "type": "boolean" + }, + "authenticationTokenKey": { + "type": "string" + }, + "instanceId": { + "type": "string" + }, + "alertUid": { + "type": "string" + }, + "title": { + "type": "string" + }, + "imageUrl": { + "type": "string" + }, + "state": { + "type": "string" + }, + "externalLink": { + "type": "string" + }, + "channelId": { + "type": "string" + }, + "phoneNumberIdentification": { + "type": "string" + }, + "accessKey": { + "type": "string" + } + } + }, + "BuilderFieldType": { + "type": "string", + "enum": [ + "BOOLEAN", + "TEXT", + "DATE", + "NUMBER", + "STATEMENT", + "LIST", + "MULTI_LIST", + "GROUP" + ] + }, + "FieldFilterPartDto": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "value": { + "type": "string" + }, + "operator": { + "type": "string", + "enum": [ + "LARGER", + "SMALLER", + "LARGER_EQUAL", + "SMALLER_EQUAL", + "EQUAL", + "NOT_EQUAL", + "ALL_IN", + "ANY_IN", + "NOT_IN", + "BETWEEN", + "NOT_BETWEEN", + "LIKE", + "NOT_LIKE", + "IN" + ] + }, + "on": { + "type": "string", + "enum": [ + "subscriber", + "payload" + ] + } + }, + "required": [ + "field", + "value", + "operator", + "on" + ] + }, + "StepFilterDto": { + "type": "object", + "properties": { + "isNegated": { + "type": "boolean" + }, + "type": { + "$ref": "#/components/schemas/BuilderFieldType" + }, + "value": { + "type": "string", + "enum": [ + "AND", + "OR" + ] + }, + "children": { + "type": "array", + "items": { + "$ref": "#/components/schemas/FieldFilterPartDto" + } + } + }, + "required": [ + "isNegated", + "type", + "value", + "children" + ] + }, + "IntegrationResponseDto": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "description": "The unique identifier of the integration record in the database. This is automatically generated." + }, + "_environmentId": { + "type": "string", + "description": "The unique identifier for the environment associated with this integration. This links to the Environment collection." + }, + "_organizationId": { + "type": "string", + "description": "The unique identifier for the organization that owns this integration. This links to the Organization collection." + }, + "name": { + "type": "string", + "description": "The name of the integration, which is used to identify it in the user interface." + }, + "identifier": { + "type": "string", + "description": "A unique string identifier for the integration, often used for API calls or internal references." + }, + "providerId": { + "type": "string", + "description": "The identifier for the provider of the integration (e.g., \"mailgun\", \"twilio\")." + }, + "channel": { + "enum": [ + "in_app", + "email", + "sms", + "chat", + "push" + ], + "type": "string", + "description": "The channel type for the integration, which defines how the integration communicates (e.g., email, SMS)." + }, + "credentials": { + "description": "The credentials required for the integration to function, including API keys and other sensitive information.", + "allOf": [ + { + "$ref": "#/components/schemas/CredentialsDto" + } + ] + }, + "active": { + "type": "boolean", + "description": "Indicates whether the integration is currently active. An active integration will process events and messages." + }, + "deleted": { + "type": "boolean", + "description": "Indicates whether the integration has been marked as deleted (soft delete)." + }, + "deletedAt": { + "type": "string", + "description": "The timestamp indicating when the integration was deleted. This is set when the integration is soft deleted." + }, + "deletedBy": { + "type": "string", + "description": "The identifier of the user who performed the deletion of this integration. Useful for audit trails." + }, + "primary": { + "type": "boolean", + "description": "Indicates whether this integration is marked as primary. A primary integration is often the default choice for processing." + }, + "conditions": { + "description": "An array of conditions associated with the integration that may influence its behavior or processing logic.", + "type": "array", + "items": { + "$ref": "#/components/schemas/StepFilterDto" + } + } + }, + "required": [ + "_environmentId", + "_organizationId", + "name", + "identifier", + "providerId", + "channel", + "credentials", + "active", + "deleted", + "primary" + ] + }, + "CreateIntegrationRequestDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the integration" + }, + "identifier": { + "type": "string", + "description": "The unique identifier for the integration" + }, + "_environmentId": { + "type": "string", + "description": "The ID of the associated environment", + "format": "uuid" + }, + "providerId": { + "type": "string", + "description": "The provider ID for the integration" + }, + "channel": { + "enum": [ + "in_app", + "email", + "sms", + "chat", + "push" + ], + "type": "string", + "description": "The channel type for the integration" + }, + "credentials": { + "description": "The credentials for the integration", + "allOf": [ + { + "$ref": "#/components/schemas/CredentialsDto" + } + ] + }, + "active": { + "type": "boolean", + "description": "If the integration is active, the validation on the credentials field will run" + }, + "check": { + "type": "boolean", + "description": "Flag to check the integration status" + }, + "conditions": { + "description": "Conditions for the integration", + "type": "array", + "items": { + "$ref": "#/components/schemas/StepFilterDto" + } + } + }, + "required": [ + "providerId", + "channel" + ] + }, + "UpdateIntegrationRequestDto": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "identifier": { + "type": "string" + }, + "_environmentId": { + "type": "string" + }, + "active": { + "type": "boolean", + "description": "If the integration is active the validation on the credentials field will run" + }, + "credentials": { + "$ref": "#/components/schemas/CredentialsDto" + }, + "removeNovuBranding": { + "type": "boolean", + "description": "If true, the Novu branding will be removed from the Inbox component" + }, + "check": { + "type": "boolean" + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StepFilterDto" + } + } + } + }, + "PaginatedResponseDto": { + "type": "object", + "properties": { + "page": { + "type": "number", + "description": "The current page of the paginated response" + }, + "hasMore": { + "type": "boolean", + "description": "Does the list have more items to fetch" + }, + "pageSize": { + "type": "number", + "description": "Number of items on each page" + }, + "data": { + "description": "The list of items matching the query", + "type": "array", + "items": { + "type": "object" + } + } + }, + "required": [ + "page", + "hasMore", + "pageSize", + "data" + ] + }, + "ChannelCredentials": { + "type": "object", + "properties": { + "webhookUrl": { + "type": "string", + "description": "Webhook URL used by chat app integrations. The webhook should be obtained from the chat app provider.", + "example": "https://example.com/webhook" + }, + "channel": { + "type": "string", + "description": "Channel specification for Mattermost chat notifications.", + "example": "general" + }, + "deviceTokens": { + "description": "Contains an array of the subscriber device tokens for a given provider. Used on Push integrations.", + "example": [ + "token1", + "token2", + "token3" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "alertUid": { + "type": "string", + "description": "Alert UID for Grafana on-call webhook payload.", + "example": "12345-abcde" + }, + "title": { + "type": "string", + "description": "Title to be used with Grafana on-call webhook.", + "example": "Critical Alert" + }, + "imageUrl": { + "type": "string", + "description": "Image URL property for Grafana on-call webhook.", + "example": "https://example.com/image.png" + }, + "state": { + "type": "string", + "description": "State property for Grafana on-call webhook.", + "example": "resolved" + }, + "externalUrl": { + "type": "string", + "description": "Link to upstream details property for Grafana on-call webhook.", + "example": "https://example.com/details" + } + } + }, + "ChannelSettings": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "enum": [ + "slack", + "discord", + "msteams", + "mattermost", + "ryver", + "zulip", + "grafana-on-call", + "getstream", + "rocket-chat", + "whatsapp-business", + "fcm", + "apns", + "expo", + "one-signal", + "pushpad", + "push-webhook", + "pusher-beams" + ], + "description": "The provider identifier for the credentials" + }, + "integrationIdentifier": { + "type": "string", + "description": "The integration identifier" + }, + "credentials": { + "description": "Credentials payload for the specified provider", + "allOf": [ + { + "$ref": "#/components/schemas/ChannelCredentials" + } + ] + }, + "_integrationId": { + "type": "string", + "description": "The unique identifier of the integration associated with this channel." + } + }, + "required": [ + "providerId", + "credentials", + "_integrationId" + ] + }, + "SubscriberResponseDto": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "description": "The internal ID generated by Novu for your subscriber. This ID does not match the `subscriberId` used in your queries. Refer to `subscriberId` for that identifier." + }, + "firstName": { + "type": "string", + "description": "The first name of the subscriber." + }, + "lastName": { + "type": "string", + "description": "The last name of the subscriber." + }, + "email": { + "type": "string", + "nullable": true, + "description": "The email address of the subscriber." + }, + "phone": { + "type": "string", + "description": "The phone number of the subscriber." + }, + "avatar": { + "type": "string", + "description": "The URL of the subscriber's avatar image." + }, + "locale": { + "type": "string", + "description": "The locale setting of the subscriber, indicating their preferred language or region." + }, + "subscriberId": { + "type": "string", + "description": "The identifier used to create this subscriber, which typically corresponds to the user ID in your system." + }, + "channels": { + "description": "An array of channel settings associated with the subscriber.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelSettings" + } + }, + "topics": { + "description": "An array of topics that the subscriber is subscribed to.", + "type": "array", + "items": { + "type": "string" + } + }, + "isOnline": { + "type": "boolean", + "description": "Indicates whether the subscriber is currently online." + }, + "lastOnlineAt": { + "type": "string", + "description": "The timestamp indicating when the subscriber was last online, in ISO 8601 format." + }, + "_organizationId": { + "type": "string", + "description": "The unique identifier of the organization to which the subscriber belongs." + }, + "_environmentId": { + "type": "string", + "description": "The unique identifier of the environment associated with this subscriber." + }, + "deleted": { + "type": "boolean", + "description": "Indicates whether the subscriber has been deleted." + }, + "createdAt": { + "type": "string", + "description": "The timestamp indicating when the subscriber was created, in ISO 8601 format." + }, + "updatedAt": { + "type": "string", + "description": "The timestamp indicating when the subscriber was last updated, in ISO 8601 format." + }, + "__v": { + "type": "number", + "description": "The version of the subscriber document." + } + }, + "required": [ + "subscriberId", + "_organizationId", + "_environmentId", + "deleted", + "createdAt", + "updatedAt" + ] + }, + "CreateSubscriberRequestDto": { + "type": "object", + "properties": { + "subscriberId": { + "type": "string", + "description": "The internal identifier you used to create this subscriber, usually correlates to the id the user in your systems" + }, + "email": { + "type": "string", + "description": "The email address of the subscriber." + }, + "firstName": { + "type": "string", + "description": "The first name of the subscriber." + }, + "lastName": { + "type": "string", + "description": "The last name of the subscriber." + }, + "phone": { + "type": "string", + "description": "The phone number of the subscriber." + }, + "avatar": { + "type": "string", + "description": "An HTTP URL to the profile image of your subscriber." + }, + "locale": { + "type": "string", + "description": "The locale of the subscriber." + }, + "data": { + "type": "object", + "description": "An optional payload object that can contain any properties.", + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "boolean" + }, + { + "type": "number" + } + ] + } + }, + "channels": { + "description": "An optional array of subscriber channels.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SubscriberChannelDto" + } + } + }, + "required": [ + "subscriberId" + ] + }, + "UpdatedSubscriberDto": { + "type": "object", + "properties": { + "subscriberId": { + "type": "string", + "description": "The ID of the subscriber that was updated." + } + }, + "required": [ + "subscriberId" + ] + }, + "CreatedSubscriberDto": { + "type": "object", + "properties": { + "subscriberId": { + "type": "string", + "description": "The ID of the subscriber that was created." + } + }, + "required": [ + "subscriberId" + ] + }, + "FailedOperationDto": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "The error message associated with the failed operation." + }, + "subscriberId": { + "type": "string", + "description": "The subscriber ID associated with the failed operation. This field is optional." + } + } + }, + "BulkCreateSubscriberResponseDto": { + "type": "object", + "properties": { + "updated": { + "description": "An array of subscribers that were successfully updated.", + "type": "array", + "items": { + "$ref": "#/components/schemas/UpdatedSubscriberDto" + } + }, + "created": { + "description": "An array of subscribers that were successfully created.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CreatedSubscriberDto" + } + }, + "failed": { + "description": "An array of failed operations with error messages and optional subscriber IDs.", + "type": "array", + "items": { + "$ref": "#/components/schemas/FailedOperationDto" + } + } + }, + "required": [ + "updated", + "created", + "failed" + ] + }, + "BulkSubscriberCreateDto": { + "type": "object", + "properties": { + "subscribers": { + "description": "An array of subscribers to be created in bulk.", + "type": "array", + "items": { + "$ref": "#/components/schemas/CreateSubscriberRequestDto" + } + } + }, + "required": [ + "subscribers" + ] + }, + "UpdateSubscriberRequestDto": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "The email address of the subscriber.", + "example": "john.doe@example.com" + }, + "firstName": { + "type": "string", + "description": "The first name of the subscriber.", + "example": "John" + }, + "lastName": { + "type": "string", + "description": "The last name of the subscriber.", + "example": "Doe" + }, + "phone": { + "type": "string", + "description": "The phone number of the subscriber.", + "example": "+1234567890" + }, + "avatar": { + "type": "string", + "description": "The avatar URL of the subscriber.", + "example": "https://example.com/avatar.jpg" + }, + "locale": { + "type": "string", + "description": "The locale of the subscriber, for example \"en-US\".", + "example": "en-US" + }, + "data": { + "type": "object", + "description": "Custom data associated with the subscriber. Can contain any additional properties.", + "additionalProperties": true, + "example": { + "preferences": { + "notifications": true, + "theme": "dark" + }, + "tags": [ + "premium", + "newsletter" + ] + } + }, + "channels": { + "description": "An array of communication channels for the subscriber.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SubscriberChannelDto" + } + } + } + }, + "UpdateSubscriberChannelRequestDto": { + "type": "object", + "properties": { + "providerId": { + "type": "string", + "enum": [ + "slack", + "discord", + "msteams", + "mattermost", + "ryver", + "zulip", + "grafana-on-call", + "getstream", + "rocket-chat", + "whatsapp-business", + "fcm", + "apns", + "expo", + "one-signal", + "pushpad", + "push-webhook", + "pusher-beams" + ], + "description": "The provider identifier for the credentials" + }, + "integrationIdentifier": { + "type": "string", + "description": "The integration identifier" + }, + "credentials": { + "description": "Credentials payload for the specified provider", + "allOf": [ + { + "$ref": "#/components/schemas/ChannelCredentials" + } + ] + } + }, + "required": [ + "providerId", + "credentials" + ] + }, + "UpdateSubscriberOnlineFlagRequestDto": { + "type": "object", + "properties": { + "isOnline": { + "type": "boolean" + } + }, + "required": [ + "isOnline" + ] + }, + "DeleteSubscriberResponseDto": { + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean", + "description": "A boolean stating the success of the action" + }, + "status": { + "type": "string", + "description": "The status enum for the performed action", + "enum": [ + "deleted" + ] + } + }, + "required": [ + "acknowledged", + "status" + ] + }, + "TriggerTypeEnum": { + "type": "string", + "description": "The type of the trigger", + "enum": [ + "event" + ] + }, + "NotificationTriggerVariableResponse": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the variable" + }, + "value": { + "type": "object", + "description": "The value of the variable" + }, + "type": { + "enum": [ + "String", + "Array", + "Boolean" + ], + "type": "string", + "description": "The type of the variable" + } + }, + "required": [ + "name" + ] + }, + "TriggerReservedVariableResponse": { + "type": "object", + "properties": { + "type": { + "enum": [ + "tenant", + "actor" + ], + "type": "string", + "description": "The type of the reserved variable" + }, + "variables": { + "description": "The reserved variables of the trigger", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "type", + "variables" + ] + }, + "NotificationTriggerResponse": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/TriggerTypeEnum" + }, + "identifier": { + "type": "string", + "description": "The identifier of the trigger" + }, + "variables": { + "description": "The variables of the trigger", + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationTriggerVariableResponse" + } + }, + "subscriberVariables": { + "description": "The subscriber variables of the trigger", + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationTriggerVariableResponse" + } + }, + "reservedVariables": { + "description": "The reserved variables of the trigger", + "type": "array", + "items": { + "$ref": "#/components/schemas/TriggerReservedVariableResponse" + } + } + }, + "required": [ + "type", + "identifier", + "variables" + ] + }, + "TemplateResponse": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "description": "Unique identifier of the workflow" + }, + "name": { + "type": "string", + "description": "Name of the workflow" + }, + "critical": { + "type": "boolean", + "description": "Critical templates will always be delivered to the end user and should be hidden from the subscriber preferences screen" + }, + "triggers": { + "description": "Triggers are the events that will trigger the workflow.", + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationTriggerResponse" + } + } + }, + "required": [ + "_id", + "name", + "critical", + "triggers" + ] + }, + "PreferenceChannels": { + "type": "object", + "properties": { + "email": { + "type": "boolean" + }, + "sms": { + "type": "boolean" + }, + "in_app": { + "type": "boolean" + }, + "chat": { + "type": "boolean" + }, + "push": { + "type": "boolean" + } + } + }, + "Preference": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Sets if the workflow is fully enabled for all channels or not for the subscriber." + }, + "channels": { + "description": "Subscriber preferences for the different channels regarding this workflow", + "allOf": [ + { + "$ref": "#/components/schemas/PreferenceChannels" + } + ] + } + }, + "required": [ + "enabled", + "channels" + ] + }, + "UpdateSubscriberPreferenceResponseDto": { + "type": "object", + "properties": { + "template": { + "description": "The workflow information and if it is critical or not", + "allOf": [ + { + "$ref": "#/components/schemas/TemplateResponse" + } + ] + }, + "preference": { + "description": "The preferences of the subscriber regarding the related workflow", + "allOf": [ + { + "$ref": "#/components/schemas/Preference" + } + ] + } + }, + "required": [ + "template", + "preference" + ] + }, + "GetSubscriberPreferencesResponseDto": { + "type": "object", + "properties": { + "template": { + "description": "The workflow information and if it is critical or not", + "allOf": [ + { + "$ref": "#/components/schemas/TemplateResponse" + } + ] + }, + "preference": { + "description": "The preferences of the subscriber regarding the related workflow", + "allOf": [ + { + "$ref": "#/components/schemas/Preference" + } + ] + } + }, + "required": [ + "preference" + ] + }, + "ChannelPreference": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/ChannelTypeEnum" + }, + "enabled": { + "type": "boolean", + "description": "If channel is enabled or not" + } + }, + "required": [ + "type", + "enabled" + ] + }, + "UpdateSubscriberPreferenceRequestDto": { + "type": "object", + "properties": { + "channel": { + "description": "Optional preferences for each channel type in the assigned workflow.", + "allOf": [ + { + "$ref": "#/components/schemas/ChannelPreference" + } + ] + }, + "enabled": { + "type": "boolean", + "description": "Indicates whether the workflow is fully enabled for all channels for the subscriber." + } + } + }, + "UpdateSubscriberPreferenceGlobalResponseDto": { + "type": "object", + "properties": { + "preference": { + "description": "The preferences of the subscriber regarding the related workflow", + "allOf": [ + { + "$ref": "#/components/schemas/Preference" + } + ] + } + }, + "required": [ + "preference" + ] + }, + "UpdateSubscriberGlobalPreferencesRequestDto": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable or disable the subscriber global preferences." + }, + "preferences": { + "description": "The subscriber global preferences for every ChannelTypeEnum.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelPreference" + } + } + } + }, + "EmailBlockTypeEnum": { + "type": "string", + "description": "Type of the email block", + "enum": [ + "button", + "text" + ] + }, + "TextAlignEnum": { + "type": "string", + "description": "Text alignment for the email block", + "enum": [ + "center", + "left", + "right" + ] + }, + "EmailBlockStyles": { + "type": "object", + "properties": { + "textAlign": { + "$ref": "#/components/schemas/TextAlignEnum" + } + }, + "required": [ + "textAlign" + ] + }, + "EmailBlock": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/EmailBlockTypeEnum" + }, + "content": { + "type": "string", + "description": "Content of the email block" + }, + "url": { + "type": "string", + "description": "URL associated with the email block, if any" + }, + "styles": { + "description": "Styles applied to the email block", + "allOf": [ + { + "$ref": "#/components/schemas/EmailBlockStyles" + } + ] + } + }, + "required": [ + "type", + "content" + ] + }, + "ChannelCTATypeEnum": { + "type": "string", + "description": "Type of call to action", + "enum": [ + "redirect" + ] + }, + "MessageCTAData": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL for the call to action" + } + } + }, + "MessageActionStatusEnum": { + "type": "string", + "description": "Status of the message action", + "enum": [ + "pending", + "done" + ] + }, + "ButtonTypeEnum": { + "type": "string", + "description": "Type of button for the action result", + "enum": [ + "primary", + "secondary" + ] + }, + "MessageButton": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/ButtonTypeEnum" + }, + "content": { + "type": "string", + "description": "Content of the button" + }, + "resultContent": { + "type": "string", + "description": "Content of the result when the button is clicked" + } + }, + "required": [ + "type", + "content" + ] + }, + "MessageActionResult": { + "type": "object", + "properties": { + "payload": { + "type": "object", + "description": "Payload of the action result" + }, + "type": { + "$ref": "#/components/schemas/ButtonTypeEnum" + } + } + }, + "MessageAction": { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/MessageActionStatusEnum" + }, + "buttons": { + "description": "List of buttons associated with the message action", + "type": "array", + "items": { + "$ref": "#/components/schemas/MessageButton" + } + }, + "result": { + "description": "Result of the message action", + "allOf": [ + { + "$ref": "#/components/schemas/MessageActionResult" + } + ] + } + } + }, + "MessageCTA": { + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/ChannelCTATypeEnum" + }, + "data": { + "description": "Data associated with the call to action", + "allOf": [ + { + "$ref": "#/components/schemas/MessageCTAData" + } + ] + }, + "action": { + "description": "Action associated with the call to action", + "allOf": [ + { + "$ref": "#/components/schemas/MessageAction" + } + ] + } + }, + "required": [ + "data" + ] + }, + "ActorTypeEnum": { + "type": "string", + "description": "The type of the actor, indicating the role in the notification process.", + "enum": [ + "none", + "user", + "system_icon", + "system_custom" + ] + }, + "ActorFeedItemDto": { + "type": "object", + "properties": { + "data": { + "type": "string", + "description": "The data associated with the actor, can be null if not applicable.", + "nullable": true, + "example": null + }, + "type": { + "$ref": "#/components/schemas/ActorTypeEnum" + } + }, + "required": [ + "data", + "type" + ] + }, + "SubscriberFeedResponseDto": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "description": "The internal ID generated by Novu for your subscriber. This ID does not match the `subscriberId` used in your queries. Refer to `subscriberId` for that identifier." + }, + "firstName": { + "type": "string", + "description": "The first name of the subscriber." + }, + "lastName": { + "type": "string", + "description": "The last name of the subscriber." + }, + "avatar": { + "type": "string", + "description": "The URL of the subscriber's avatar image." + }, + "subscriberId": { + "type": "string", + "description": "The identifier used to create this subscriber, which typically corresponds to the user ID in your system." + } + }, + "required": [ + "subscriberId" + ] + }, + "NotificationFeedItemDto": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "description": "Unique identifier for the notification.", + "example": "615c1f2f9b0c5b001f8e4e3b" + }, + "_templateId": { + "type": "string", + "description": "Identifier for the template used to generate the notification.", + "example": "template_12345" + }, + "_environmentId": { + "type": "string", + "description": "Identifier for the environment where the notification is sent.", + "example": "env_67890" + }, + "_messageTemplateId": { + "type": "string", + "description": "Identifier for the message template used.", + "example": "message_template_54321" + }, + "_organizationId": { + "type": "string", + "description": "Identifier for the organization sending the notification.", + "example": "org_98765" + }, + "_notificationId": { + "type": "string", + "description": "Unique identifier for the notification instance.", + "example": "notification_123456" + }, + "_subscriberId": { + "type": "string", + "description": "Unique identifier for the subscriber receiving the notification.", + "example": "subscriber_112233" + }, + "_feedId": { + "type": "string", + "description": "Identifier for the feed associated with the notification.", + "example": "feed_445566" + }, + "_jobId": { + "type": "string", + "description": "Identifier for the job that triggered the notification.", + "example": "job_778899" + }, + "createdAt": { + "type": "string", + "description": "Timestamp indicating when the notification was created.", + "format": "date-time", + "nullable": true, + "example": "2024-12-10T10:10:59.639Z" + }, + "updatedAt": { + "type": "string", + "nullable": true, + "description": "Timestamp indicating when the notification was last updated.", + "format": "date-time", + "example": "2024-12-10T10:10:59.639Z" + }, + "actor": { + "description": "Actor details related to the notification, if applicable.", + "allOf": [ + { + "$ref": "#/components/schemas/ActorFeedItemDto" + } + ] + }, + "subscriber": { + "description": "Subscriber details associated with this notification.", + "allOf": [ + { + "$ref": "#/components/schemas/SubscriberFeedResponseDto" + } + ] + }, + "transactionId": { + "type": "string", + "description": "Unique identifier for the transaction associated with the notification.", + "example": "transaction_123456" + }, + "templateIdentifier": { + "type": "string", + "nullable": true, + "description": "Identifier for the template used, if applicable.", + "example": "template_abcdef" + }, + "providerId": { + "type": "string", + "nullable": true, + "description": "Identifier for the provider that sends the notification.", + "example": "provider_xyz" + }, + "content": { + "type": "string", + "description": "The main content of the notification.", + "example": "This is a test notification content." + }, + "subject": { + "type": "string", + "nullable": true, + "description": "The subject line for email notifications, if applicable.", + "example": "Test Notification Subject" + }, + "channel": { + "$ref": "#/components/schemas/ChannelTypeEnum" + }, + "read": { + "type": "boolean", + "description": "Indicates whether the notification has been read by the subscriber.", + "example": false + }, + "seen": { + "type": "boolean", + "description": "Indicates whether the notification has been seen by the subscriber.", + "example": true + }, + "deleted": { + "type": "boolean", + "description": "Indicates whether the notification has been deleted.", + "example": false + }, + "deviceTokens": { + "nullable": true, + "description": "Device tokens for push notifications, if applicable.", + "example": [ + "token1", + "token2" + ], + "type": "array", + "items": { + "type": "string" + } + }, + "cta": { + "description": "Call-to-action information associated with the notification.", + "allOf": [ + { + "$ref": "#/components/schemas/MessageCTA" + } + ] + }, + "status": { + "type": "string", + "description": "Current status of the notification.", + "enum": [ + "sent", + "error", + "warning" + ], + "example": "sent" + }, + "payload": { + "type": "object", + "description": "The payload that was used to send the notification trigger.", + "additionalProperties": true, + "example": { + "key": "value" + } + }, + "overrides": { + "type": "object", + "description": "Provider-specific overrides used when triggering the notification.", + "additionalProperties": true, + "example": { + "overrideKey": "overrideValue" + } + } + }, + "required": [ + "_id", + "_templateId", + "_environmentId", + "_messageTemplateId", + "_organizationId", + "_notificationId", + "_subscriberId", + "_feedId", + "_jobId", + "transactionId", + "content", + "channel", + "read", + "seen", + "deleted", + "cta", + "status" + ] + }, + "FeedResponseDto": { + "type": "object", + "properties": { + "totalCount": { + "type": "number", + "description": "Total number of notifications available.", + "example": 5 + }, + "hasMore": { + "type": "boolean", + "description": "Indicates if there are more notifications to load.", + "example": true + }, + "data": { + "description": "Array of notifications returned in the response.", + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationFeedItemDto" + } + }, + "pageSize": { + "type": "number", + "description": "The number of notifications returned in this response.", + "example": 2 + }, + "page": { + "type": "number", + "description": "The current page number of the notifications.", + "example": 1 + } + }, + "required": [ + "hasMore", + "data", + "pageSize", + "page" + ] + }, + "UnseenCountResponse": { + "type": "object", + "properties": { + "count": { + "type": "number" + } + }, + "required": [ + "count" + ] + }, + "NotificationGroup": { + "type": "object", + "properties": { + "_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "_environmentId": { + "type": "string" + }, + "_organizationId": { + "type": "string" + }, + "_parentId": { + "type": "string" + } + }, + "required": [ + "name", + "_environmentId", + "_organizationId" + ] + }, + "DigestRegularMetadata": { + "type": "object", + "properties": { + "amount": { + "type": "number" + }, + "unit": { + "type": "string", + "enum": [ + "seconds", + "minutes", + "hours", + "days", + "weeks", + "months" + ] + }, + "digestKey": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "regular", + "backoff" + ] + }, + "backoff": { + "type": "boolean" + }, + "backoffAmount": { + "type": "number" + }, + "backoffUnit": { + "type": "string", + "enum": [ + "seconds", + "minutes", + "hours", + "days", + "weeks", + "months" + ] + }, + "updateMode": { + "type": "boolean" + } + }, + "required": [ + "type" + ] + }, + "TimedConfig": { + "type": "object", + "properties": { + "atTime": { + "type": "string" + }, + "weekDays": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "monday", + "tuesday", + "wednesday", + "thursday", + "friday", + "saturday", + "sunday" + ] + } + }, + "monthDays": { + "type": "array", + "items": { + "type": "string" + } + }, + "ordinal": { + "type": "string", + "enum": [ + "1", + "2", + "3", + "4", + "5", + "last" + ] + }, + "ordinalValue": { + "type": "string", + "enum": [ + "day", + "weekday", + "weekend", + "sunday", + "monday", + "tuesday", + "wednesday", + "thursday", + "friday", + "saturday" + ] + }, + "monthlyType": { + "type": "string", + "enum": [ + "each", + "on" + ] + } + } + }, + "DigestTimedMetadata": { + "type": "object", + "properties": { + "amount": { + "type": "number" + }, + "unit": { + "type": "string", + "enum": [ + "seconds", + "minutes", + "hours", + "days", + "weeks", + "months" + ] + }, + "digestKey": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "timed" + ] + }, + "timed": { + "$ref": "#/components/schemas/TimedConfig" + } + }, + "required": [ + "type" + ] + }, + "DelayRegularMetadata": { + "type": "object", + "properties": { + "amount": { + "type": "number" + }, + "unit": { + "type": "string", + "enum": [ + "seconds", + "minutes", + "hours", + "days", + "weeks", + "months" + ] + }, + "type": { + "type": "string", + "enum": [ + "regular" + ] + } + }, + "required": [ + "type" + ] + }, + "DelayScheduledMetadata": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "scheduled" + ] + }, + "delayPath": { + "type": "string" + } + }, + "required": [ + "type", + "delayPath" + ] + }, + "MessageTemplate": { + "type": "object" + }, + "NotificationStepVariant": { + "type": "object", + "properties": { + "_id": { + "type": "string" + }, + "uuid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "_templateId": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "shouldStopOnFail": { + "type": "boolean" + }, + "template": { + "$ref": "#/components/schemas/MessageTemplate" + }, + "filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StepFilterDto" + } + }, + "_parentId": { + "type": "object" + }, + "metadata": { + "oneOf": [ + { + "$ref": "#/components/schemas/DigestRegularMetadata" + }, + { + "$ref": "#/components/schemas/DigestTimedMetadata" + }, + { + "$ref": "#/components/schemas/DelayRegularMetadata" + }, + { + "$ref": "#/components/schemas/DelayScheduledMetadata" + } + ] + }, + "replyCallback": { + "type": "object" + } + } + }, + "NotificationStep": { + "type": "object", + "properties": { + "_id": { + "type": "string" + }, + "uuid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "_templateId": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "shouldStopOnFail": { + "type": "boolean" + }, + "template": { + "$ref": "#/components/schemas/MessageTemplate" + }, + "filters": { + "type": "array", + "items": { + "$ref": "#/components/schemas/StepFilterDto" + } + }, + "_parentId": { + "type": "object" + }, + "metadata": { + "oneOf": [ + { + "$ref": "#/components/schemas/DigestRegularMetadata" + }, + { + "$ref": "#/components/schemas/DigestTimedMetadata" + }, + { + "$ref": "#/components/schemas/DelayRegularMetadata" + }, + { + "$ref": "#/components/schemas/DelayScheduledMetadata" + } + ] + }, + "replyCallback": { + "type": "object" + }, + "variants": { + "$ref": "#/components/schemas/NotificationStepVariant" + } + } + }, + "WorkflowResponse": { + "type": "object", + "properties": { + "_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "active": { + "type": "boolean" + }, + "draft": { + "type": "boolean" + }, + "preferenceSettings": { + "$ref": "#/components/schemas/PreferenceChannels" + }, + "critical": { + "type": "boolean" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "steps": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationStep" + } + }, + "_organizationId": { + "type": "string" + }, + "_creatorId": { + "type": "string" + }, + "_environmentId": { + "type": "string" + }, + "triggers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NotificationTrigger" + } + }, + "_notificationGroupId": { + "type": "string" + }, + "_parentId": { + "type": "string" + }, + "deleted": { + "type": "boolean" + }, + "deletedAt": { + "type": "string" + }, + "deletedBy": { + "type": "string" + }, + "notificationGroup": { + "$ref": "#/components/schemas/NotificationGroup" + }, + "data": { + "type": "object" + }, + "workflowIntegrationStatus": { + "type": "object" + } + }, + "required": [ + "name", + "description", + "active", + "draft", + "preferenceSettings", + "critical", + "tags", + "steps", + "_organizationId", + "_creatorId", + "_environmentId", + "triggers", + "_notificationGroupId", + "deleted", + "deletedAt", + "deletedBy" + ] + }, + "MessageStatusEnum": { + "type": "string", + "description": "Status of the message", + "enum": [ + "sent", + "error", + "warning" + ] + }, + "MessageResponseDto": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "description": "Unique identifier for the message" + }, + "_templateId": { + "type": "string", + "description": "Template ID associated with the message" + }, + "_environmentId": { + "type": "string", + "description": "Environment ID where the message is sent" + }, + "_messageTemplateId": { + "type": "string", + "description": "Message template ID" + }, + "_organizationId": { + "type": "string", + "description": "Organization ID associated with the message" + }, + "_notificationId": { + "type": "string", + "description": "Notification ID associated with the message" + }, + "_subscriberId": { + "type": "string", + "description": "Subscriber ID associated with the message" + }, + "subscriber": { + "description": "Subscriber details, if available", + "allOf": [ + { + "$ref": "#/components/schemas/SubscriberResponseDto" + } + ] + }, + "template": { + "description": "Workflow template associated with the message", + "allOf": [ + { + "$ref": "#/components/schemas/WorkflowResponse" + } + ] + }, + "templateIdentifier": { + "type": "string", + "description": "Identifier for the message template" + }, + "createdAt": { + "type": "string", + "description": "Creation date of the message" + }, + "lastSeenDate": { + "type": "string", + "description": "Last seen date of the message, if available" + }, + "lastReadDate": { + "type": "string", + "description": "Last read date of the message, if available" + }, + "content": { + "oneOf": [ + { + "$ref": "#/components/schemas/EmailBlock" + }, + { + "type": "string", + "description": "String representation of the content" + } + ], + "description": "Content of the message, can be an email block or a string" + }, + "transactionId": { + "type": "string", + "description": "Transaction ID associated with the message" + }, + "subject": { + "type": "string", + "description": "Subject of the message, if applicable" + }, + "channel": { + "$ref": "#/components/schemas/ChannelTypeEnum" + }, + "read": { + "type": "boolean", + "description": "Indicates if the message has been read" + }, + "seen": { + "type": "boolean", + "description": "Indicates if the message has been seen" + }, + "email": { + "type": "string", + "description": "Email address associated with the message, if applicable" + }, + "phone": { + "type": "string", + "description": "Phone number associated with the message, if applicable" + }, + "directWebhookUrl": { + "type": "string", + "description": "Direct webhook URL for the message, if applicable" + }, + "providerId": { + "type": "string", + "description": "Provider ID associated with the message, if applicable" + }, + "deviceTokens": { + "description": "Device tokens associated with the message, if applicable", + "type": "array", + "items": { + "type": "string" + } + }, + "title": { + "type": "string", + "description": "Title of the message, if applicable" + }, + "cta": { + "description": "Call to action associated with the message", + "allOf": [ + { + "$ref": "#/components/schemas/MessageCTA" + } + ] + }, + "_feedId": { + "type": "string", + "nullable": true, + "description": "Feed ID associated with the message, if applicable" + }, + "status": { + "$ref": "#/components/schemas/MessageStatusEnum" + }, + "errorId": { + "type": "string", + "description": "Error ID if the message has an error" + }, + "errorText": { + "type": "string", + "description": "Error text if the message has an error" + }, + "payload": { + "type": "object", + "description": "The payload that was used to send the notification trigger" + }, + "overrides": { + "type": "object", + "description": "Provider specific overrides used when triggering the notification" + } + }, + "required": [ + "_templateId", + "_environmentId", + "_messageTemplateId", + "_organizationId", + "_notificationId", + "_subscriberId", + "createdAt", + "content", + "transactionId", + "channel", + "read", + "seen", + "cta", + "status" + ] + }, + "MessageMarkAsRequestDto": { + "type": "object", + "properties": { + "messageId": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "markAs": { + "enum": [ + "read", + "seen", + "unread", + "unseen" + ], + "type": "string" + } + }, + "required": [ + "messageId", + "markAs" + ] + }, + "MarkAllMessageAsRequestDto": { + "type": "object", + "properties": { + "feedIdentifier": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ], + "description": "Optional feed identifier or array of feed identifiers" + }, + "markAs": { + "enum": [ + "read", + "seen", + "unread", + "unseen" + ], + "type": "string", + "description": "Mark all subscriber messages as read, unread, seen or unseen" + } + }, + "required": [ + "markAs" + ] + }, + "MarkMessageActionAsSeenDto": { + "type": "object", + "properties": { + "status": { + "enum": [ + "pending", + "done" + ], + "type": "string", + "description": "Message action status" + }, + "payload": { + "type": "object", + "description": "Message action payload" + } + }, + "required": [ + "status" + ] + }, + "String": { + "type": "object" + }, + "DeleteMessageResponseDto": { + "type": "object", + "properties": { + "acknowledged": { + "type": "boolean", + "description": "A boolean stating the success of the action" + }, + "status": { + "type": "string", + "description": "The status enum for the performed action", + "enum": [ + "deleted" + ] + } + }, + "required": [ + "acknowledged", + "status" + ] + }, + "CreateTopicResponseDto": { + "type": "object", + "properties": { + "_id": { + "type": "string", + "description": "The unique identifier for the Topic created." + }, + "key": { + "type": "string", + "description": "User defined custom key and provided by the user that will be an unique identifier for the Topic created." + } + }, + "required": [ + "key" + ] + }, + "CreateTopicRequestDto": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "User defined custom key and provided by the user that will be an unique identifier for the Topic created." + }, + "name": { + "type": "string", + "description": "User defined custom name and provided by the user that will name the Topic created." + } + }, + "required": [ + "key", + "name" + ] + }, + "AddSubscribersRequestDto": { + "type": "object", + "properties": { + "subscribers": { + "description": "List of subscriber identifiers that will be associated to the topic", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "subscribers" + ] + }, + "FailedAssignmentsDto": { + "type": "object", + "properties": { + "notFound": { + "description": "List of subscriber IDs that were not found", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "AssignSubscriberToTopicDto": { + "type": "object", + "properties": { + "succeeded": { + "description": "List of successfully assigned subscriber IDs", + "type": "array", + "items": { + "type": "string" + } + }, + "failed": { + "description": "Details about failed assignments", + "allOf": [ + { + "$ref": "#/components/schemas/FailedAssignmentsDto" + } + ] + } + }, + "required": [ + "succeeded" + ] + }, + "TopicSubscriberDto": { + "type": "object", + "properties": { + "_organizationId": { + "type": "string", + "description": "Unique identifier for the organization", + "example": "org_123456789" + }, + "_environmentId": { + "type": "string", + "description": "Unique identifier for the environment", + "example": "env_123456789" + }, + "_subscriberId": { + "type": "string", + "description": "Unique identifier for the subscriber", + "example": "sub_123456789" + }, + "_topicId": { + "type": "string", + "description": "Unique identifier for the topic", + "example": "topic_123456789" + }, + "topicKey": { + "type": "string", + "description": "Key associated with the topic", + "example": "my_topic_key" + }, + "externalSubscriberId": { + "type": "string", + "description": "External identifier for the subscriber", + "example": "external_subscriber_123" + } + }, + "required": [ + "_organizationId", + "_environmentId", + "_subscriberId", + "_topicId", + "topicKey", + "externalSubscriberId" + ] + }, + "RemoveSubscribersRequestDto": { + "type": "object", + "properties": { + "subscribers": { + "description": "List of subscriber identifiers that will be removed to the topic", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "subscribers" + ] + }, + "TopicDto": { + "type": "object", + "properties": { + "_id": { + "type": "string" + }, + "_organizationId": { + "type": "string" + }, + "_environmentId": { + "type": "string" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "subscribers": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "_organizationId", + "_environmentId", + "key", + "name", + "subscribers" + ] + }, + "FilterTopicsResponseDto": { + "type": "object", + "properties": { + "data": { + "example": [], + "description": "The list of topics", + "type": "array", + "items": { + "$ref": "#/components/schemas/TopicDto" + } + }, + "page": { + "type": "number", + "example": 1, + "description": "The current page number" + }, + "pageSize": { + "type": "number", + "example": 10, + "description": "The number of items per page" + }, + "totalCount": { + "type": "number", + "example": 10, + "description": "The total number of items" + } + }, + "required": [ + "data", + "page", + "pageSize", + "totalCount" + ] + }, + "GetTopicResponseDto": { + "type": "object", + "properties": { + "_id": { + "type": "string" + }, + "_organizationId": { + "type": "string" + }, + "_environmentId": { + "type": "string" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "subscribers": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "_organizationId", + "_environmentId", + "key", + "name", + "subscribers" + ] + }, + "RenameTopicResponseDto": { + "type": "object", + "properties": { + "_id": { + "type": "string" + }, + "_organizationId": { + "type": "string" + }, + "_environmentId": { + "type": "string" + }, + "key": { + "type": "string" + }, + "name": { + "type": "string" + }, + "subscribers": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "_organizationId", + "_environmentId", + "key", + "name", + "subscribers" + ] + }, + "RenameTopicRequestDto": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "User defined custom name and provided by the user to rename the topic." + } + }, + "required": [ + "name" + ] + }, + "GeneratePreviewResponseDto": { + "type": "object" + }, + "IdempotencyBodyDto": { + "type": "object", + "properties": { + "data": { + "type": "number" + } + }, + "required": [ + "data" + ] + }, + "IdempotencyResponse": { + "type": "object", + "properties": { + "number": { + "type": "number", + "description": "A unique identifier for the idempotency response" + } + }, + "required": [ + "number" + ] + } + }, + "headers": { + "Content-Type": { + "required": true, + "description": "The MIME type of the response body.", + "schema": { + "type": "string" + }, + "example": "application/json" + }, + "RateLimit-Limit": { + "description": "The number of requests that the client is permitted to make per second. The actual maximum may differ when burst is enabled.", + "schema": { + "type": "string" + }, + "example": "100" + }, + "RateLimit-Remaining": { + "description": "The number of requests remaining until the next window.", + "schema": { + "type": "string" + }, + "example": "93" + }, + "RateLimit-Reset": { + "description": "The remaining seconds until a request of the same cost will be refreshed.", + "schema": { + "type": "string" + }, + "example": "8" + }, + "RateLimit-Policy": { + "description": "The rate limit policy that was used to evaluate the request.", + "schema": { + "type": "string" + }, + "example": "100;w=1;burst=110;comment=\"token bucket\";category=\"trigger\";cost=\"single\"" + }, + "Retry-After": { + "description": "The number of seconds after which the client may retry the request that was previously rejected.", + "schema": { + "type": "string" + }, + "example": "8" + }, + "Idempotency-Key": { + "description": "The idempotency key used to evaluate the request.", + "schema": { + "type": "string" + }, + "example": "8" + }, + "Idempotency-Replay": { + "description": "Whether the request was a replay of a previous request.", + "schema": { + "type": "string" + }, + "example": "true" + }, + "Link": { + "description": "A link to the documentation.", + "schema": { + "type": "string" + }, + "example": "https://docs.novu.co/" + } + } + }, + "externalDocs": { + "description": "Novu Documentation", + "url": "https://docs.novu.co" + }, + "x-speakeasy-name-override": [ + { + "operationId": "^.*get.*", + "methodNameOverride": "retrieve" + }, + { + "operationId": "^.*retrieve.*", + "methodNameOverride": "retrieve" + }, + { + "operationId": "^.*create.*", + "methodNameOverride": "create" + }, + { + "operationId": "^.*update.*", + "methodNameOverride": "update" + }, + { + "operationId": "^.*list.*", + "methodNameOverride": "list" + }, + { + "operationId": "^.*delete.*", + "methodNameOverride": "delete" + }, + { + "operationId": "^.*remove.*", + "methodNameOverride": "delete" + } + ], + "x-speakeasy-retries": { + "strategy": "backoff", + "backoff": { + "initialInterval": 1000, + "maxInterval": 30000, + "maxElapsedTime": 3600000, + "exponent": 1.5 + }, + "statusCodes": [ + 408, + 422, + 429, + "5XX" + ], + "retryConnectionErrors": true + } +} \ No newline at end of file