From e25cb41d58ad89219cd44b22b7da9245ee62fe9b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 22 Jan 2025 14:54:33 +0200 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.469.12 (#45) Co-authored-by: speakeasybot --- .speakeasy/gen.lock | 815 ++++++------------ .speakeasy/gen.yaml | 2 +- .speakeasy/workflow.lock | 15 +- FUNCTIONS.md | 23 +- README.md | 232 +++-- RELEASES.md | 12 +- USAGE.md | 88 +- .../components/createsupportthreaddto.md | 17 + docs/models/components/customer.md | 14 + docs/models/components/messageresponsedto.md | 6 +- docs/models/components/plaincardrequestdto.md | 21 + .../components/plaincardrequestdtotenant.md | 14 + .../components/subscriberresponsedto.md | 4 +- docs/models/components/thread.md | 14 + ...iberscontrollercreatesubscriberresponse.md | 4 +- ...scriberscontrollergetsubscriberresponse.md | 4 +- ...riberscontrollerlistsubscribersresponse.md | 4 +- ...rscontrollerlistsubscribersresponsebody.md | 4 +- ...iberscontrollermarkactionasseenresponse.md | 6 +- ...criberscontrollermarkmessagesasresponse.md | 6 +- ...ntrollermodifysubscriberchannelresponse.md | 4 +- ...ntrollerupdatesubscriberchannelresponse.md | 4 +- ...ollerupdatesubscriberonlineflagresponse.md | 4 +- ...iberscontrollerupdatesubscriberresponse.md | 4 +- .../supportcontrollercreatethreadrequest.md | 20 + ...controllerfetchuserorganizationsrequest.md | 20 + ...ollerfetchuserorganizationsresponsebody.md | 14 + docs/sdks/credentials/README.md | 44 + docs/sdks/messages/README.md | 10 +- docs/sdks/notifications/README.md | 34 +- docs/sdks/novu/README.md | 324 ++++++- docs/sdks/novumessages/README.md | 8 +- docs/sdks/novunotifications/README.md | 6 +- docs/sdks/preferences/README.md | 8 +- docs/sdks/properties/README.md | 4 +- docs/sdks/subscribers/README.md | 6 +- jsr.json | 2 +- package-lock.json | 4 +- package.json | 6 +- sources/code-samples.yaml | 22 +- sources/json-development.json | 116 +++ src/funcs/create.ts | 148 ++++ ...supportControllerFetchUserOrganizations.ts | 150 ++++ src/lib/config.ts | 6 +- src/lib/schemas.ts | 5 + .../components/createsupportthreaddto.ts | 66 ++ src/models/components/index.ts | 2 + src/models/components/plaincardrequestdto.ts | 223 +++++ src/models/operations/index.ts | 2 + .../supportcontrollercreatethread.ts | 90 ++ ...supportcontrollerfetchuserorganizations.ts | 163 ++++ src/sdk/sdk.ts | 34 + 52 files changed, 2059 insertions(+), 799 deletions(-) create mode 100644 docs/models/components/createsupportthreaddto.md create mode 100644 docs/models/components/customer.md create mode 100644 docs/models/components/plaincardrequestdto.md create mode 100644 docs/models/components/plaincardrequestdtotenant.md create mode 100644 docs/models/components/thread.md create mode 100644 docs/models/operations/supportcontrollercreatethreadrequest.md create mode 100644 docs/models/operations/supportcontrollerfetchuserorganizationsrequest.md create mode 100644 docs/models/operations/supportcontrollerfetchuserorganizationsresponsebody.md create mode 100644 src/funcs/create.ts create mode 100644 src/funcs/supportControllerFetchUserOrganizations.ts create mode 100644 src/models/components/createsupportthreaddto.ts create mode 100644 src/models/components/plaincardrequestdto.ts create mode 100644 src/models/operations/supportcontrollercreatethread.ts create mode 100644 src/models/operations/supportcontrollerfetchuserorganizations.ts diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 87455e15..78471b97 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,19 +1,21 @@ lockVersion: 2.0.0 id: 6bff3a53-3f0b-40b4-942f-ff70dc583ae5 management: - docChecksum: e13e9f257b632aa7d9006e0ca6bac271 + docChecksum: 16f2063bebd1b31560e0fbc4684e5762 docVersion: "1.0" - speakeasyVersion: 1.469.0 - generationVersion: 2.493.21 - releaseVersion: 0.1.0 - configChecksum: f2665e7189365830c6eac6afd60624cd + speakeasyVersion: 1.469.12 + generationVersion: 2.493.34 + releaseVersion: 0.1.1 + configChecksum: dbe5f6df89b18bd76f605c0bb7ba8c6d + repoURL: https://github.com/novuhq/novu-ts.git + installationURL: https://github.com/novuhq/novu-ts published: true features: typescript: acceptHeaders: 2.81.2 additionalDependencies: 0.1.0 constsAndDefaults: 0.1.11 - core: 3.18.16 + core: 3.18.17 defaultEnabledRetries: 0.1.0 deprecations: 2.81.1 enumUnions: 0.1.0 @@ -81,9 +83,11 @@ generatedFiles: - docs/models/components/createintegrationrequestdtochannel.md - docs/models/components/createsubscriberrequestdto.md - docs/models/components/createsubscriberrequestdtodata.md + - docs/models/components/createsupportthreaddto.md - docs/models/components/createtopicrequestdto.md - docs/models/components/createtopicresponsedto.md - docs/models/components/credentialsdto.md + - docs/models/components/customer.md - docs/models/components/data.md - docs/models/components/databooleandto.md - docs/models/components/delayregularmetadata.md @@ -168,6 +172,8 @@ generatedFiles: - docs/models/components/ordinalvalueenum.md - docs/models/components/overrides.md - docs/models/components/payload.md + - docs/models/components/plaincardrequestdto.md + - docs/models/components/plaincardrequestdtotenant.md - docs/models/components/preference.md - docs/models/components/preferencechannels.md - docs/models/components/providerid.md @@ -189,6 +195,7 @@ generatedFiles: - docs/models/components/tenantpayloaddto.md - docs/models/components/tenantpayloaddtodata.md - docs/models/components/textalignenum.md + - docs/models/components/thread.md - docs/models/components/timedconfig.md - docs/models/components/timedconfigweekdays.md - docs/models/components/tlsoptions.md @@ -310,6 +317,9 @@ generatedFiles: - docs/models/operations/subscriberscontrollerupdatesubscriberpreferenceresponse.md - docs/models/operations/subscriberscontrollerupdatesubscriberrequest.md - docs/models/operations/subscriberscontrollerupdatesubscriberresponse.md + - docs/models/operations/supportcontrollercreatethreadrequest.md + - docs/models/operations/supportcontrollerfetchuserorganizationsrequest.md + - docs/models/operations/supportcontrollerfetchuserorganizationsresponsebody.md - docs/models/operations/topicscontrollerassignrequest.md - docs/models/operations/topicscontrollerassignresponse.md - docs/models/operations/topicscontrollercreatetopicrequest.md @@ -345,6 +355,7 @@ generatedFiles: - package.json - src/core.ts - src/funcs/cancel.ts + - src/funcs/create.ts - src/funcs/integrationsCreate.ts - src/funcs/integrationsDelete.ts - src/funcs/integrationsList.ts @@ -380,6 +391,7 @@ generatedFiles: - src/funcs/subscribersPropertiesUpdateOnlineFlag.ts - src/funcs/subscribersRetrieve.ts - src/funcs/subscribersUpdate.ts + - src/funcs/supportControllerFetchUserOrganizations.ts - src/funcs/topicsCreate.ts - src/funcs/topicsDelete.ts - src/funcs/topicsList.ts @@ -437,6 +449,7 @@ generatedFiles: - src/models/components/createdsubscriberdto.ts - src/models/components/createintegrationrequestdto.ts - src/models/components/createsubscriberrequestdto.ts + - src/models/components/createsupportthreaddto.ts - src/models/components/createtopicrequestdto.ts - src/models/components/createtopicresponsedto.ts - src/models/components/credentialsdto.ts @@ -490,6 +503,7 @@ generatedFiles: - src/models/components/notificationtriggervariableresponse.ts - src/models/components/ordinalenum.ts - src/models/components/ordinalvalueenum.ts + - src/models/components/plaincardrequestdto.ts - src/models/components/preference.ts - src/models/components/preferencechannels.ts - src/models/components/providersidenum.ts @@ -575,6 +589,8 @@ generatedFiles: - src/models/operations/subscriberscontrollerupdatesubscriberglobalpreferences.ts - src/models/operations/subscriberscontrollerupdatesubscriberonlineflag.ts - src/models/operations/subscriberscontrollerupdatesubscriberpreference.ts + - src/models/operations/supportcontrollercreatethread.ts + - src/models/operations/supportcontrollerfetchuserorganizations.ts - src/models/operations/topicscontrollerassign.ts - src/models/operations/topicscontrollercreatetopic.ts - src/models/operations/topicscontrollerdeletetopic.ts @@ -612,39 +628,31 @@ examples: EventsController_trigger: speakeasy-default-events-controller-trigger: requestBody: - application/json: {"name": "workflow_identifier", "to": [{"topicKey": "", "type": "Topic"}, {"topicKey": "", "type": "Topic"}]} + application/json: {"name": "workflow_identifier", "payload": {"comment_id": "string", "post": {"text": "string"}}, "bridgeUrl": "https://example.com/bridge", "overrides": {"fcm": {"data": {"key": "value"}}}, "to": {"subscriberId": ""}} responses: "201": - application/json: {"acknowledged": true, "status": "processed"} + application/json: {"acknowledged": false, "status": "processed"} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "200": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} EventsController_triggerBulk: speakeasy-default-events-controller-trigger-bulk: requestBody: - application/json: {"events": [{"name": "workflow_identifier", "to": [{"topicKey": "", "type": "Topic"}, {"subscriberId": ""}]}, {"name": "workflow_identifier", "to": []}, {"name": "workflow_identifier", "to": [{"topicKey": "", "type": "Topic"}, {"topicKey": "", "type": "Topic"}]}]} + application/json: {"events": [{"name": "workflow_identifier", "payload": {"comment_id": "string", "post": {"text": "string"}}, "bridgeUrl": "https://example.com/bridge", "overrides": {"fcm": {"data": {"key": "value"}}}, "to": {"subscriberId": ""}}, {"name": "workflow_identifier", "payload": {"comment_id": "string", "post": {"text": "string"}}, "bridgeUrl": "https://example.com/bridge", "overrides": {"fcm": {"data": {"key": "value"}}}, "to": {"topicKey": "", "type": "Subscriber"}}, {"name": "workflow_identifier", "payload": {"comment_id": "string", "post": {"text": "string"}}, "bridgeUrl": "https://example.com/bridge", "overrides": {"fcm": {"data": {"key": "value"}}}, "to": ["SUBSCRIBER_ID", "SUBSCRIBER_ID"]}]} responses: "201": application/json: [{"acknowledged": true, "status": "error"}, {"acknowledged": true, "status": "no_workflow_active_steps_defined"}, {"acknowledged": true, "status": "trigger_not_active"}] "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "200": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} EventsController_broadcastEventToAll: @@ -655,13 +663,11 @@ examples: "200": application/json: {"acknowledged": true, "status": "trigger_not_active"} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} EventsController_cancel: @@ -674,60 +680,39 @@ examples: "200": application/json: {"data": true} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - EnvironmentsControllerV1_getCurrentEnvironment: - speakeasy-default-environments-controller-v1-get-current-environment: - responses: - "200": - application/json: {"name": "", "_organizationId": "", "identifier": "", "_parentId": ""} - EnvironmentsControllerV1_listMyEnvironments: - speakeasy-default-environments-controller-v1-list-my-environments: - responses: - "200": - application/json: [{"name": "", "_organizationId": "", "identifier": "", "_parentId": ""}] - EnvironmentsControllerV1_listOrganizationApiKeys: - speakeasy-default-environments-controller-v1-list-organization-api-keys: - responses: - "200": - application/json: [{"key": "", "_userId": ""}, {"key": "", "_userId": ""}, {"key": "", "_userId": ""}] - ExecutionDetailsController_getExecutionDetailsForNotification: - speakeasy-default-execution-details-controller-get-execution-details-for-notification: - parameters: - query: - notificationId: "" - subscriberId: "" + SupportController_fetchUserOrganizations: + speakeasy-default-support-controller-fetch-user-organizations: + requestBody: + application/json: {"timestamp": ""} responses: - "200": - application/json: [{"_organizationId": "", "_jobId": "", "_environmentId": "", "_notificationId": "", "_notificationTemplateId": "", "_subscriberId": "", "transactionId": "", "channel": "digest", "detail": "", "source": "Payload", "status": "Pending", "isTest": false, "isRetry": true}, {"_organizationId": "", "_jobId": "", "_environmentId": "", "_notificationId": "", "_notificationTemplateId": "", "_subscriberId": "", "transactionId": "", "channel": "push", "detail": "", "source": "Internal", "status": "Warning", "isTest": false, "isRetry": true}] + "201": + application/json: {} + SupportController_createThread: + speakeasy-default-support-controller-create-thread: + requestBody: + application/json: {"text": ""} NotificationsController_listNotifications: speakeasy-default-notifications-controller-list-notifications: parameters: query: - channels: ["sms", "chat", "in_app"] - templates: [] - emails: [] - search: "" - subscriberIds: ["", ""] + page: 0 header: {} responses: "200": - application/json: {"hasMore": false, "data": [], "pageSize": "7183.03", "page": "861.40"} + application/json: {"hasMore": false, "data": [{"_environmentId": "", "_organizationId": "", "_subscriberId": "", "transactionId": ""}, {"_environmentId": "", "_organizationId": "", "_subscriberId": "", "transactionId": ""}], "pageSize": 6783.17, "page": 1777.06} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} NotificationsController_getNotification: @@ -740,96 +725,50 @@ examples: "200": application/json: {"_environmentId": "", "_organizationId": "", "_subscriberId": "", "transactionId": ""} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} NotificationsController_getActivityStats: speakeasy-default-notifications-controller-get-activity-stats: responses: "200": - application/json: {"weeklySent": "7003.46", "monthlySent": "5588.34"} + application/json: {"weeklySent": 3704.56, "monthlySent": 9198.31} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} NotificationsController_getActivityGraphStats: speakeasy-default-notifications-controller-get-activity-graph-stats: responses: "200": - application/json: [{"_id": "", "count": "5588.34", "templates": ["", ""], "channels": ["push", "sms"]}, {"_id": "", "count": "4508.24", "templates": [""], "channels": []}] + application/json: [{"_id": "", "count": 4718.99, "templates": ["", "", ""], "channels": []}, {"_id": "", "count": 3081.94, "templates": ["", ""], "channels": ["email", "email"]}] "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - NotificationGroupsController_createNotificationGroup: - speakeasy-default-notification-groups-controller-create-notification-group: - requestBody: - application/json: {"name": ""} - responses: - "201": - application/json: {"name": "", "_environmentId": "", "_organizationId": ""} - NotificationGroupsController_listNotificationGroups: - speakeasy-default-notification-groups-controller-list-notification-groups: - responses: - "200": - application/json: [{"name": "", "_environmentId": "", "_organizationId": ""}, {"name": "", "_environmentId": "", "_organizationId": ""}, {"name": "", "_environmentId": "", "_organizationId": ""}] - NotificationGroupsController_getNotificationGroup: - speakeasy-default-notification-groups-controller-get-notification-group: - parameters: - path: - id: "" - responses: - "200": - application/json: {"name": "", "_environmentId": "", "_organizationId": ""} - NotificationGroupsController_updateNotificationGroup: - speakeasy-default-notification-groups-controller-update-notification-group: - parameters: - path: - id: "" - requestBody: - application/json: {"name": ""} - responses: - "200": - application/json: {"name": "", "_environmentId": "", "_organizationId": ""} - NotificationGroupsController_deleteNotificationGroup: - speakeasy-default-notification-groups-controller-delete-notification-group: - parameters: - path: - id: "" - responses: - "200": - application/json: {"acknowledged": false, "status": "deleted"} IntegrationsController_listIntegrations: speakeasy-default-integrations-controller-list-integrations: responses: "200": - application/json: [{"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "sms", "credentials": {}, "active": false, "deleted": true, "deletedAt": "", "deletedBy": "", "primary": true}, {"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "in_app", "credentials": {}, "active": false, "deleted": false, "deletedAt": "", "deletedBy": "", "primary": true}, {"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "chat", "credentials": {}, "active": true, "deleted": true, "deletedAt": "", "deletedBy": "", "primary": false}] + application/json: [{"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "sms", "credentials": {}, "active": false, "deleted": true, "primary": true}, {"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "in_app", "credentials": {}, "active": false, "deleted": false, "primary": true}, {"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "chat", "credentials": {}, "active": true, "deleted": true, "primary": false}] "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} IntegrationsController_createIntegration: @@ -838,32 +777,26 @@ examples: application/json: {"providerId": "", "channel": "sms"} responses: "201": - application/json: {"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "chat", "credentials": {}, "active": true, "deleted": true, "deletedAt": "", "deletedBy": "", "primary": true} + application/json: {"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "chat", "credentials": {}, "active": true, "deleted": true, "primary": true} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "200": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} IntegrationsController_getActiveIntegrations: speakeasy-default-integrations-controller-get-active-integrations: responses: "200": - application/json: [{"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "email", "credentials": {}, "active": true, "deleted": true, "deletedAt": "", "deletedBy": "", "primary": true}, {"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "chat", "credentials": {}, "active": false, "deleted": true, "deletedAt": "", "deletedBy": "", "primary": true}, {"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "chat", "credentials": {}, "active": false, "deleted": true, "deletedAt": "", "deletedBy": "", "primary": true}] + application/json: [{"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "email", "credentials": {}, "active": true, "deleted": true, "primary": true}, {"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "chat", "credentials": {}, "active": false, "deleted": true, "primary": true}, {"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "chat", "credentials": {}, "active": false, "deleted": true, "primary": true}] "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} IntegrationsController_updateIntegrationById: @@ -876,13 +809,13 @@ examples: application/json: {} responses: "200": - application/json: {"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "push", "credentials": {}, "active": false, "deleted": true, "deletedAt": "", "deletedBy": "", "primary": false} + application/json: {"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "push", "credentials": {}, "active": false, "deleted": true, "primary": false} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} IntegrationsController_removeIntegration: @@ -893,15 +826,13 @@ examples: header: {} responses: "200": - application/json: [{"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "chat", "credentials": {}, "active": true, "deleted": false, "deletedAt": "", "deletedBy": "", "primary": false}, {"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "chat", "credentials": {}, "active": true, "deleted": false, "deletedAt": "", "deletedBy": "", "primary": false}] + application/json: [{"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "chat", "credentials": {}, "active": true, "deleted": false, "primary": false}, {"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "chat", "credentials": {}, "active": true, "deleted": false, "primary": false}] "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} IntegrationsController_setIntegrationAsPrimary: @@ -912,13 +843,13 @@ examples: header: {} responses: "200": - application/json: {"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "push", "credentials": {}, "active": true, "deleted": true, "deletedAt": "", "deletedBy": "", "primary": false} + application/json: {"_environmentId": "", "_organizationId": "", "name": "", "identifier": "", "providerId": "", "channel": "email", "credentials": {}, "active": false, "deleted": false, "primary": true} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} IntegrationsController_getWebhookSupportStatus: @@ -931,28 +862,28 @@ examples: "200": application/json: true "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} SubscribersController_listSubscribers: speakeasy-default-subscribers-controller-list-subscribers: + parameters: + query: + limit: 10 + header: {} responses: "200": - application/json: {"page": "4610.08", "hasMore": true, "pageSize": "5984.80", "data": [{"subscriberId": "", "_organizationId": "", "_environmentId": "", "deleted": true, "createdAt": "", "updatedAt": ""}, {"subscriberId": "", "_organizationId": "", "_environmentId": "", "deleted": true, "createdAt": "", "updatedAt": ""}]} + application/json: {"page": 7685.78, "hasMore": false, "pageSize": 6783.17, "data": []} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} SubscribersController_createSubscriber: @@ -961,17 +892,13 @@ examples: application/json: {"subscriberId": ""} responses: "201": - application/json: {"subscriberId": "", "_organizationId": "", "_environmentId": "", "deleted": true, "createdAt": "", "updatedAt": ""} + application/json: {"subscriberId": "", "channels": [{"providerId": "fcm", "credentials": {"webhookUrl": "https://example.com/webhook", "channel": "general", "deviceTokens": ["token1", "token2", "token3"], "alertUid": "12345-abcde", "title": "Critical Alert", "imageUrl": "https://example.com/image.png", "state": "resolved", "externalUrl": "https://example.com/details"}, "_integrationId": ""}, {"providerId": "getstream", "credentials": {"webhookUrl": "https://example.com/webhook", "channel": "general", "deviceTokens": ["token1", "token2", "token3"], "alertUid": "12345-abcde", "title": "Critical Alert", "imageUrl": "https://example.com/image.png", "state": "resolved", "externalUrl": "https://example.com/details"}, "_integrationId": ""}], "_organizationId": "", "_environmentId": "", "deleted": true, "createdAt": "1708190069319", "updatedAt": "1737531684926"} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "200": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} SubscribersController_getSubscriber: @@ -983,15 +910,13 @@ examples: header: {} responses: "200": - application/json: {"subscriberId": "", "_organizationId": "", "_environmentId": "", "deleted": false, "createdAt": "", "updatedAt": ""} + application/json: {"subscriberId": "", "channels": [{"providerId": "push-webhook", "credentials": {"webhookUrl": "https://example.com/webhook", "channel": "general", "deviceTokens": ["token1", "token2", "token3"], "alertUid": "12345-abcde", "title": "Critical Alert", "imageUrl": "https://example.com/image.png", "state": "resolved", "externalUrl": "https://example.com/details"}, "_integrationId": ""}, {"providerId": "zulip", "credentials": {"webhookUrl": "https://example.com/webhook", "channel": "general", "deviceTokens": ["token1", "token2", "token3"], "alertUid": "12345-abcde", "title": "Critical Alert", "imageUrl": "https://example.com/image.png", "state": "resolved", "externalUrl": "https://example.com/details"}, "_integrationId": ""}], "_organizationId": "", "_environmentId": "", "deleted": true, "createdAt": "1708880388588", "updatedAt": "1737509135744"} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} SubscribersController_updateSubscriber: @@ -1004,15 +929,13 @@ examples: application/json: {"email": "john.doe@example.com", "firstName": "John", "lastName": "Doe", "phone": "+1234567890", "avatar": "https://example.com/avatar.jpg", "locale": "en-US", "data": {"preferences": {"notifications": true, "theme": "dark"}, "tags": ["premium", "newsletter"]}} responses: "200": - application/json: {"subscriberId": "", "_organizationId": "", "_environmentId": "", "deleted": false, "createdAt": "", "updatedAt": ""} + application/json: {"subscriberId": "", "channels": [{"providerId": "fcm", "credentials": {"webhookUrl": "https://example.com/webhook", "channel": "general", "deviceTokens": ["token1", "token2", "token3"], "alertUid": "12345-abcde", "title": "Critical Alert", "imageUrl": "https://example.com/image.png", "state": "resolved", "externalUrl": "https://example.com/details"}, "_integrationId": ""}, {"providerId": "zulip", "credentials": {"webhookUrl": "https://example.com/webhook", "channel": "general", "deviceTokens": ["token1", "token2", "token3"], "alertUid": "12345-abcde", "title": "Critical Alert", "imageUrl": "https://example.com/image.png", "state": "resolved", "externalUrl": "https://example.com/details"}, "_integrationId": ""}, {"providerId": "pusher-beams", "credentials": {"webhookUrl": "https://example.com/webhook", "channel": "general", "deviceTokens": ["token1", "token2", "token3"], "alertUid": "12345-abcde", "title": "Critical Alert", "imageUrl": "https://example.com/image.png", "state": "resolved", "externalUrl": "https://example.com/details"}, "_integrationId": ""}], "_organizationId": "", "_environmentId": "", "deleted": false, "createdAt": "1721429716849", "updatedAt": "1737547887655"} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} SubscribersController_removeSubscriber: @@ -1025,32 +948,26 @@ examples: "200": application/json: {"acknowledged": false, "status": "deleted"} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} SubscribersController_bulkCreateSubscribers: speakeasy-default-subscribers-controller-bulk-create-subscribers: requestBody: - application/json: {"subscribers": [{"subscriberId": "", "email": "example@example.com"}]} + application/json: {"subscribers": [{"subscriberId": ""}]} responses: - "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "200": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "201": - application/json: {"updated": [{"subscriberId": ""}], "created": [{"subscriberId": ""}, {"subscriberId": ""}, {"subscriberId": ""}], "failed": [{}]} + application/json: {"updated": [{"subscriberId": ""}, {"subscriberId": ""}, {"subscriberId": ""}], "created": [{"subscriberId": ""}, {"subscriberId": ""}, {"subscriberId": ""}], "failed": [{}, {}]} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} SubscribersController_updateSubscriberChannel: @@ -1060,18 +977,16 @@ examples: subscriberId: "" header: {} requestBody: - application/json: {"providerId": "pushpad", "credentials": {"webhookUrl": "https://example.com/webhook"}} + application/json: {"providerId": "pushpad", "credentials": {"webhookUrl": "https://example.com/webhook", "channel": "general", "deviceTokens": ["token1", "token2", "token3"], "alertUid": "12345-abcde", "title": "Critical Alert", "imageUrl": "https://example.com/image.png", "state": "resolved", "externalUrl": "https://example.com/details"}} responses: "200": - application/json: {"subscriberId": "", "_organizationId": "", "_environmentId": "", "deleted": true, "createdAt": "", "updatedAt": ""} + application/json: {"subscriberId": "", "channels": [{"providerId": "zulip", "credentials": {"webhookUrl": "https://example.com/webhook", "channel": "general", "deviceTokens": ["token1", "token2", "token3"], "alertUid": "12345-abcde", "title": "Critical Alert", "imageUrl": "https://example.com/image.png", "state": "resolved", "externalUrl": "https://example.com/details"}, "_integrationId": ""}, {"providerId": "pusher-beams", "credentials": {"webhookUrl": "https://example.com/webhook", "channel": "general", "deviceTokens": ["token1", "token2", "token3"], "alertUid": "12345-abcde", "title": "Critical Alert", "imageUrl": "https://example.com/image.png", "state": "resolved", "externalUrl": "https://example.com/details"}, "_integrationId": ""}], "_organizationId": "", "_environmentId": "", "deleted": false, "createdAt": "1721429716906", "updatedAt": "1737547887712"} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} SubscribersController_modifySubscriberChannel: @@ -1081,18 +996,16 @@ examples: subscriberId: "" header: {} requestBody: - application/json: {"providerId": "zulip", "credentials": {"webhookUrl": "https://example.com/webhook"}} + application/json: {"providerId": "zulip", "credentials": {"webhookUrl": "https://example.com/webhook", "channel": "general", "deviceTokens": ["token1", "token2", "token3"], "alertUid": "12345-abcde", "title": "Critical Alert", "imageUrl": "https://example.com/image.png", "state": "resolved", "externalUrl": "https://example.com/details"}} responses: "200": - application/json: {"subscriberId": "", "_organizationId": "", "_environmentId": "", "deleted": false, "createdAt": "", "updatedAt": ""} + application/json: {"subscriberId": "", "channels": [{"providerId": "pushpad", "credentials": {"webhookUrl": "https://example.com/webhook", "channel": "general", "deviceTokens": ["token1", "token2", "token3"], "alertUid": "12345-abcde", "title": "Critical Alert", "imageUrl": "https://example.com/image.png", "state": "resolved", "externalUrl": "https://example.com/details"}, "_integrationId": ""}, {"providerId": "apns", "credentials": {"webhookUrl": "https://example.com/webhook", "channel": "general", "deviceTokens": ["token1", "token2", "token3"], "alertUid": "12345-abcde", "title": "Critical Alert", "imageUrl": "https://example.com/image.png", "state": "resolved", "externalUrl": "https://example.com/details"}, "_integrationId": ""}], "_organizationId": "", "_environmentId": "", "deleted": false, "createdAt": "1737460724203", "updatedAt": "1737510674584"} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} SubscribersController_deleteSubscriberCredentials: @@ -1104,15 +1017,11 @@ examples: header: {} responses: "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "200": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} SubscribersController_updateSubscriberOnlineFlag: @@ -1122,18 +1031,16 @@ examples: subscriberId: "" header: {} requestBody: - application/json: {"isOnline": true} + application/json: {"isOnline": false} responses: "200": - application/json: {"subscriberId": "", "_organizationId": "", "_environmentId": "", "deleted": true, "createdAt": "", "updatedAt": ""} + application/json: {"subscriberId": "", "channels": [{"providerId": "one-signal", "credentials": {"webhookUrl": "https://example.com/webhook", "channel": "general", "deviceTokens": ["token1", "token2", "token3"], "alertUid": "12345-abcde", "title": "Critical Alert", "imageUrl": "https://example.com/image.png", "state": "resolved", "externalUrl": "https://example.com/details"}, "_integrationId": ""}, {"providerId": "mattermost", "credentials": {"webhookUrl": "https://example.com/webhook", "channel": "general", "deviceTokens": ["token1", "token2", "token3"], "alertUid": "12345-abcde", "title": "Critical Alert", "imageUrl": "https://example.com/image.png", "state": "resolved", "externalUrl": "https://example.com/details"}, "_integrationId": ""}], "_organizationId": "", "_environmentId": "", "deleted": false, "createdAt": "1732483151500", "updatedAt": "1737479755890"} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} SubscribersController_listSubscriberPreferences: @@ -1145,22 +1052,39 @@ examples: header: {} responses: "200": - application/json: [{"template": {"_id": "", "name": "", "critical": false, "triggers": [{"type": "event", "identifier": "", "variables": [{"name": ""}, {"name": ""}, {"name": ""}]}, {"type": "event", "identifier": "", "variables": [{"name": ""}, {"name": ""}]}]}, "preference": {"enabled": false, "channels": {}}}, {"template": {"_id": "", "name": "", "critical": false, "triggers": [{"type": "event", "identifier": "", "variables": [{"name": ""}, {"name": ""}]}]}, "preference": {"enabled": true, "channels": {}}}] + application/json: [{"template": {"_id": "", "name": "", "critical": false, "triggers": [{"type": "event", "identifier": "", "variables": []}, {"type": "event", "identifier": "", "variables": []}]}, "preference": {"enabled": true, "channels": {}}}, {"template": {"_id": "", "name": "", "critical": false, "triggers": [{"type": "event", "identifier": "", "variables": []}, {"type": "event", "identifier": "", "variables": [{"name": ""}, {"name": ""}]}]}, "preference": {"enabled": true, "channels": {}}}, {"template": {"_id": "", "name": "", "critical": true, "triggers": [{"type": "event", "identifier": "", "variables": [{"name": ""}, {"name": ""}]}, {"type": "event", "identifier": "", "variables": [{"name": ""}, {"name": ""}]}]}, "preference": {"enabled": true, "channels": {}}}] "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "422": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + SubscribersController_updateSubscriberGlobalPreferences: + speakeasy-default-subscribers-controller-update-subscriber-global-preferences: + parameters: + path: + subscriberId: "" + header: {} + requestBody: + application/json: {} + responses: + "200": + application/json: {"preference": {"enabled": true, "channels": {}}} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} SubscribersController_getSubscriberPreferenceByLevel: speakeasy-default-subscribers-controller-get-subscriber-preference-by-level: parameters: path: - parameter: "global" + parameter: "template" subscriberId: "" query: {} header: {} @@ -1168,13 +1092,11 @@ examples: "200": application/json: [{"preference": {"enabled": true, "channels": {}}}, {"preference": {"enabled": true, "channels": {}}}] "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} SubscribersController_updateSubscriberPreference: @@ -1182,21 +1104,19 @@ examples: parameters: path: subscriberId: "" - parameter: "exampleValue" + parameter: "" header: {} requestBody: application/json: {} responses: "200": - application/json: {"template": {"_id": "", "name": "", "critical": false, "triggers": [{"type": "event", "identifier": "", "variables": [{"name": ""}, {"name": ""}, {"name": ""}]}, {"type": "event", "identifier": "", "variables": [{"name": ""}, {"name": ""}]}]}, "preference": {"enabled": true, "channels": {}}} + application/json: {"template": {"_id": "", "name": "", "critical": false, "triggers": [{"type": "event", "identifier": "", "variables": [{"name": ""}]}, {"type": "event", "identifier": "", "variables": [{"name": ""}, {"name": ""}, {"name": ""}]}]}, "preference": {"enabled": false, "channels": {}}} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} SubscribersController_getNotificationsFeed: @@ -1205,196 +1125,158 @@ examples: path: subscriberId: "" query: + limit: 10 payload: "btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30=" header: {} responses: "200": - application/json: {"hasMore": true, "data": [{"_id": "", "_templateId": "", "_environmentId": "", "_messageTemplateId": "", "_organizationId": "", "_notificationId": "", "_subscriberId": "", "_feedId": "", "_jobId": "", "transactionId": "", "content": "", "channel": "push", "read": false, "seen": false, "deleted": false, "cta": {}, "status": "warning", "payload": {"key": "value"}}, {"_id": "", "_templateId": "", "_environmentId": "", "_messageTemplateId": "", "_organizationId": "", "_notificationId": "", "_subscriberId": "", "_feedId": "", "_jobId": "", "transactionId": "", "content": "", "channel": "sms", "read": true, "seen": false, "deleted": true, "cta": {}, "status": "warning", "payload": {"key": "value"}}], "pageSize": "9643.05", "page": "1526.70"} + application/json: {"totalCount": 5, "hasMore": true, "data": [{"_id": "615c1f2f9b0c5b001f8e4e3b", "_templateId": "template_12345", "_environmentId": "env_67890", "_messageTemplateId": "message_template_54321", "_organizationId": "org_98765", "_notificationId": "notification_123456", "_subscriberId": "subscriber_112233", "_feedId": "feed_445566", "_jobId": "job_778899", "createdAt": "2024-12-10T10:10:59.639Z", "updatedAt": "2024-12-10T10:10:59.639Z", "actor": {"data": null, "type": "system_icon"}, "transactionId": "transaction_123456", "templateIdentifier": "template_abcdef", "providerId": "provider_xyz", "content": "This is a test notification content.", "subject": "Test Notification Subject", "channel": "push", "read": false, "seen": true, "deleted": false, "deviceTokens": ["token1", "token2"], "cta": {"data": {}}, "status": "sent", "payload": {"key": "value"}, "overrides": {"overrideKey": "overrideValue"}}, {"_id": "615c1f2f9b0c5b001f8e4e3b", "_templateId": "template_12345", "_environmentId": "env_67890", "_messageTemplateId": "message_template_54321", "_organizationId": "org_98765", "_notificationId": "notification_123456", "_subscriberId": "subscriber_112233", "_feedId": "feed_445566", "_jobId": "job_778899", "createdAt": "2024-12-10T10:10:59.639Z", "updatedAt": "2024-12-10T10:10:59.639Z", "actor": {"data": null, "type": "system_icon"}, "transactionId": "transaction_123456", "templateIdentifier": "template_abcdef", "providerId": "provider_xyz", "content": "This is a test notification content.", "subject": "Test Notification Subject", "channel": "push", "read": false, "seen": true, "deleted": false, "deviceTokens": ["token1", "token2"], "cta": {"data": {}}, "status": "sent", "payload": {"key": "value"}, "overrides": {"overrideKey": "overrideValue"}}, {"_id": "615c1f2f9b0c5b001f8e4e3b", "_templateId": "template_12345", "_environmentId": "env_67890", "_messageTemplateId": "message_template_54321", "_organizationId": "org_98765", "_notificationId": "notification_123456", "_subscriberId": "subscriber_112233", "_feedId": "feed_445566", "_jobId": "job_778899", "createdAt": "2024-12-10T10:10:59.639Z", "updatedAt": "2024-12-10T10:10:59.639Z", "actor": {"data": null, "type": "system_icon"}, "transactionId": "transaction_123456", "templateIdentifier": "template_abcdef", "providerId": "provider_xyz", "content": "This is a test notification content.", "subject": "Test Notification Subject", "channel": "in_app", "read": false, "seen": true, "deleted": false, "deviceTokens": ["token1", "token2"], "cta": {"data": {}}, "status": "sent", "payload": {"key": "value"}, "overrides": {"overrideKey": "overrideValue"}}], "pageSize": 2, "page": 1} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"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": {"0": {"key": "", "key1": "", "key2": ""}, "1": {"key": "", "key1": ""}}}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"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"}}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - SubscribersController_markMessagesAs: - speakeasy-default-subscribers-controller-mark-messages-as: + SubscribersController_getUnseenCount: + speakeasy-default-subscribers-controller-get-unseen-count: parameters: path: subscriberId: "" + query: + seen: false + limit: 100 header: {} - requestBody: - application/json: {"messageId": "", "markAs": "read"} responses: - "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "201": - application/json: [] "200": + application/json: {"count": 2166.35} + "400": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - SubscribersController_chatOauthCallback: - speakeasy-default-subscribers-controller-chat-oauth-callback: + SubscribersController_markMessagesAs: + speakeasy-default-subscribers-controller-mark-messages-as: parameters: path: subscriberId: "" - providerId: "" - query: - code: "" - hmacHash: "" - environmentId: "" header: {} + requestBody: + application/json: {"messageId": "", "markAs": "unread"} responses: + "201": + application/json: [{"_templateId": "", "_environmentId": "", "_messageTemplateId": "", "_organizationId": "", "_notificationId": "", "_subscriberId": "", "subscriber": {"subscriberId": "", "channels": [{"providerId": "pusher-beams", "credentials": {"webhookUrl": "https://example.com/webhook", "channel": "general", "deviceTokens": ["token1", "token2", "token3"], "alertUid": "12345-abcde", "title": "Critical Alert", "imageUrl": "https://example.com/image.png", "state": "resolved", "externalUrl": "https://example.com/details"}, "_integrationId": ""}, {"providerId": "ryver", "credentials": {"webhookUrl": "https://example.com/webhook", "channel": "general", "deviceTokens": ["token1", "token2", "token3"], "alertUid": "12345-abcde", "title": "Critical Alert", "imageUrl": "https://example.com/image.png", "state": "resolved", "externalUrl": "https://example.com/details"}, "_integrationId": ""}], "_organizationId": "", "_environmentId": "", "deleted": true, "createdAt": "1724060927125", "updatedAt": "1737530989538"}, "createdAt": "1727359970915", "content": {"type": "button", "content": ""}, "transactionId": "", "channel": "email", "read": false, "seen": true, "cta": {"data": {}}, "status": "error"}] "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "200": - application/json: "{}" - text/html: "" - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} - "302": - application/json: "" + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - SubscribersController_chatAccessOauth: - speakeasy-default-subscribers-controller-chat-access-oauth: + SubscribersController_markAllUnreadAsRead: + speakeasy-default-subscribers-controller-mark-all-unread-as-read: parameters: path: subscriberId: "" - providerId: "" - query: - hmacHash: "" - environmentId: "" header: {} + requestBody: + application/json: {"markAs": "seen"} responses: + "201": + application/json: 4603.37 "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - SubscribersController_updateSubscriberGlobalPreferences: - speakeasy-default-subscribers-controller-update-subscriber-global-preferences: + SubscribersController_markActionAsSeen: + speakeasy-default-subscribers-controller-mark-action-as-seen: parameters: path: + messageId: "" + type: "" subscriberId: "" header: {} requestBody: - application/json: {} + application/json: {"status": "done"} responses: - "200": - application/json: {"preference": {"enabled": true, "channels": {}}} + "201": + application/json: {"_templateId": "", "_environmentId": "", "_messageTemplateId": "", "_organizationId": "", "_notificationId": "", "_subscriberId": "", "subscriber": {"subscriberId": "", "channels": [{"providerId": "push-webhook", "credentials": {"webhookUrl": "https://example.com/webhook", "channel": "general", "deviceTokens": ["token1", "token2", "token3"], "alertUid": "12345-abcde", "title": "Critical Alert", "imageUrl": "https://example.com/image.png", "state": "resolved", "externalUrl": "https://example.com/details"}, "_integrationId": ""}, {"providerId": "ryver", "credentials": {"webhookUrl": "https://example.com/webhook", "channel": "general", "deviceTokens": ["token1", "token2", "token3"], "alertUid": "12345-abcde", "title": "Critical Alert", "imageUrl": "https://example.com/image.png", "state": "resolved", "externalUrl": "https://example.com/details"}, "_integrationId": ""}], "_organizationId": "", "_environmentId": "", "deleted": true, "createdAt": "1736486236979", "updatedAt": "1737476203680"}, "createdAt": "1714068779677", "content": {"type": "text", "content": ""}, "transactionId": "", "channel": "sms", "read": true, "seen": true, "cta": {"data": {}}, "status": "sent"} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - SubscribersController_getUnseenCount: - speakeasy-default-subscribers-controller-get-unseen-count: + SubscribersController_chatOauthCallback: + speakeasy-default-subscribers-controller-chat-oauth-callback: parameters: path: subscriberId: "" + providerId: "" query: - seen: false - limit: "2979.49" + hmacHash: "" + environmentId: "" + code: "" header: {} responses: "200": - application/json: {"count": "5438.83"} + text/html: "" + "302": + application/json: "" "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} - "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - "500": + "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - SubscribersController_markAllUnreadAsRead: - speakeasy-default-subscribers-controller-mark-all-unread-as-read: - parameters: - path: - subscriberId: "" - header: {} - requestBody: - application/json: {"markAs": "seen"} - responses: - "201": - application/json: "4603.37" - "200": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} "422": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} - "414": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - SubscribersController_markActionAsSeen: - speakeasy-default-subscribers-controller-mark-action-as-seen: + SubscribersController_chatAccessOauth: + speakeasy-default-subscribers-controller-chat-access-oauth: parameters: path: - messageId: "" - type: "" subscriberId: "" + providerId: "" + query: + hmacHash: "" + environmentId: "" header: {} - requestBody: - application/json: {"status": "done"} responses: - "201": - application/json: {"_templateId": "", "_environmentId": "", "_messageTemplateId": "", "_organizationId": "", "_notificationId": "", "_subscriberId": "", "createdAt": "", "content": {"type": "text", "content": ""}, "transactionId": "", "channel": "email", "read": true, "seen": false, "cta": {}, "status": "sent", "errorId": "", "errorText": ""} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "200": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} MessagesController_getMessages: speakeasy-default-messages-controller-get-messages: + parameters: + query: + page: 0 + limit: 10 + header: {} responses: "200": - application/json: {"hasMore": false, "data": [{"_environmentId": "", "_organizationId": "", "_subscriberId": "", "transactionId": ""}, {"_environmentId": "", "_organizationId": "", "_subscriberId": "", "transactionId": ""}], "pageSize": "5442.21", "page": "5212.35"} + application/json: {"hasMore": true, "data": [{"_environmentId": "", "_organizationId": "", "_subscriberId": "", "transactionId": ""}, {"_environmentId": "", "_organizationId": "", "_subscriberId": "", "transactionId": ""}, {"_environmentId": "", "_organizationId": "", "_subscriberId": "", "transactionId": ""}], "pageSize": 3129.93, "page": 3234.02} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} MessagesController_deleteMessage: @@ -1407,13 +1289,11 @@ examples: "200": application/json: {"acknowledged": false, "status": "deleted"} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} MessagesController_deleteMessagesByTransactionId: @@ -1425,15 +1305,11 @@ examples: header: {} responses: "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "200": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} TopicsController_createTopic: @@ -1444,28 +1320,14 @@ examples: "201": application/json: {"key": ""} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "200": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} TopicsController_listTopics: - speakeasy-default-topics-controller-list-topics: - responses: - "200": - application/json: {"data": [{"_organizationId": "", "_environmentId": "", "key": "", "name": "", "subscribers": []}], "page": "5984.80", "pageSize": "6512.03", "totalCount": "163.09"} - "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "": parameters: query: @@ -1478,10 +1340,10 @@ examples: application/json: {"data": [], "page": 1, "pageSize": 10, "totalCount": 10} "400": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"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": "", "key1": ""}}}} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"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"}}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} TopicsController_deleteTopic: @@ -1492,13 +1354,11 @@ examples: header: {} responses: "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "200": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} TopicsController_getTopic: @@ -1509,15 +1369,13 @@ examples: header: {} responses: "200": - application/json: {"_organizationId": "", "_environmentId": "", "key": "", "name": "", "subscribers": ["", ""]} + application/json: {"_organizationId": "", "_environmentId": "", "key": "", "name": "", "subscribers": [""]} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} TopicsController_renameTopic: @@ -1532,61 +1390,11 @@ examples: "200": application/json: {"_organizationId": "", "_environmentId": "", "key": "", "name": "", "subscribers": ["", "", ""]} "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} - "414": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - TopicsController_addSubscribers: - speakeasy-default-topics-controller-add-subscribers: - parameters: - path: - topicKey: "" - requestBody: - application/json: {"subscribers": ["", ""]} - TopicsController_getTopicSubscriber: - speakeasy-default-topics-controller-get-topic-subscriber: - parameters: - path: - externalSubscriberId: "" - topicKey: "" - header: {} - responses: - "200": - application/json: {"_organizationId": "org_123456789", "_environmentId": "env_123456789", "_subscriberId": "sub_123456789", "_topicId": "topic_123456789", "topicKey": "my_topic_key", "externalSubscriberId": "external_subscriber_123"} - "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - "500": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - TopicsController_removeSubscribers: - speakeasy-default-topics-controller-remove-subscribers: - parameters: - path: - topicKey: "" - header: {} - requestBody: - application/json: {"subscribers": ["", ""]} - responses: - "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "200": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "422": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} - "414": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} TopicsController_assign: @@ -1598,124 +1406,26 @@ examples: requestBody: application/json: {"subscribers": ["", "", ""]} responses: - "201": - application/json: {"succeeded": []} "200": - application/json: {"succeeded": ["", "", ""]} - "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found."} - "404": - application/json: {"data": {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"}} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} - "414": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - "500": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - TestApiRateLimitController_noCategoryNoCost: - speakeasy-default-test-api-rate-limit-controller-no-category-no-cost: - responses: - "200": - application/json: true - TestApiRateLimitController_noCategorySingleCost: - speakeasy-default-test-api-rate-limit-controller-no-category-single-cost: - responses: - "200": - application/json: false - TestApiRateLimitController_globalCategoryNoCost: - speakeasy-default-test-api-rate-limit-controller-global-category-no-cost: - responses: - "200": - application/json: false - TestApiRateLimitController_globalCategorySingleCost: - speakeasy-default-test-api-rate-limit-controller-global-category-single-cost: - responses: - "200": - application/json: false - TestApiRateLimitController_global: - speakeasy-default-test-api-rate-limit-controller-global: - responses: - "200": - application/json: true - TestApiRateLimitController_triggerCategoryNoCost: - speakeasy-default-test-api-rate-limit-controller-trigger-category-no-cost: - responses: - "200": - application/json: false - TestApiRateLimitController_triggerCategorySingleCost: - speakeasy-default-test-api-rate-limit-controller-trigger-category-single-cost: - responses: - "200": - application/json: true - TestApiRateLimitController_triggerCategoryBulkCost: - speakeasy-default-test-api-rate-limit-controller-trigger-category-bulk-cost: - responses: - "200": - application/json: false - TestApiRateLimitBulkController_noCategoryNoCostOverride: - speakeasy-default-test-api-rate-limit-bulk-controller-no-category-no-cost-override: - responses: - "200": - application/json: false - TestApiRateLimitBulkController_noCategorySingleCostOverride: - speakeasy-default-test-api-rate-limit-bulk-controller-no-category-single-cost-override: - responses: - "200": - application/json: false - TestApiRateLimitBulkController_globalCategoryNoCostOverride: - speakeasy-default-test-api-rate-limit-bulk-controller-global-category-no-cost-override: - responses: - "200": - application/json: false - TestApiAuthController_userRoute: - speakeasy-default-test-api-auth-controller-user-route: - responses: - "200": - application/json: true - TestingController_idempotency: - speakeasy-default-testing-controller-idempotency: - requestBody: - application/json: {"data": "6704.42"} - responses: + application/json: {"succeeded": []} "400": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - "422": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} - "200": - application/json: {} - "201": - application/json: {"number": 3087.15} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - "500": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - TestingController_idempotencyGet: - speakeasy-default-testing-controller-idempotency-get: - responses: - "400": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "422": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} - "200": - application/json: {} - "201": - application/json: {"number": 8596.5} - "414": - application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - HealthController_healthCheck: - speakeasy-default-health-controller-health-check: + TopicsController_getTopicSubscriber: + speakeasy-default-topics-controller-get-topic-subscriber: + parameters: + path: + externalSubscriberId: "" + topicKey: "" + header: {} responses: "200": - application/json: {"status": "ok", "info": {"database": {"status": "up"}}, "details": {"database": {"status": "up"}}} - "503": - application/json: {"status": "error", "info": {"database": {"status": "up"}}, "error": {"redis": {"status": "down", "message": "Could not connect"}}, "details": {"database": {"status": "up"}, "redis": {"status": "down", "message": "Could not connect"}}} - HealthController_testIdempotency: - speakeasy-default-health-controller-test-idempotency: - requestBody: - application/json: {"expectedBehavior": "IMMEDIATE_EXCEPTION"} - responses: + application/json: {"_organizationId": "org_123456789", "_environmentId": "env_123456789", "_subscriberId": "sub_123456789", "_topicId": "topic_123456789", "topicKey": "my_topic_key", "externalSubscriberId": "external_subscriber_123"} "400": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": @@ -1724,13 +1434,15 @@ examples: application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} - "201": - application/json: {"number": 1} - HealthController_generateRandomNumber: - speakeasy-default-health-controller-generate-random-number: + TopicsController_removeSubscribers: + speakeasy-default-topics-controller-remove-subscribers: + parameters: + path: + topicKey: "" + header: {} + requestBody: + application/json: {"subscribers": ["", ""]} responses: - "201": - application/json: {"number": 1} "400": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "414": @@ -1739,6 +1451,7 @@ examples: application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName2": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName3": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}, "fieldName4": {"messages": ["Field is required", "Invalid format"], "value": "xx xx xx "}}} "500": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "Resource not found.", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} +examplesVersion: 1.0.0 generatedTests: EventsController_trigger: "2024-12-24T08:36:06+01:00" EventsController_triggerBulk: "2024-12-24T08:36:06+01:00" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 25ce1bf6..adfbab46 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -13,7 +13,7 @@ generation: oAuth2ClientCredentialsEnabled: false oAuth2PasswordEnabled: false typescript: - version: 0.1.0 + version: 0.1.1 additionalDependencies: dependencies: {} devDependencies: {} diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index ae4ebd60..f76f245d 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,27 +1,28 @@ -speakeasyVersion: 1.469.0 +speakeasyVersion: 1.469.12 sources: json-development: sourceNamespace: json-development - sourceRevisionDigest: sha256:f86a7c4644f11cb6d3c8f6f55be75b5176a72b6796ffb020f3f74e4f56ba39d4 - sourceBlobDigest: sha256:9f11c13a8f35483564a47ef29be554048b0cc6c518f6bc21ec2ce8995e9b59bb + sourceRevisionDigest: sha256:fce0b7834d55907e3b8d01d1486c6fc6cbb0bcf94ffd7cfbd898846dd39cf80b + sourceBlobDigest: sha256:00b66cd55839a01404e2056d1e3bd93db169ec0df788e1b7c65517b6626028e4 tags: - latest + - speakeasy-sdk-regen-1737549251 - "1.0" targets: my-first-target: source: json-development sourceNamespace: json-development - sourceRevisionDigest: sha256:f86a7c4644f11cb6d3c8f6f55be75b5176a72b6796ffb020f3f74e4f56ba39d4 - sourceBlobDigest: sha256:9f11c13a8f35483564a47ef29be554048b0cc6c518f6bc21ec2ce8995e9b59bb + sourceRevisionDigest: sha256:fce0b7834d55907e3b8d01d1486c6fc6cbb0bcf94ffd7cfbd898846dd39cf80b + sourceBlobDigest: sha256:00b66cd55839a01404e2056d1e3bd93db169ec0df788e1b7c65517b6626028e4 codeSamplesNamespace: code-samples-typescript - codeSamplesRevisionDigest: sha256:d2ee210eda22dfe3f16ea4c82effabf47936ef8afad1ff6403e12b0de808a03a + codeSamplesRevisionDigest: sha256:dde878b566b18bcb16813f72494e9bfb4d0d3105fc700521fc9a228348a28c34 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest sources: json-development: inputs: - - location: http://127.0.0.1:3000/openapi.sdk.yaml + - location: https://api.novu.co/openapi.sdk.yaml overlays: - location: .speakeasy/speakeasy-modifications-overlay.yaml output: sources/json-development.json diff --git a/FUNCTIONS.md b/FUNCTIONS.md index c9b1a5c4..243e9da2 100644 --- a/FUNCTIONS.md +++ b/FUNCTIONS.md @@ -32,16 +32,23 @@ const novu = new NovuCore({ async function run() { const res = await trigger(novu, { name: "workflow_identifier", - to: [ - { - topicKey: "", - type: "Topic", + payload: { + "comment_id": "string", + "post": { + "text": "string", }, - { - topicKey: "", - type: "Topic", + }, + bridgeUrl: "https://example.com/bridge", + overrides: { + "fcm": { + "data": { + "key": "value", + }, }, - ], + }, + to: { + subscriberId: "", + }, }); switch (true) { diff --git a/README.md b/README.md index b0dca4e3..b1b97445 100644 --- a/README.md +++ b/README.md @@ -89,16 +89,23 @@ const novu = new Novu({ async function run() { const result = await novu.trigger({ name: "workflow_identifier", - to: [ - { - topicKey: "", - type: "Topic", + payload: { + "comment_id": "string", + "post": { + "text": "string", }, - { - topicKey: "", - type: "Topic", + }, + bridgeUrl: "https://example.com/bridge", + overrides: { + "fcm": { + "data": { + "key": "value", + }, }, - ], + }, + to: { + subscriberId: "", + }, }); // Handle the result @@ -123,31 +130,66 @@ async function run() { events: [ { name: "workflow_identifier", - to: [ - { - topicKey: "", - type: "Topic", + payload: { + "comment_id": "string", + "post": { + "text": "string", }, - { - subscriberId: "", + }, + bridgeUrl: "https://example.com/bridge", + overrides: { + "fcm": { + "data": { + "key": "value", + }, }, - ], - }, - { - name: "workflow_identifier", - to: [], + }, + to: { + subscriberId: "", + }, }, { name: "workflow_identifier", + payload: { + "comment_id": "string", + "post": { + "text": "string", + }, + }, + bridgeUrl: "https://example.com/bridge", + overrides: { + "fcm": { + "data": { + "key": "value", + }, + }, + }, to: [ { topicKey: "", - type: "Topic", + type: "Subscriber", }, - { - topicKey: "", - type: "Topic", + ], + }, + { + name: "workflow_identifier", + payload: { + "comment_id": "string", + "post": { + "text": "string", + }, + }, + bridgeUrl: "https://example.com/bridge", + overrides: { + "fcm": { + "data": { + "key": "value", + }, }, + }, + to: [ + "SUBSCRIBER_ID", + "SUBSCRIBER_ID", ], }, ], @@ -251,6 +293,8 @@ run(); * [triggerBulk](docs/sdks/novu/README.md#triggerbulk) - Bulk trigger event * [triggerBroadcast](docs/sdks/novu/README.md#triggerbroadcast) - Broadcast event to all * [cancel](docs/sdks/novu/README.md#cancel) - Cancel triggered event +* [supportControllerFetchUserOrganizations](docs/sdks/novu/README.md#supportcontrollerfetchuserorganizations) +* [create](docs/sdks/novu/README.md#create) ### [subscribers](docs/sdks/subscribers/README.md) @@ -327,6 +371,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). Available standalone functions - [`cancel`](docs/sdks/novu/README.md#cancel) - Cancel triggered event +- [`create`](docs/sdks/novu/README.md#create) - [`integrationsCreate`](docs/sdks/integrations/README.md#create) - Create integration - [`integrationsDelete`](docs/sdks/integrations/README.md#delete) - Delete integration - [`integrationsList`](docs/sdks/integrations/README.md#list) - Get integrations @@ -362,6 +407,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). - [`subscribersPropertiesUpdateOnlineFlag`](docs/sdks/properties/README.md#updateonlineflag) - Update subscriber online status - [`subscribersRetrieve`](docs/sdks/subscribers/README.md#retrieve) - Get subscriber - [`subscribersUpdate`](docs/sdks/subscribers/README.md#update) - Update subscriber +- [`supportControllerFetchUserOrganizations`](docs/sdks/novu/README.md#supportcontrollerfetchuserorganizations) - [`topicsCreate`](docs/sdks/topics/README.md#create) - Topic creation - [`topicsDelete`](docs/sdks/topics/README.md#delete) - Delete topic - [`topicsList`](docs/sdks/topics/README.md#list) - Get topic list filtered @@ -397,7 +443,7 @@ const novu = new Novu({ }); async function run() { - const result = await novu.subscribers.list(); + const result = await novu.subscribers.list(10); for await (const page of result) { // Handle the page @@ -442,16 +488,23 @@ async function run() { try { result = await novu.trigger({ name: "workflow_identifier", - to: [ - { - topicKey: "", - type: "Topic", + payload: { + "comment_id": "string", + "post": { + "text": "string", }, - { - topicKey: "", - type: "Topic", + }, + bridgeUrl: "https://example.com/bridge", + overrides: { + "fcm": { + "data": { + "key": "value", + }, }, - ], + }, + to: { + subscriberId: "", + }, }); // Handle the result @@ -536,16 +589,23 @@ const novu = new Novu({ async function run() { const result = await novu.trigger({ name: "workflow_identifier", - to: [ - { - topicKey: "", - type: "Topic", + payload: { + "comment_id": "string", + "post": { + "text": "string", }, - { - topicKey: "", - type: "Topic", + }, + bridgeUrl: "https://example.com/bridge", + overrides: { + "fcm": { + "data": { + "key": "value", + }, }, - ], + }, + to: { + subscriberId: "", + }, }); // Handle the result @@ -570,16 +630,23 @@ const novu = new Novu({ async function run() { const result = await novu.trigger({ name: "workflow_identifier", - to: [ - { - topicKey: "", - type: "Topic", + payload: { + "comment_id": "string", + "post": { + "text": "string", }, - { - topicKey: "", - type: "Topic", + }, + bridgeUrl: "https://example.com/bridge", + overrides: { + "fcm": { + "data": { + "key": "value", + }, }, - ], + }, + to: { + subscriberId: "", + }, }); // Handle the result @@ -662,16 +729,23 @@ const novu = new Novu({ async function run() { const result = await novu.trigger({ name: "workflow_identifier", - to: [ - { - topicKey: "", - type: "Topic", + payload: { + "comment_id": "string", + "post": { + "text": "string", }, - { - topicKey: "", - type: "Topic", + }, + bridgeUrl: "https://example.com/bridge", + overrides: { + "fcm": { + "data": { + "key": "value", + }, }, - ], + }, + to: { + subscriberId: "", + }, }); // Handle the result @@ -699,16 +773,23 @@ const novu = new Novu({ async function run() { const result = await novu.trigger({ name: "workflow_identifier", - to: [ - { - topicKey: "", - type: "Topic", + payload: { + "comment_id": "string", + "post": { + "text": "string", }, - { - topicKey: "", - type: "Topic", + }, + bridgeUrl: "https://example.com/bridge", + overrides: { + "fcm": { + "data": { + "key": "value", + }, }, - ], + }, + to: { + subscriberId: "", + }, }, { retries: { strategy: "backoff", @@ -751,16 +832,23 @@ const novu = new Novu({ async function run() { const result = await novu.trigger({ name: "workflow_identifier", - to: [ - { - topicKey: "", - type: "Topic", + payload: { + "comment_id": "string", + "post": { + "text": "string", }, - { - topicKey: "", - type: "Topic", + }, + bridgeUrl: "https://example.com/bridge", + overrides: { + "fcm": { + "data": { + "key": "value", + }, }, - ], + }, + to: { + subscriberId: "", + }, }); // Handle the result diff --git a/RELEASES.md b/RELEASES.md index eb761a86..9dea1ba0 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -48,4 +48,14 @@ Based on: ### Generated - [typescript v0.0.1-alpha.11] . ### Releases -- [NPM v0.0.1-alpha.11] https://www.npmjs.com/package/@novu/api/v/0.0.1-alpha.11 - . \ No newline at end of file +- [NPM v0.0.1-alpha.11] https://www.npmjs.com/package/@novu/api/v/0.0.1-alpha.11 - . + +## 2025-01-22 12:33:53 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.469.12 (2.493.34) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v0.1.1] . +### Releases +- [NPM v0.1.1] https://www.npmjs.com/package/@novu/api/v/0.1.1 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index c107964a..3c8e34fc 100644 --- a/USAGE.md +++ b/USAGE.md @@ -11,16 +11,23 @@ const novu = new Novu({ async function run() { const result = await novu.trigger({ name: "workflow_identifier", - to: [ - { - topicKey: "", - type: "Topic", + payload: { + "comment_id": "string", + "post": { + "text": "string", }, - { - topicKey: "", - type: "Topic", + }, + bridgeUrl: "https://example.com/bridge", + overrides: { + "fcm": { + "data": { + "key": "value", + }, }, - ], + }, + to: { + subscriberId: "", + }, }); // Handle the result @@ -45,31 +52,66 @@ async function run() { events: [ { name: "workflow_identifier", - to: [ - { - topicKey: "", - type: "Topic", + payload: { + "comment_id": "string", + "post": { + "text": "string", }, - { - subscriberId: "", + }, + bridgeUrl: "https://example.com/bridge", + overrides: { + "fcm": { + "data": { + "key": "value", + }, }, - ], - }, - { - name: "workflow_identifier", - to: [], + }, + to: { + subscriberId: "", + }, }, { name: "workflow_identifier", + payload: { + "comment_id": "string", + "post": { + "text": "string", + }, + }, + bridgeUrl: "https://example.com/bridge", + overrides: { + "fcm": { + "data": { + "key": "value", + }, + }, + }, to: [ { topicKey: "", - type: "Topic", + type: "Subscriber", }, - { - topicKey: "", - type: "Topic", + ], + }, + { + name: "workflow_identifier", + payload: { + "comment_id": "string", + "post": { + "text": "string", + }, + }, + bridgeUrl: "https://example.com/bridge", + overrides: { + "fcm": { + "data": { + "key": "value", + }, }, + }, + to: [ + "SUBSCRIBER_ID", + "SUBSCRIBER_ID", ], }, ], diff --git a/docs/models/components/createsupportthreaddto.md b/docs/models/components/createsupportthreaddto.md new file mode 100644 index 00000000..ad17042e --- /dev/null +++ b/docs/models/components/createsupportthreaddto.md @@ -0,0 +1,17 @@ +# CreateSupportThreadDto + +## Example Usage + +```typescript +import { CreateSupportThreadDto } from "@novu/api/models/components"; + +let value: CreateSupportThreadDto = { + text: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `text` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/customer.md b/docs/models/components/customer.md new file mode 100644 index 00000000..c262bfaf --- /dev/null +++ b/docs/models/components/customer.md @@ -0,0 +1,14 @@ +# Customer + +## Example Usage + +```typescript +import { Customer } from "@novu/api/models/components"; + +let value: Customer = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/messageresponsedto.md b/docs/models/components/messageresponsedto.md index 1e4f02ca..b866e8d3 100644 --- a/docs/models/components/messageresponsedto.md +++ b/docs/models/components/messageresponsedto.md @@ -37,10 +37,10 @@ let value: MessageResponseDto = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1705930183124", - updatedAt: "1737041469522", + createdAt: "1706382690834", + updatedAt: "1737493977233", }, - createdAt: "1728581749425", + createdAt: "1729034257137", content: { type: "text", content: "", diff --git a/docs/models/components/plaincardrequestdto.md b/docs/models/components/plaincardrequestdto.md new file mode 100644 index 00000000..ebbdc741 --- /dev/null +++ b/docs/models/components/plaincardrequestdto.md @@ -0,0 +1,21 @@ +# PlainCardRequestDto + +## Example Usage + +```typescript +import { PlainCardRequestDto } from "@novu/api/models/components"; + +let value: PlainCardRequestDto = { + timestamp: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `cardKeys` | *string*[] | :heavy_minus_sign: | N/A | +| `customer` | [components.Customer](../../models/components/customer.md) | :heavy_minus_sign: | N/A | +| `tenant` | [components.PlainCardRequestDtoTenant](../../models/components/plaincardrequestdtotenant.md) | :heavy_minus_sign: | N/A | +| `thread` | [components.Thread](../../models/components/thread.md) | :heavy_minus_sign: | N/A | +| `timestamp` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/plaincardrequestdtotenant.md b/docs/models/components/plaincardrequestdtotenant.md new file mode 100644 index 00000000..5d254d3e --- /dev/null +++ b/docs/models/components/plaincardrequestdtotenant.md @@ -0,0 +1,14 @@ +# PlainCardRequestDtoTenant + +## Example Usage + +```typescript +import { PlainCardRequestDtoTenant } from "@novu/api/models/components"; + +let value: PlainCardRequestDtoTenant = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/subscriberresponsedto.md b/docs/models/components/subscriberresponsedto.md index 9dddda86..672fe014 100644 --- a/docs/models/components/subscriberresponsedto.md +++ b/docs/models/components/subscriberresponsedto.md @@ -30,8 +30,8 @@ let value: SubscriberResponseDto = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1733688461712", - updatedAt: "1737080022035", + createdAt: "1734140969317", + updatedAt: "1737532529640", }; ``` diff --git a/docs/models/components/thread.md b/docs/models/components/thread.md new file mode 100644 index 00000000..1812a5c3 --- /dev/null +++ b/docs/models/components/thread.md @@ -0,0 +1,14 @@ +# Thread + +## Example Usage + +```typescript +import { Thread } from "@novu/api/models/components"; + +let value: Thread = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/operations/subscriberscontrollercreatesubscriberresponse.md b/docs/models/operations/subscriberscontrollercreatesubscriberresponse.md index a850cded..7105b101 100644 --- a/docs/models/operations/subscriberscontrollercreatesubscriberresponse.md +++ b/docs/models/operations/subscriberscontrollercreatesubscriberresponse.md @@ -36,8 +36,8 @@ let value: SubscribersControllerCreateSubscriberResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1718637545842", - updatedAt: "1737033224657", + createdAt: "1719090053233", + updatedAt: "1737485732048", }, }; ``` diff --git a/docs/models/operations/subscriberscontrollergetsubscriberresponse.md b/docs/models/operations/subscriberscontrollergetsubscriberresponse.md index 65afe002..fe35c447 100644 --- a/docs/models/operations/subscriberscontrollergetsubscriberresponse.md +++ b/docs/models/operations/subscriberscontrollergetsubscriberresponse.md @@ -36,8 +36,8 @@ let value: SubscribersControllerGetSubscriberResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1719945923743", - updatedAt: "1737059479447", + createdAt: "1720398431139", + updatedAt: "1737511986843", }, }; ``` diff --git a/docs/models/operations/subscriberscontrollerlistsubscribersresponse.md b/docs/models/operations/subscriberscontrollerlistsubscribersresponse.md index e10cab28..8d4551ef 100644 --- a/docs/models/operations/subscriberscontrollerlistsubscribersresponse.md +++ b/docs/models/operations/subscriberscontrollerlistsubscribersresponse.md @@ -41,8 +41,8 @@ let value: SubscribersControllerListSubscribersResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1710081556439", - updatedAt: "1737091985761", + createdAt: "1710534063819", + updatedAt: "1737544493141", }, ], }, diff --git a/docs/models/operations/subscriberscontrollerlistsubscribersresponsebody.md b/docs/models/operations/subscriberscontrollerlistsubscribersresponsebody.md index a46377cb..fb062d48 100644 --- a/docs/models/operations/subscriberscontrollerlistsubscribersresponsebody.md +++ b/docs/models/operations/subscriberscontrollerlistsubscribersresponsebody.md @@ -35,8 +35,8 @@ let value: SubscribersControllerListSubscribersResponseBody = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1730763030989", - updatedAt: "1737050238662", + createdAt: "1731215538354", + updatedAt: "1737502746027", }, ], }; diff --git a/docs/models/operations/subscriberscontrollermarkactionasseenresponse.md b/docs/models/operations/subscriberscontrollermarkactionasseenresponse.md index dbc07bb8..989bd320 100644 --- a/docs/models/operations/subscriberscontrollermarkactionasseenresponse.md +++ b/docs/models/operations/subscriberscontrollermarkactionasseenresponse.md @@ -43,10 +43,10 @@ let value: SubscribersControllerMarkActionAsSeenResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1708622953211", - updatedAt: "1737082765077", + createdAt: "1709075460622", + updatedAt: "1737535272488", }, - createdAt: "1708591326770", + createdAt: "1709043834182", content: "", transactionId: "", channel: "sms", diff --git a/docs/models/operations/subscriberscontrollermarkmessagesasresponse.md b/docs/models/operations/subscriberscontrollermarkmessagesasresponse.md index 04dfd059..1ee30f08 100644 --- a/docs/models/operations/subscriberscontrollermarkmessagesasresponse.md +++ b/docs/models/operations/subscriberscontrollermarkmessagesasresponse.md @@ -44,10 +44,10 @@ let value: SubscribersControllerMarkMessagesAsResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1726157190958", - updatedAt: "1737032251600", + createdAt: "1726609698358", + updatedAt: "1737484759000", }, - createdAt: "1720266343526", + createdAt: "1720718850926", content: { type: "button", content: "", diff --git a/docs/models/operations/subscriberscontrollermodifysubscriberchannelresponse.md b/docs/models/operations/subscriberscontrollermodifysubscriberchannelresponse.md index ba10c039..9e2092b8 100644 --- a/docs/models/operations/subscriberscontrollermodifysubscriberchannelresponse.md +++ b/docs/models/operations/subscriberscontrollermodifysubscriberchannelresponse.md @@ -36,8 +36,8 @@ let value: SubscribersControllerModifySubscriberChannelResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1707460037760", - updatedAt: "1737067975325", + createdAt: "1707912545179", + updatedAt: "1737520482745", }, }; ``` diff --git a/docs/models/operations/subscriberscontrollerupdatesubscriberchannelresponse.md b/docs/models/operations/subscriberscontrollerupdatesubscriberchannelresponse.md index 9d05dbdf..3e19795d 100644 --- a/docs/models/operations/subscriberscontrollerupdatesubscriberchannelresponse.md +++ b/docs/models/operations/subscriberscontrollerupdatesubscriberchannelresponse.md @@ -36,8 +36,8 @@ let value: SubscribersControllerUpdateSubscriberChannelResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1727062651612", - updatedAt: "1737041428465", + createdAt: "1727515159026", + updatedAt: "1737493935878", }, }; ``` diff --git a/docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagresponse.md b/docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagresponse.md index 854e3abe..5b5b7b4f 100644 --- a/docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagresponse.md +++ b/docs/models/operations/subscriberscontrollerupdatesubscriberonlineflagresponse.md @@ -36,8 +36,8 @@ let value: SubscribersControllerUpdateSubscriberOnlineFlagResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1712195391616", - updatedAt: "1737021506484", + createdAt: "1712647899017", + updatedAt: "1737474013885", }, }; ``` diff --git a/docs/models/operations/subscriberscontrollerupdatesubscriberresponse.md b/docs/models/operations/subscriberscontrollerupdatesubscriberresponse.md index 22e3ecb1..62c17189 100644 --- a/docs/models/operations/subscriberscontrollerupdatesubscriberresponse.md +++ b/docs/models/operations/subscriberscontrollerupdatesubscriberresponse.md @@ -36,8 +36,8 @@ let value: SubscribersControllerUpdateSubscriberResponse = { organizationId: "", environmentId: "", deleted: false, - createdAt: "1725038519746", - updatedAt: "1737063251786", + createdAt: "1725491027148", + updatedAt: "1737515759188", }, }; ``` diff --git a/docs/models/operations/supportcontrollercreatethreadrequest.md b/docs/models/operations/supportcontrollercreatethreadrequest.md new file mode 100644 index 00000000..13d01c30 --- /dev/null +++ b/docs/models/operations/supportcontrollercreatethreadrequest.md @@ -0,0 +1,20 @@ +# SupportControllerCreateThreadRequest + +## Example Usage + +```typescript +import { SupportControllerCreateThreadRequest } from "@novu/api/models/operations"; + +let value: SupportControllerCreateThreadRequest = { + createSupportThreadDto: { + text: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes | +| `createSupportThreadDto` | [components.CreateSupportThreadDto](../../models/components/createsupportthreaddto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/supportcontrollerfetchuserorganizationsrequest.md b/docs/models/operations/supportcontrollerfetchuserorganizationsrequest.md new file mode 100644 index 00000000..af1f7bc1 --- /dev/null +++ b/docs/models/operations/supportcontrollerfetchuserorganizationsrequest.md @@ -0,0 +1,20 @@ +# SupportControllerFetchUserOrganizationsRequest + +## Example Usage + +```typescript +import { SupportControllerFetchUserOrganizationsRequest } from "@novu/api/models/operations"; + +let value: SupportControllerFetchUserOrganizationsRequest = { + plainCardRequestDto: { + timestamp: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes | +| `plainCardRequestDto` | [components.PlainCardRequestDto](../../models/components/plaincardrequestdto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/supportcontrollerfetchuserorganizationsresponsebody.md b/docs/models/operations/supportcontrollerfetchuserorganizationsresponsebody.md new file mode 100644 index 00000000..6e969f6d --- /dev/null +++ b/docs/models/operations/supportcontrollerfetchuserorganizationsresponsebody.md @@ -0,0 +1,14 @@ +# SupportControllerFetchUserOrganizationsResponseBody + +## Example Usage + +```typescript +import { SupportControllerFetchUserOrganizationsResponseBody } from "@novu/api/models/operations"; + +let value: SupportControllerFetchUserOrganizationsResponseBody = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/sdks/credentials/README.md b/docs/sdks/credentials/README.md index 2c5198a5..3f614281 100644 --- a/docs/sdks/credentials/README.md +++ b/docs/sdks/credentials/README.md @@ -27,6 +27,17 @@ async function run() { providerId: "pushpad", credentials: { webhookUrl: "https://example.com/webhook", + channel: "general", + deviceTokens: [ + "token1", + "token2", + "token3", + ], + alertUid: "12345-abcde", + title: "Critical Alert", + imageUrl: "https://example.com/image.png", + state: "resolved", + externalUrl: "https://example.com/details", }, }, ""); @@ -56,6 +67,17 @@ async function run() { providerId: "pushpad", credentials: { webhookUrl: "https://example.com/webhook", + channel: "general", + deviceTokens: [ + "token1", + "token2", + "token3", + ], + alertUid: "12345-abcde", + title: "Critical Alert", + imageUrl: "https://example.com/image.png", + state: "resolved", + externalUrl: "https://example.com/details", }, }, ""); @@ -116,6 +138,17 @@ async function run() { providerId: "zulip", credentials: { webhookUrl: "https://example.com/webhook", + channel: "general", + deviceTokens: [ + "token1", + "token2", + "token3", + ], + alertUid: "12345-abcde", + title: "Critical Alert", + imageUrl: "https://example.com/image.png", + state: "resolved", + externalUrl: "https://example.com/details", }, }, ""); @@ -145,6 +178,17 @@ async function run() { providerId: "zulip", credentials: { webhookUrl: "https://example.com/webhook", + channel: "general", + deviceTokens: [ + "token1", + "token2", + "token3", + ], + alertUid: "12345-abcde", + title: "Critical Alert", + imageUrl: "https://example.com/image.png", + state: "resolved", + externalUrl: "https://example.com/details", }, }, ""); diff --git a/docs/sdks/messages/README.md b/docs/sdks/messages/README.md index c498cb33..6e0a98ce 100644 --- a/docs/sdks/messages/README.md +++ b/docs/sdks/messages/README.md @@ -26,7 +26,10 @@ const novu = new Novu({ }); async function run() { - const result = await novu.messages.retrieve({}); + const result = await novu.messages.retrieve({ + page: 0, + limit: 10, + }); // Handle the result console.log(result); @@ -50,7 +53,10 @@ const novu = new NovuCore({ }); async function run() { - const res = await messagesRetrieve(novu, {}); + const res = await messagesRetrieve(novu, { + page: 0, + limit: 10, + }); if (!res.ok) { throw res.error; diff --git a/docs/sdks/notifications/README.md b/docs/sdks/notifications/README.md index fbf1af0e..8d9ac477 100644 --- a/docs/sdks/notifications/README.md +++ b/docs/sdks/notifications/README.md @@ -23,22 +23,7 @@ const novu = new Novu({ async function run() { const result = await novu.notifications.list({ - channels: [ - "sms", - "chat", - "in_app", - ], - templates: [ - - ], - emails: [ - - ], - search: "", - subscriberIds: [ - "", - "", - ], + page: 0, }); // Handle the result @@ -64,22 +49,7 @@ const novu = new NovuCore({ async function run() { const res = await notificationsList(novu, { - channels: [ - "sms", - "chat", - "in_app", - ], - templates: [ - - ], - emails: [ - - ], - search: "", - subscriberIds: [ - "", - "", - ], + page: 0, }); if (!res.ok) { diff --git a/docs/sdks/novu/README.md b/docs/sdks/novu/README.md index 126f4de1..19202248 100644 --- a/docs/sdks/novu/README.md +++ b/docs/sdks/novu/README.md @@ -13,6 +13,8 @@ Novu Documentation * [triggerBulk](#triggerbulk) - Bulk trigger event * [triggerBroadcast](#triggerbroadcast) - Broadcast event to all * [cancel](#cancel) - Cancel triggered event +* [supportControllerFetchUserOrganizations](#supportcontrollerfetchuserorganizations) +* [create](#create) ## trigger @@ -34,16 +36,23 @@ const novu = new Novu({ async function run() { const result = await novu.trigger({ name: "workflow_identifier", - to: [ - { - topicKey: "", - type: "Topic", + payload: { + "comment_id": "string", + "post": { + "text": "string", }, - { - topicKey: "", - type: "Topic", + }, + bridgeUrl: "https://example.com/bridge", + overrides: { + "fcm": { + "data": { + "key": "value", + }, }, - ], + }, + to: { + subscriberId: "", + }, }); // Handle the result @@ -70,16 +79,23 @@ const novu = new NovuCore({ async function run() { const res = await trigger(novu, { name: "workflow_identifier", - to: [ - { - topicKey: "", - type: "Topic", + payload: { + "comment_id": "string", + "post": { + "text": "string", }, - { - topicKey: "", - type: "Topic", + }, + bridgeUrl: "https://example.com/bridge", + overrides: { + "fcm": { + "data": { + "key": "value", + }, }, - ], + }, + to: { + subscriberId: "", + }, }); if (!res.ok) { @@ -140,33 +156,66 @@ async function run() { events: [ { name: "workflow_identifier", - to: [ - { - topicKey: "", - type: "Topic", + payload: { + "comment_id": "string", + "post": { + "text": "string", }, - { - subscriberId: "", + }, + bridgeUrl: "https://example.com/bridge", + overrides: { + "fcm": { + "data": { + "key": "value", + }, }, - ], + }, + to: { + subscriberId: "", + }, }, { name: "workflow_identifier", + payload: { + "comment_id": "string", + "post": { + "text": "string", + }, + }, + bridgeUrl: "https://example.com/bridge", + overrides: { + "fcm": { + "data": { + "key": "value", + }, + }, + }, to: [ - + { + topicKey: "", + type: "Subscriber", + }, ], }, { name: "workflow_identifier", - to: [ - { - topicKey: "", - type: "Topic", + payload: { + "comment_id": "string", + "post": { + "text": "string", }, - { - topicKey: "", - type: "Topic", + }, + bridgeUrl: "https://example.com/bridge", + overrides: { + "fcm": { + "data": { + "key": "value", + }, }, + }, + to: [ + "SUBSCRIBER_ID", + "SUBSCRIBER_ID", ], }, ], @@ -198,33 +247,66 @@ async function run() { events: [ { name: "workflow_identifier", - to: [ - { - topicKey: "", - type: "Topic", + payload: { + "comment_id": "string", + "post": { + "text": "string", }, - { - subscriberId: "", + }, + bridgeUrl: "https://example.com/bridge", + overrides: { + "fcm": { + "data": { + "key": "value", + }, }, - ], + }, + to: { + subscriberId: "", + }, }, { name: "workflow_identifier", + payload: { + "comment_id": "string", + "post": { + "text": "string", + }, + }, + bridgeUrl: "https://example.com/bridge", + overrides: { + "fcm": { + "data": { + "key": "value", + }, + }, + }, to: [ - + { + topicKey: "", + type: "Subscriber", + }, ], }, { name: "workflow_identifier", - to: [ - { - topicKey: "", - type: "Topic", + payload: { + "comment_id": "string", + "post": { + "text": "string", }, - { - topicKey: "", - type: "Topic", + }, + bridgeUrl: "https://example.com/bridge", + overrides: { + "fcm": { + "data": { + "key": "value", + }, }, + }, + to: [ + "SUBSCRIBER_ID", + "SUBSCRIBER_ID", ], }, ], @@ -439,4 +521,152 @@ run(); | errors.ErrorDto | 414 | application/json | | errors.ValidationErrorDto | 422 | application/json | | errors.ErrorDto | 500 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| errors.SDKError | 4XX, 5XX | \*/\* | + +## supportControllerFetchUserOrganizations + +### Example Usage + +```typescript +import { Novu } from "@novu/api"; + +const novu = new Novu({ + apiKey: "", +}); + +async function run() { + const result = await novu.supportControllerFetchUserOrganizations({ + timestamp: "", + }); + + // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { NovuCore } from "@novu/api/core.js"; +import { supportControllerFetchUserOrganizations } from "@novu/api/funcs/supportControllerFetchUserOrganizations.js"; + +// Use `NovuCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const novu = new NovuCore({ + apiKey: "", +}); + +async function run() { + const res = await supportControllerFetchUserOrganizations(novu, { + timestamp: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result); +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `plainCardRequestDto` | [components.PlainCardRequestDto](../../models/components/plaincardrequestdto.md) | :heavy_check_mark: | N/A | +| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[operations.SupportControllerFetchUserOrganizationsResponseBody](../../models/operations/supportcontrollerfetchuserorganizationsresponsebody.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## create + +### Example Usage + +```typescript +import { Novu } from "@novu/api"; + +const novu = new Novu({ + apiKey: "", +}); + +async function run() { + await novu.create({ + text: "", + }); + + +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { NovuCore } from "@novu/api/core.js"; +import { create } from "@novu/api/funcs/create.js"; + +// Use `NovuCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const novu = new NovuCore({ + apiKey: "", +}); + +async function run() { + const res = await create(novu, { + text: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `createSupportThreadDto` | [components.CreateSupportThreadDto](../../models/components/createsupportthreaddto.md) | :heavy_check_mark: | N/A | +| `idempotencyKey` | *string* | :heavy_minus_sign: | A header for idempotency purposes | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------- | --------------- | --------------- | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/novumessages/README.md b/docs/sdks/novumessages/README.md index a6867b7a..295839fa 100644 --- a/docs/sdks/novumessages/README.md +++ b/docs/sdks/novumessages/README.md @@ -24,8 +24,8 @@ const novu = new Novu({ async function run() { const result = await novu.subscribers.messages.markAllAs({ - messageId: "", - markAs: "read", + messageId: "", + markAs: "unread", }, ""); // Handle the result @@ -51,8 +51,8 @@ const novu = new NovuCore({ async function run() { const res = await subscribersMessagesMarkAllAs(novu, { - messageId: "", - markAs: "read", + messageId: "", + markAs: "unread", }, ""); if (!res.ok) { diff --git a/docs/sdks/novunotifications/README.md b/docs/sdks/novunotifications/README.md index 0ee40083..128aa1e7 100644 --- a/docs/sdks/novunotifications/README.md +++ b/docs/sdks/novunotifications/README.md @@ -24,6 +24,7 @@ const novu = new Novu({ async function run() { const result = await novu.subscribers.notifications.feed({ subscriberId: "", + limit: 10, payload: "btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30=", }); @@ -51,6 +52,7 @@ const novu = new NovuCore({ async function run() { const res = await subscribersNotificationsFeed(novu, { subscriberId: "", + limit: 10, payload: "btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30=", }); @@ -107,7 +109,7 @@ async function run() { const result = await novu.subscribers.notifications.unseenCount({ subscriberId: "", seen: false, - limit: 2979.49, + limit: 100, }); // Handle the result @@ -135,7 +137,7 @@ async function run() { const res = await subscribersNotificationsUnseenCount(novu, { subscriberId: "", seen: false, - limit: 2979.49, + limit: 100, }); if (!res.ok) { diff --git a/docs/sdks/preferences/README.md b/docs/sdks/preferences/README.md index 124e487b..500c265b 100644 --- a/docs/sdks/preferences/README.md +++ b/docs/sdks/preferences/README.md @@ -181,7 +181,7 @@ const novu = new Novu({ async function run() { const result = await novu.subscribers.preferences.retrieveByLevel({ - preferenceLevel: "global", + preferenceLevel: "template", subscriberId: "", }); @@ -208,7 +208,7 @@ const novu = new NovuCore({ async function run() { const res = await subscribersPreferencesRetrieveByLevel(novu, { - preferenceLevel: "global", + preferenceLevel: "template", subscriberId: "", }); @@ -264,7 +264,7 @@ const novu = new Novu({ async function run() { const result = await novu.subscribers.preferences.update({ subscriberId: "", - workflowId: "exampleValue", + workflowId: "", updateSubscriberPreferenceRequestDto: {}, }); @@ -292,7 +292,7 @@ const novu = new NovuCore({ async function run() { const res = await subscribersPreferencesUpdate(novu, { subscriberId: "", - workflowId: "exampleValue", + workflowId: "", updateSubscriberPreferenceRequestDto: {}, }); diff --git a/docs/sdks/properties/README.md b/docs/sdks/properties/README.md index 536a2e1e..72213560 100644 --- a/docs/sdks/properties/README.md +++ b/docs/sdks/properties/README.md @@ -22,7 +22,7 @@ const novu = new Novu({ async function run() { const result = await novu.subscribers.properties.updateOnlineFlag({ - isOnline: true, + isOnline: false, }, ""); // Handle the result @@ -48,7 +48,7 @@ const novu = new NovuCore({ async function run() { const res = await subscribersPropertiesUpdateOnlineFlag(novu, { - isOnline: true, + isOnline: false, }, ""); if (!res.ok) { diff --git a/docs/sdks/subscribers/README.md b/docs/sdks/subscribers/README.md index 968947c4..437cedb1 100644 --- a/docs/sdks/subscribers/README.md +++ b/docs/sdks/subscribers/README.md @@ -29,7 +29,7 @@ const novu = new Novu({ }); async function run() { - const result = await novu.subscribers.list(); + const result = await novu.subscribers.list(10); for await (const page of result) { // Handle the page @@ -55,7 +55,7 @@ const novu = new NovuCore({ }); async function run() { - const res = await subscribersList(novu); + const res = await subscribersList(novu, 10); if (!res.ok) { throw res.error; @@ -466,7 +466,6 @@ async function run() { subscribers: [ { subscriberId: "", - email: "example@example.com", }, ], }); @@ -497,7 +496,6 @@ async function run() { subscribers: [ { subscriberId: "", - email: "example@example.com", }, ], }); diff --git a/jsr.json b/jsr.json index d41c861b..1662c6fc 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@novu/api", - "version": "0.1.0", + "version": "0.1.1", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index dc3e9216..2192b69f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@novu/api", - "version": "0.1.0", + "version": "0.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@novu/api", - "version": "0.1.0", + "version": "0.1.1", "devDependencies": { "@typescript-eslint/eslint-plugin": "^7.7.1", "@typescript-eslint/parser": "^7.7.1", diff --git a/package.json b/package.json index 26219d79..e2f4eeb0 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,13 @@ { "name": "@novu/api", - "version": "0.1.0", + "version": "0.1.1", "author": "Novu", "main": "./index.js", "sideEffects": false, + "repository": { + "type": "git", + "url": "https://github.com/novuhq/novu-ts.git" + }, "scripts": { "lint": "eslint --max-warnings=0 src", "build": "tsc", diff --git a/sources/code-samples.yaml b/sources/code-samples.yaml index 429916e9..da0bc0aa 100644 --- a/sources/code-samples.yaml +++ b/sources/code-samples.yaml @@ -74,7 +74,7 @@ actions: "x-codeSamples": - "lang": "typescript" "label": "TypeScript" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.messages.retrieve({});\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.messages.retrieve({\n page: 0,\n limit: 10,\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/messages/transaction/{transactionId}"]["delete"] update: "x-codeSamples": @@ -92,7 +92,7 @@ actions: "x-codeSamples": - "lang": "typescript" "label": "TypeScript" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.notifications.list({});\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.notifications.list({\n page: 0,\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/notifications/graph/stats"]["get"] update: "x-codeSamples": @@ -116,7 +116,7 @@ actions: "x-codeSamples": - "lang": "typescript" "label": "TypeScript" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\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();" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.list(10);\n\n for await (const page of result) {\n // Handle the page\n console.log(page);\n }\n}\n\nrun();" - target: $["paths"]["/v1/subscribers"]["post"] update: "x-codeSamples": @@ -200,13 +200,13 @@ actions: "x-codeSamples": - "lang": "typescript" "label": "TypeScript" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.notifications.feed({\n subscriberId: \"\",\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();" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.notifications.feed({\n subscriberId: \"\",\n limit: 10,\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();" - target: $["paths"]["/v1/subscribers/{subscriberId}/notifications/unseen"]["get"] update: "x-codeSamples": - "lang": "typescript" "label": "TypeScript" - "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.notifications.unseenCount({\n subscriberId: \"\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.notifications.unseenCount({\n subscriberId: \"\",\n seen: false,\n limit: 100,\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/subscribers/{subscriberId}/online-status"]["patch"] update: "x-codeSamples": @@ -237,6 +237,18 @@ actions: - "lang": "typescript" "label": "TypeScript" "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.subscribers.preferences.update({\n subscriberId: \"\",\n workflowId: \"\",\n updateSubscriberPreferenceRequestDto: {},\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" + - target: $["paths"]["/v1/support/create-thread"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "TypeScript" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n await novu.create({\n text: \"\",\n });\n\n\n}\n\nrun();" + - target: $["paths"]["/v1/support/user-organizations"]["post"] + update: + "x-codeSamples": + - "lang": "typescript" + "label": "TypeScript" + "source": "import { Novu } from \"@novu/api\";\n\nconst novu = new Novu({\n apiKey: \"\",\n});\n\nasync function run() {\n const result = await novu.supportControllerFetchUserOrganizations({\n timestamp: \"\",\n });\n\n // Handle the result\n console.log(result);\n}\n\nrun();" - target: $["paths"]["/v1/topics"]["get"] update: "x-codeSamples": diff --git a/sources/json-development.json b/sources/json-development.json index f300fb71..9786ae60 100644 --- a/sources/json-development.json +++ b/sources/json-development.json @@ -23301,6 +23301,75 @@ } ] } + }, + "/v1/support/user-organizations": { + "post": { + "operationId": "SupportController_fetchUserOrganizations", + "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/PlainCardRequestDto" + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + } + } + }, + "/v1/support/create-thread": { + "post": { + "operationId": "SupportController_createThread", + "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/CreateSupportThreadDto" + } + } + } + }, + "responses": { + "201": { + "description": "" + } + } + } } }, "info": { @@ -23431,6 +23500,13 @@ "externalDocs": { "url": "https://docs.novu.co/activity-feed" } + }, + { + "name": "Translations", + "description": "Translations are used to localize your messages for different languages and regions. Novu provides a way to create and manage translations for your messages. You can create translations for your messages in different languages and regions, and assign them to your subscribers based on their preferences.", + "externalDocs": { + "url": "https://docs.novu.co/content-creation-design/translations" + } } ], "servers": [ @@ -27543,6 +27619,46 @@ "GeneratePreviewResponseDto": { "type": "object", "properties": {} + }, + "PlainCardRequestDto": { + "type": "object", + "properties": { + "cardKeys": { + "type": "array", + "items": { + "type": "string" + } + }, + "customer": { + "type": "object", + "nullable": true + }, + "tenant": { + "type": "object", + "nullable": true + }, + "thread": { + "type": "object", + "nullable": true + }, + "timestamp": { + "type": "string" + } + }, + "required": [ + "timestamp" + ] + }, + "CreateSupportThreadDto": { + "type": "object", + "properties": { + "text": { + "type": "string" + } + }, + "required": [ + "text" + ] } }, "headers": { diff --git a/src/funcs/create.ts b/src/funcs/create.ts new file mode 100644 index 00000000..07707b17 --- /dev/null +++ b/src/funcs/create.ts @@ -0,0 +1,148 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { NovuCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKError } from "../models/errors/sdkerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +export async function create( + client: NovuCore, + createSupportThreadDto: components.CreateSupportThreadDto, + idempotencyKey?: string | undefined, + options?: RequestOptions, +): Promise< + Result< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input: operations.SupportControllerCreateThreadRequest = { + createSupportThreadDto: createSupportThreadDto, + idempotencyKey: idempotencyKey, + }; + + const parsed = safeParse( + input, + (value) => + operations.SupportControllerCreateThreadRequest$outboundSchema.parse( + value, + ), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.CreateSupportThreadDto, { + explode: true, + }); + + const path = pathToFunc("/v1/support/create-thread")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "*/*", + "idempotency-key": encodeSimple( + "idempotency-key", + payload["idempotency-key"], + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "SupportController_createThread", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 1000, + maxInterval: 30000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const [result] = await M.match< + void, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.nil(201, z.void()), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/funcs/supportControllerFetchUserOrganizations.ts b/src/funcs/supportControllerFetchUserOrganizations.ts new file mode 100644 index 00000000..e7b88fe1 --- /dev/null +++ b/src/funcs/supportControllerFetchUserOrganizations.ts @@ -0,0 +1,150 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { NovuCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import * as components from "../models/components/index.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import { SDKError } from "../models/errors/sdkerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as operations from "../models/operations/index.js"; +import { Result } from "../types/fp.js"; + +export async function supportControllerFetchUserOrganizations( + client: NovuCore, + plainCardRequestDto: components.PlainCardRequestDto, + idempotencyKey?: string | undefined, + options?: RequestOptions, +): Promise< + Result< + operations.SupportControllerFetchUserOrganizationsResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input: operations.SupportControllerFetchUserOrganizationsRequest = { + plainCardRequestDto: plainCardRequestDto, + idempotencyKey: idempotencyKey, + }; + + const parsed = safeParse( + input, + (value) => + operations.SupportControllerFetchUserOrganizationsRequest$outboundSchema + .parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return parsed; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.PlainCardRequestDto, { + explode: true, + }); + + const path = pathToFunc("/v1/support/user-organizations")(); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + "idempotency-key": encodeSimple( + "idempotency-key", + payload["idempotency-key"], + { explode: false, charEncoding: "none" }, + ), + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + operationID: "SupportController_fetchUserOrganizations", + oAuth2Scopes: [], + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 1000, + maxInterval: 30000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "POST", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["4XX", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const [result] = await M.match< + operations.SupportControllerFetchUserOrganizationsResponseBody, + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + M.json( + 201, + operations + .SupportControllerFetchUserOrganizationsResponseBody$inboundSchema, + ), + M.fail("4XX"), + M.fail("5XX"), + )(response); + if (!result.ok) { + return result; + } + + return result; +} diff --git a/src/lib/config.ts b/src/lib/config.ts index caecc54d..95c33f8a 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -55,7 +55,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0", - sdkVersion: "0.1.0", - genVersion: "2.493.21", - userAgent: "speakeasy-sdk/typescript 0.1.0 2.493.21 1.0 @novu/api", + sdkVersion: "0.1.1", + genVersion: "2.493.34", + userAgent: "speakeasy-sdk/typescript 0.1.1 2.493.34 1.0 @novu/api", } as const; diff --git a/src/lib/schemas.ts b/src/lib/schemas.ts index f3856dcb..0e340b7e 100644 --- a/src/lib/schemas.ts +++ b/src/lib/schemas.ts @@ -57,6 +57,7 @@ export function collectExtraKeys< >( obj: ZodObject, extrasKey: K, + optional: boolean, ): ZodEffects< typeof obj, & output> @@ -81,6 +82,10 @@ export function collectExtraKeys< delete val[key]; } + if (optional && Object.keys(extras).length === 0) { + return val; + } + return { ...val, [extrasKey]: extras }; }); } diff --git a/src/models/components/createsupportthreaddto.ts b/src/models/components/createsupportthreaddto.ts new file mode 100644 index 00000000..24175e99 --- /dev/null +++ b/src/models/components/createsupportthreaddto.ts @@ -0,0 +1,66 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type CreateSupportThreadDto = { + text: string; +}; + +/** @internal */ +export const CreateSupportThreadDto$inboundSchema: z.ZodType< + CreateSupportThreadDto, + z.ZodTypeDef, + unknown +> = z.object({ + text: z.string(), +}); + +/** @internal */ +export type CreateSupportThreadDto$Outbound = { + text: string; +}; + +/** @internal */ +export const CreateSupportThreadDto$outboundSchema: z.ZodType< + CreateSupportThreadDto$Outbound, + z.ZodTypeDef, + CreateSupportThreadDto +> = z.object({ + text: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateSupportThreadDto$ { + /** @deprecated use `CreateSupportThreadDto$inboundSchema` instead. */ + export const inboundSchema = CreateSupportThreadDto$inboundSchema; + /** @deprecated use `CreateSupportThreadDto$outboundSchema` instead. */ + export const outboundSchema = CreateSupportThreadDto$outboundSchema; + /** @deprecated use `CreateSupportThreadDto$Outbound` instead. */ + export type Outbound = CreateSupportThreadDto$Outbound; +} + +export function createSupportThreadDtoToJSON( + createSupportThreadDto: CreateSupportThreadDto, +): string { + return JSON.stringify( + CreateSupportThreadDto$outboundSchema.parse(createSupportThreadDto), + ); +} + +export function createSupportThreadDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => CreateSupportThreadDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'CreateSupportThreadDto' from JSON`, + ); +} diff --git a/src/models/components/index.ts b/src/models/components/index.ts index 2b7d74d4..48c24e3d 100644 --- a/src/models/components/index.ts +++ b/src/models/components/index.ts @@ -29,6 +29,7 @@ export * from "./channeltypeenum.js"; export * from "./createdsubscriberdto.js"; export * from "./createintegrationrequestdto.js"; export * from "./createsubscriberrequestdto.js"; +export * from "./createsupportthreaddto.js"; export * from "./createtopicrequestdto.js"; export * from "./createtopicresponsedto.js"; export * from "./credentialsdto.js"; @@ -81,6 +82,7 @@ export * from "./notificationtriggervariable.js"; export * from "./notificationtriggervariableresponse.js"; export * from "./ordinalenum.js"; export * from "./ordinalvalueenum.js"; +export * from "./plaincardrequestdto.js"; export * from "./preference.js"; export * from "./preferencechannels.js"; export * from "./providersidenum.js"; diff --git a/src/models/components/plaincardrequestdto.ts b/src/models/components/plaincardrequestdto.ts new file mode 100644 index 00000000..994f3541 --- /dev/null +++ b/src/models/components/plaincardrequestdto.ts @@ -0,0 +1,223 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type Customer = {}; + +export type PlainCardRequestDtoTenant = {}; + +export type Thread = {}; + +export type PlainCardRequestDto = { + cardKeys?: Array | undefined; + customer?: Customer | null | undefined; + tenant?: PlainCardRequestDtoTenant | null | undefined; + thread?: Thread | null | undefined; + timestamp: string; +}; + +/** @internal */ +export const Customer$inboundSchema: z.ZodType< + Customer, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type Customer$Outbound = {}; + +/** @internal */ +export const Customer$outboundSchema: z.ZodType< + Customer$Outbound, + z.ZodTypeDef, + Customer +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Customer$ { + /** @deprecated use `Customer$inboundSchema` instead. */ + export const inboundSchema = Customer$inboundSchema; + /** @deprecated use `Customer$outboundSchema` instead. */ + export const outboundSchema = Customer$outboundSchema; + /** @deprecated use `Customer$Outbound` instead. */ + export type Outbound = Customer$Outbound; +} + +export function customerToJSON(customer: Customer): string { + return JSON.stringify(Customer$outboundSchema.parse(customer)); +} + +export function customerFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Customer$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Customer' from JSON`, + ); +} + +/** @internal */ +export const PlainCardRequestDtoTenant$inboundSchema: z.ZodType< + PlainCardRequestDtoTenant, + z.ZodTypeDef, + unknown +> = z.object({}); + +/** @internal */ +export type PlainCardRequestDtoTenant$Outbound = {}; + +/** @internal */ +export const PlainCardRequestDtoTenant$outboundSchema: z.ZodType< + PlainCardRequestDtoTenant$Outbound, + z.ZodTypeDef, + PlainCardRequestDtoTenant +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PlainCardRequestDtoTenant$ { + /** @deprecated use `PlainCardRequestDtoTenant$inboundSchema` instead. */ + export const inboundSchema = PlainCardRequestDtoTenant$inboundSchema; + /** @deprecated use `PlainCardRequestDtoTenant$outboundSchema` instead. */ + export const outboundSchema = PlainCardRequestDtoTenant$outboundSchema; + /** @deprecated use `PlainCardRequestDtoTenant$Outbound` instead. */ + export type Outbound = PlainCardRequestDtoTenant$Outbound; +} + +export function plainCardRequestDtoTenantToJSON( + plainCardRequestDtoTenant: PlainCardRequestDtoTenant, +): string { + return JSON.stringify( + PlainCardRequestDtoTenant$outboundSchema.parse(plainCardRequestDtoTenant), + ); +} + +export function plainCardRequestDtoTenantFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlainCardRequestDtoTenant$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlainCardRequestDtoTenant' from JSON`, + ); +} + +/** @internal */ +export const Thread$inboundSchema: z.ZodType = z + .object({}); + +/** @internal */ +export type Thread$Outbound = {}; + +/** @internal */ +export const Thread$outboundSchema: z.ZodType< + Thread$Outbound, + z.ZodTypeDef, + Thread +> = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Thread$ { + /** @deprecated use `Thread$inboundSchema` instead. */ + export const inboundSchema = Thread$inboundSchema; + /** @deprecated use `Thread$outboundSchema` instead. */ + export const outboundSchema = Thread$outboundSchema; + /** @deprecated use `Thread$Outbound` instead. */ + export type Outbound = Thread$Outbound; +} + +export function threadToJSON(thread: Thread): string { + return JSON.stringify(Thread$outboundSchema.parse(thread)); +} + +export function threadFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => Thread$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'Thread' from JSON`, + ); +} + +/** @internal */ +export const PlainCardRequestDto$inboundSchema: z.ZodType< + PlainCardRequestDto, + z.ZodTypeDef, + unknown +> = z.object({ + cardKeys: z.array(z.string()).optional(), + customer: z.nullable(z.lazy(() => Customer$inboundSchema)).optional(), + tenant: z.nullable(z.lazy(() => PlainCardRequestDtoTenant$inboundSchema)) + .optional(), + thread: z.nullable(z.lazy(() => Thread$inboundSchema)).optional(), + timestamp: z.string(), +}); + +/** @internal */ +export type PlainCardRequestDto$Outbound = { + cardKeys?: Array | undefined; + customer?: Customer$Outbound | null | undefined; + tenant?: PlainCardRequestDtoTenant$Outbound | null | undefined; + thread?: Thread$Outbound | null | undefined; + timestamp: string; +}; + +/** @internal */ +export const PlainCardRequestDto$outboundSchema: z.ZodType< + PlainCardRequestDto$Outbound, + z.ZodTypeDef, + PlainCardRequestDto +> = z.object({ + cardKeys: z.array(z.string()).optional(), + customer: z.nullable(z.lazy(() => Customer$outboundSchema)).optional(), + tenant: z.nullable(z.lazy(() => PlainCardRequestDtoTenant$outboundSchema)) + .optional(), + thread: z.nullable(z.lazy(() => Thread$outboundSchema)).optional(), + timestamp: z.string(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PlainCardRequestDto$ { + /** @deprecated use `PlainCardRequestDto$inboundSchema` instead. */ + export const inboundSchema = PlainCardRequestDto$inboundSchema; + /** @deprecated use `PlainCardRequestDto$outboundSchema` instead. */ + export const outboundSchema = PlainCardRequestDto$outboundSchema; + /** @deprecated use `PlainCardRequestDto$Outbound` instead. */ + export type Outbound = PlainCardRequestDto$Outbound; +} + +export function plainCardRequestDtoToJSON( + plainCardRequestDto: PlainCardRequestDto, +): string { + return JSON.stringify( + PlainCardRequestDto$outboundSchema.parse(plainCardRequestDto), + ); +} + +export function plainCardRequestDtoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => PlainCardRequestDto$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'PlainCardRequestDto' from JSON`, + ); +} diff --git a/src/models/operations/index.ts b/src/models/operations/index.ts index 41d6abdb..feeb9d44 100644 --- a/src/models/operations/index.ts +++ b/src/models/operations/index.ts @@ -41,6 +41,8 @@ export * from "./subscriberscontrollerupdatesubscriberchannel.js"; export * from "./subscriberscontrollerupdatesubscriberglobalpreferences.js"; export * from "./subscriberscontrollerupdatesubscriberonlineflag.js"; export * from "./subscriberscontrollerupdatesubscriberpreference.js"; +export * from "./supportcontrollercreatethread.js"; +export * from "./supportcontrollerfetchuserorganizations.js"; export * from "./topicscontrollerassign.js"; export * from "./topicscontrollercreatetopic.js"; export * from "./topicscontrollerdeletetopic.js"; diff --git a/src/models/operations/supportcontrollercreatethread.ts b/src/models/operations/supportcontrollercreatethread.ts new file mode 100644 index 00000000..87551b82 --- /dev/null +++ b/src/models/operations/supportcontrollercreatethread.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SupportControllerCreateThreadRequest = { + /** + * A header for idempotency purposes + */ + idempotencyKey?: string | undefined; + createSupportThreadDto: components.CreateSupportThreadDto; +}; + +/** @internal */ +export const SupportControllerCreateThreadRequest$inboundSchema: z.ZodType< + SupportControllerCreateThreadRequest, + z.ZodTypeDef, + unknown +> = z.object({ + "idempotency-key": z.string().optional(), + CreateSupportThreadDto: components.CreateSupportThreadDto$inboundSchema, +}).transform((v) => { + return remap$(v, { + "idempotency-key": "idempotencyKey", + "CreateSupportThreadDto": "createSupportThreadDto", + }); +}); + +/** @internal */ +export type SupportControllerCreateThreadRequest$Outbound = { + "idempotency-key"?: string | undefined; + CreateSupportThreadDto: components.CreateSupportThreadDto$Outbound; +}; + +/** @internal */ +export const SupportControllerCreateThreadRequest$outboundSchema: z.ZodType< + SupportControllerCreateThreadRequest$Outbound, + z.ZodTypeDef, + SupportControllerCreateThreadRequest +> = z.object({ + idempotencyKey: z.string().optional(), + createSupportThreadDto: components.CreateSupportThreadDto$outboundSchema, +}).transform((v) => { + return remap$(v, { + idempotencyKey: "idempotency-key", + createSupportThreadDto: "CreateSupportThreadDto", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SupportControllerCreateThreadRequest$ { + /** @deprecated use `SupportControllerCreateThreadRequest$inboundSchema` instead. */ + export const inboundSchema = + SupportControllerCreateThreadRequest$inboundSchema; + /** @deprecated use `SupportControllerCreateThreadRequest$outboundSchema` instead. */ + export const outboundSchema = + SupportControllerCreateThreadRequest$outboundSchema; + /** @deprecated use `SupportControllerCreateThreadRequest$Outbound` instead. */ + export type Outbound = SupportControllerCreateThreadRequest$Outbound; +} + +export function supportControllerCreateThreadRequestToJSON( + supportControllerCreateThreadRequest: SupportControllerCreateThreadRequest, +): string { + return JSON.stringify( + SupportControllerCreateThreadRequest$outboundSchema.parse( + supportControllerCreateThreadRequest, + ), + ); +} + +export function supportControllerCreateThreadRequestFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => + SupportControllerCreateThreadRequest$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'SupportControllerCreateThreadRequest' from JSON`, + ); +} diff --git a/src/models/operations/supportcontrollerfetchuserorganizations.ts b/src/models/operations/supportcontrollerfetchuserorganizations.ts new file mode 100644 index 00000000..3aec201b --- /dev/null +++ b/src/models/operations/supportcontrollerfetchuserorganizations.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../lib/primitives.js"; +import { safeParse } from "../../lib/schemas.js"; +import { Result as SafeParseResult } from "../../types/fp.js"; +import * as components from "../components/index.js"; +import { SDKValidationError } from "../errors/sdkvalidationerror.js"; + +export type SupportControllerFetchUserOrganizationsRequest = { + /** + * A header for idempotency purposes + */ + idempotencyKey?: string | undefined; + plainCardRequestDto: components.PlainCardRequestDto; +}; + +export type SupportControllerFetchUserOrganizationsResponseBody = {}; + +/** @internal */ +export const SupportControllerFetchUserOrganizationsRequest$inboundSchema: + z.ZodType< + SupportControllerFetchUserOrganizationsRequest, + z.ZodTypeDef, + unknown + > = z.object({ + "idempotency-key": z.string().optional(), + PlainCardRequestDto: components.PlainCardRequestDto$inboundSchema, + }).transform((v) => { + return remap$(v, { + "idempotency-key": "idempotencyKey", + "PlainCardRequestDto": "plainCardRequestDto", + }); + }); + +/** @internal */ +export type SupportControllerFetchUserOrganizationsRequest$Outbound = { + "idempotency-key"?: string | undefined; + PlainCardRequestDto: components.PlainCardRequestDto$Outbound; +}; + +/** @internal */ +export const SupportControllerFetchUserOrganizationsRequest$outboundSchema: + z.ZodType< + SupportControllerFetchUserOrganizationsRequest$Outbound, + z.ZodTypeDef, + SupportControllerFetchUserOrganizationsRequest + > = z.object({ + idempotencyKey: z.string().optional(), + plainCardRequestDto: components.PlainCardRequestDto$outboundSchema, + }).transform((v) => { + return remap$(v, { + idempotencyKey: "idempotency-key", + plainCardRequestDto: "PlainCardRequestDto", + }); + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SupportControllerFetchUserOrganizationsRequest$ { + /** @deprecated use `SupportControllerFetchUserOrganizationsRequest$inboundSchema` instead. */ + export const inboundSchema = + SupportControllerFetchUserOrganizationsRequest$inboundSchema; + /** @deprecated use `SupportControllerFetchUserOrganizationsRequest$outboundSchema` instead. */ + export const outboundSchema = + SupportControllerFetchUserOrganizationsRequest$outboundSchema; + /** @deprecated use `SupportControllerFetchUserOrganizationsRequest$Outbound` instead. */ + export type Outbound = + SupportControllerFetchUserOrganizationsRequest$Outbound; +} + +export function supportControllerFetchUserOrganizationsRequestToJSON( + supportControllerFetchUserOrganizationsRequest: + SupportControllerFetchUserOrganizationsRequest, +): string { + return JSON.stringify( + SupportControllerFetchUserOrganizationsRequest$outboundSchema.parse( + supportControllerFetchUserOrganizationsRequest, + ), + ); +} + +export function supportControllerFetchUserOrganizationsRequestFromJSON( + jsonString: string, +): SafeParseResult< + SupportControllerFetchUserOrganizationsRequest, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SupportControllerFetchUserOrganizationsRequest$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SupportControllerFetchUserOrganizationsRequest' from JSON`, + ); +} + +/** @internal */ +export const SupportControllerFetchUserOrganizationsResponseBody$inboundSchema: + z.ZodType< + SupportControllerFetchUserOrganizationsResponseBody, + z.ZodTypeDef, + unknown + > = z.object({}); + +/** @internal */ +export type SupportControllerFetchUserOrganizationsResponseBody$Outbound = {}; + +/** @internal */ +export const SupportControllerFetchUserOrganizationsResponseBody$outboundSchema: + z.ZodType< + SupportControllerFetchUserOrganizationsResponseBody$Outbound, + z.ZodTypeDef, + SupportControllerFetchUserOrganizationsResponseBody + > = z.object({}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace SupportControllerFetchUserOrganizationsResponseBody$ { + /** @deprecated use `SupportControllerFetchUserOrganizationsResponseBody$inboundSchema` instead. */ + export const inboundSchema = + SupportControllerFetchUserOrganizationsResponseBody$inboundSchema; + /** @deprecated use `SupportControllerFetchUserOrganizationsResponseBody$outboundSchema` instead. */ + export const outboundSchema = + SupportControllerFetchUserOrganizationsResponseBody$outboundSchema; + /** @deprecated use `SupportControllerFetchUserOrganizationsResponseBody$Outbound` instead. */ + export type Outbound = + SupportControllerFetchUserOrganizationsResponseBody$Outbound; +} + +export function supportControllerFetchUserOrganizationsResponseBodyToJSON( + supportControllerFetchUserOrganizationsResponseBody: + SupportControllerFetchUserOrganizationsResponseBody, +): string { + return JSON.stringify( + SupportControllerFetchUserOrganizationsResponseBody$outboundSchema.parse( + supportControllerFetchUserOrganizationsResponseBody, + ), + ); +} + +export function supportControllerFetchUserOrganizationsResponseBodyFromJSON( + jsonString: string, +): SafeParseResult< + SupportControllerFetchUserOrganizationsResponseBody, + SDKValidationError +> { + return safeParse( + jsonString, + (x) => + SupportControllerFetchUserOrganizationsResponseBody$inboundSchema.parse( + JSON.parse(x), + ), + `Failed to parse 'SupportControllerFetchUserOrganizationsResponseBody' from JSON`, + ); +} diff --git a/src/sdk/sdk.ts b/src/sdk/sdk.ts index 758be59c..cc3a3ea8 100644 --- a/src/sdk/sdk.ts +++ b/src/sdk/sdk.ts @@ -3,6 +3,8 @@ */ import { cancel } from "../funcs/cancel.js"; +import { create } from "../funcs/create.js"; +import { supportControllerFetchUserOrganizations } from "../funcs/supportControllerFetchUserOrganizations.js"; import { trigger } from "../funcs/trigger.js"; import { triggerBroadcast } from "../funcs/triggerBroadcast.js"; import { triggerBulk } from "../funcs/triggerBulk.js"; @@ -125,4 +127,36 @@ export class Novu extends ClientSDK { options, )); } + + async supportControllerFetchUserOrganizations( + plainCardRequestDto: components.PlainCardRequestDto, + idempotencyKey?: string | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(supportControllerFetchUserOrganizations( + this, + plainCardRequestDto, + idempotencyKey, + options, + )); + } + + /** + * Topic creation + * + * @remarks + * Create a topic + */ + async create( + createSupportThreadDto: components.CreateSupportThreadDto, + idempotencyKey?: string | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(create( + this, + createSupportThreadDto, + idempotencyKey, + options, + )); + } }